Skip to content

Commit

Permalink
include the Numbas version in JS as Numbas.version
Browse files Browse the repository at this point in the history
  • Loading branch information
christianp committed Apr 27, 2023
1 parent 88b03b1 commit b2c34a6
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Makefile
@@ -1,6 +1,6 @@
everything: update_tests docs

VERSION=7.0
VERSION=7.1
NUMBAS_EDITOR_PATH ?= ../editor
JSDOC_TEMPLATE_PATH ?= ../numbas-jsdoc-template

Expand Down
3 changes: 2 additions & 1 deletion bin/numbas.py
Expand Up @@ -35,7 +35,7 @@
from zipfile import ZipFile, ZipInfo


NUMBAS_VERSION = '6.3'
NUMBAS_VERSION = '7.1'


namespaces = {
Expand Down Expand Up @@ -250,6 +250,7 @@ def make_xml(self):
custom_part_types[pt['short_name']] = pt

self.xmls = xml2js.settings_js_template.format(**{
'numbas_version': NUMBAS_VERSION,
'extensionfiles': [str(x) for x in extensionfiles],
'templates': xslts_js,
'examXML': xml2js.encode(self.examXML),
Expand Down
2 changes: 2 additions & 0 deletions bin/xml2js.py
Expand Up @@ -25,6 +25,8 @@ def encode(xml):
settings_js_template = """Numbas.queueScript('settings',{extensionfiles},function() {{
Numbas.custom_part_types = {custom_part_types};
Numbas.version = {numbas_version};
Numbas.rawxml = {{
templates: {{
{templates}
Expand Down

0 comments on commit b2c34a6

Please sign in to comment.