{"id":869,"date":"2015-08-05T14:53:33","date_gmt":"2015-08-05T14:53:33","guid":{"rendered":"http:\/\/www.numbas.org.uk\/?p=869"},"modified":"2015-08-05T14:53:33","modified_gmt":"2015-08-05T14:53:33","slug":"development-log-august-2015","status":"publish","type":"post","link":"https:\/\/www.numbas.org.uk\/theme-testing\/blog\/2015\/08\/development-log-august-2015\/","title":{"rendered":"Development log: August 2015"},"content":{"rendered":"<p><img loading=\"lazy\" class=\"aligncenter size-main-image wp-image-870\" src=\"http:\/\/www.numbas.org.uk\/wp-content\/uploads\/2015\/08\/numbas-large-layout-600x280.png\" alt=\"numbas large layout\" width=\"600\" height=\"280\" srcset=\"https:\/\/www.numbas.org.uk\/wp-content\/uploads\/2015\/08\/numbas-large-layout-600x280.png 600w, https:\/\/www.numbas.org.uk\/wp-content\/uploads\/2015\/08\/numbas-large-layout-300x140.png 300w, https:\/\/www.numbas.org.uk\/wp-content\/uploads\/2015\/08\/numbas-large-layout-1024x478.png 1024w, https:\/\/www.numbas.org.uk\/wp-content\/uploads\/2015\/08\/numbas-large-layout.png 1465w\" sizes=\"(max-width: 600px) 100vw, 600px\" \/><\/p>\n<p>Development of Numbas has continued apace over the Summer break. I&#8217;m about to go on holiday for a couple of weeks, so I thought I&#8217;d write a development log to keep you up to date with all the latest changes.<\/p>\n<p>The biggest change is that I completely rewrote the default theme to use the <a href=\"http:\/\/getbootstrap.com\/\">Bootstrap<\/a> framework.\u00a0As well as making everything look\u00a0more &#8220;modern&#8221;, it\u00a0should make using Numbas on smaller screens a lot easier. When the screen is below a certain width, the question list collapses into a sliding menu, which you can reveal by clicking on the icon at the top left of the screen. The old layout, with all the navigation bumped to the bottom, led to a lot of scrolling up and down.<\/p>\n<p><img loading=\"lazy\" class=\"aligncenter size-full wp-image-872\" src=\"http:\/\/www.numbas.org.uk\/wp-content\/uploads\/2015\/08\/numbas-small-layout1.gif\" alt=\"numbas small layout\" width=\"500\" height=\"436\" \/><\/p>\n<h3>Other changes<\/h3>\n<p>The Numbas runtime:<\/p>\n<ul>\n<li>New JME functions: len(set) (<a href=\"https:\/\/github.com\/numbas\/Numbas\/commit\/164cf33c8a13dc3825992f695a8f5ea22b4e9f77\">code<\/a>), reverse(list) and indices(list,value). (<a href=\"https:\/\/github.com\/numbas\/Numbas\/commit\/fd203b1f5134382ffc77b17b65984c458f374a3f\">code<\/a>, <a href=\"http:\/\/numbas-editor.readthedocs.org\/en\/latest\/jme-reference.html#reverse\">documentation<\/a>)<\/li>\n<li>There&#8217;s now a version of the table function which doesn&#8217;t require a list of column headers. (<a href=\"http:\/\/numbas-editor.readthedocs.org\/en\/latest\/jme-reference.html#table\">documentation<\/a>)<\/li>\n<li>The shuffle function now works on ranges as well as lists. (<a href=\"https:\/\/github.com\/numbas\/Numbas\/commit\/4a4827e40d1fc368010a9b40e9a42691046c06de\">code<\/a>, <a href=\"http:\/\/numbas-editor.readthedocs.org\/en\/latest\/jme-reference.html#shuffle\">documentation<\/a>)<\/li>\n<li>&#8220;Match choices with answers&#8221; parts now have a couple of layout options, which let you remove certain elements from the grid. You might want to do this when your grid is symmetric (for example, when asking the student to state which elements of a set are equivalent to each other). (<a href=\"https:\/\/github.com\/numbas\/Numbas\/commit\/806d6672706acdefbc424fc9d9f87df39f93a753\">code<\/a>, <a href=\"http:\/\/numbas-editor.readthedocs.org\/en\/latest\/question-parts.html#term-layout-match-choices-with-answers-only\">documentation<\/a>)<\/li>\n<li>Fixed a bug in the random number generator seed which caused a warning in Chrome. (<a href=\"https:\/\/github.com\/numbas\/Numbas\/issues\/378\">issue<\/a>)<\/li>\n<li>The code to count significant\u00a0figures in a number now copes with E\u00a0notation. (<a href=\"https:\/\/github.com\/numbas\/Numbas\/issues\/379\">issue<\/a>)<\/li>\n<li>The value of cmi.session_time in the SCORM data model is now set properly (<a href=\"https:\/\/github.com\/numbas\/Numbas\/commit\/dc01a6725edbdcd04c2369f4bce2610e69de360b\">code<\/a>)<\/li>\n<li>The &#8220;noLeadingMinus&#8221; simplification rule rewrites -0 to 0. (<a href=\"https:\/\/github.com\/numbas\/Numbas\/commit\/c16281dcb5b1a0fa1a908051ec809f014bb6947a\">code<\/a>)<\/li>\n<li>Added an option to not show\u00a0the results page when the exam is finished. (<a href=\"https:\/\/github.com\/numbas\/Numbas\/issues\/381\">issue<\/a>)<\/li>\n<li>When a question only has one part, there&#8217;s no longer a &#8220;submit part&#8221; button in the part\u00a0feedback box. Instead, there&#8217;s just the &#8220;submit answer&#8221; button at the bottom of the question. (<a href=\"https:\/\/github.com\/numbas\/Numbas\/commit\/7a7952db9a351b7119664cf83b9d0ce617374b39\">code<\/a>)<\/li>\n<li>As part of the groundwork for enabling adaptive marking, part objects now have a getCorrectAnswer method which returns the correct answer to the part\u00a0in a given scope. (<a href=\"https:\/\/github.com\/numbas\/Numbas\/commit\/bde5ba017e7ef5e35e53e2e96662181c6240d6e5\">code<\/a>, <a href=\"http:\/\/numbas.github.io\/Numbas\/Numbas.parts.Part.html#getCorrectAnswer\">documentation<\/a>).\u00a0Each part also has a method studentAnswerAsJME which returns the student&#8217;s answer to the part as a JME data type. (<a href=\"http:\/\/numbas.github.io\/Numbas\/Numbas.parts.Part.html#studentAnswerAsJME\">documentation<\/a>)<\/li>\n<li>Part marking scripts need to\u00a0store\u00a0some information which\u00a0the validation script uses to decide what feedback to give. This should now be stored in this.validation. (<a href=\"https:\/\/github.com\/numbas\/Numbas\/commit\/60137a6f29e8cf2cb3089d868744b0d7ac42b7fc\">code<\/a>)<\/li>\n<li>Fixed a bug in Numbas.jme.display.mergeRuleset which led to some rules going missing. (<a href=\"https:\/\/github.com\/numbas\/Numbas\/commit\/887ad6a9aabb6c685e39442eb09e43d738c9f117\">code<\/a>)<\/li>\n<li>If the &#8220;minimum\/maximum number of marks&#8221; options in a multiple choice part are empty, use 0. (<a href=\"https:\/\/github.com\/numbas\/editor\/issues\/260\">issue<\/a>)<\/li>\n<li>The JME function zip(lists) no longer\u00a0gets stuck in an infinite loop if you give it no arguments. (<a href=\"https:\/\/github.com\/numbas\/Numbas\/commit\/f739024791a2a38ad8945a381ef8c6a29e71d320\">code<\/a>)<\/li>\n<li>There&#8217;s now a function Numbas.jme.tokenToDisplayString which turns a JME token into a representative string, and a dictionary Numbas.jme.typeToDisplayString which defines how that behaves for each data type. (<a href=\"https:\/\/github.com\/numbas\/Numbas\/commit\/fab2ceb8b37f8ca6cdb98f20612589a5e0abbcb5\">code<\/a>, <a href=\"http:\/\/numbas.github.io\/Numbas\/Numbas.jme.html#tokenToDisplayString\">documentation<\/a>)<\/li>\n<li>Fixed a bug where names of expected variables in &#8220;mathematical expression&#8221;\u00a0didn&#8217;t have excess whitespace trimmed. (<a href=\"https:\/\/github.com\/numbas\/Numbas\/issues\/387\">issue<\/a>)<\/li>\n<li>Added a function Numbas.util.nicePartName which gives a human-readable identifier for a part. (<a href=\"http:\/\/numbas.github.io\/Numbas\/Numbas.util.html#nicePartName\">documentation<\/a>)<\/li>\n<li>Nested unary minus and plus now get brackets around them when rendered as LaTeX. (<a href=\"https:\/\/github.com\/numbas\/Numbas\/issues\/394\">issue<\/a>)<\/li>\n<li>The source code for each part type is now in a separate file, and the builtin JME functions are in a separate file to the core JME interpreter. This should make the code easier to maintain. (<a href=\"https:\/\/github.com\/numbas\/Numbas\/commit\/a447f5fd1322a94d4ec07d005fff54b0497ab843\">code<\/a>)<\/li>\n<li>Added display-only JME functions sub(name,index) and sup(name,index) to display variable names with arbitrary subscripts or superscripts. (<a href=\"https:\/\/github.com\/numbas\/Numbas\/commit\/23a7b69f36d82601b059051382bd5993f29be181\">code<\/a>, <a href=\"http:\/\/numbas-editor.readthedocs.org\/en\/latest\/simplification.html#display-only-jme-functions\">documentation<\/a>)<\/li>\n<li>The\u00a0logic around marking parts with zero marks has changed so we can give\u00a0more useful feedback. Previously, parts with zero marks available just weren&#8217;t marked, but sometimes you want a part to be\u00a0marked\u00a0for adaptive marking, or just to get some feedback. Parts with zero marks now show a tick or a cross, even when they don&#8217;t contribute to the total score. (<a href=\"https:\/\/github.com\/numbas\/Numbas\/commit\/edd3d7ebd0fb10c48076389e08222c28eb85bcd8\">code<\/a>)<\/li>\n<\/ul>\n<p>The Numbas editor:<\/p>\n<ul>\n<li>Fixed the\u00a0logic to decide when to show the delete button for questions and exams. (<a href=\"https:\/\/github.com\/numbas\/editor\/issues\/246\">issue<\/a>)<\/li>\n<li>Fixed a bug where links to pages on the same domain as the Numbas editor\u00a0were made relative. (<a href=\"https:\/\/github.com\/numbas\/editor\/issues\/245\">issue<\/a>)<\/li>\n<li>Added a lot of links to help pages that had been missing from the various part editor tabs. (<a href=\"https:\/\/github.com\/numbas\/editor\/issues\/253\">issue<\/a>)<\/li>\n<li>Fields which take a JME expression use a monospace font, so they&#8217;re more readable. (<a href=\"https:\/\/github.com\/numbas\/editor\/issues\/254\">issue<\/a>)<\/li>\n<li>Question and exam descriptions are sanitized to remove bad HTML. (somebody put a whole form element in their description!) (<a href=\"https:\/\/github.com\/numbas\/editor\/commit\/535f5f36961ef9cb06c7d102f8654b4c948abb30\">code<\/a>)<\/li>\n<li>The question search page now takes an exclude_tags parameter so you can exclude questions with certain tags. There&#8217;s no user interface for this yet. (<a href=\"https:\/\/github.com\/numbas\/editor\/commit\/01b87a727fe736a53b07cb5d5404d25ebf915127\">code<\/a>)<\/li>\n<li>The sorting of tags on the question edit page is now case insensitive. (<a href=\"https:\/\/github.com\/numbas\/editor\/issues\/263\">issue<\/a>)<\/li>\n<li>Added a feedback label &#8220;Needs to be tested&#8221;. (<a href=\"https:\/\/github.com\/numbas\/editor\/commit\/dfb1506c090ebba49d57d46e6d410271d2f911d7\">code<\/a>, <a href=\"http:\/\/numbas-editor.readthedocs.org\/en\/latest\/question-reference.html#term-feedback\">documentation<\/a>)<\/li>\n<li>Fixed a bug involving\u00a0custom functions\u00a0whose names contain a capital letter. (<a href=\"https:\/\/github.com\/numbas\/Numbas\/issues\/393\">issue<\/a>)<\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>Development of Numbas has continued apace over the Summer break. I&#8217;m about to go on holiday for a couple of weeks, so I thought I&#8217;d write a development log to keep you up to date with all the latest changes. The biggest change is that I completely rewrote the default theme to use the Bootstrap [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":[],"categories":[10],"tags":[],"_links":{"self":[{"href":"https:\/\/www.numbas.org.uk\/theme-testing\/wp-json\/wp\/v2\/posts\/869"}],"collection":[{"href":"https:\/\/www.numbas.org.uk\/theme-testing\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.numbas.org.uk\/theme-testing\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.numbas.org.uk\/theme-testing\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.numbas.org.uk\/theme-testing\/wp-json\/wp\/v2\/comments?post=869"}],"version-history":[{"count":1,"href":"https:\/\/www.numbas.org.uk\/theme-testing\/wp-json\/wp\/v2\/posts\/869\/revisions"}],"predecessor-version":[{"id":873,"href":"https:\/\/www.numbas.org.uk\/theme-testing\/wp-json\/wp\/v2\/posts\/869\/revisions\/873"}],"wp:attachment":[{"href":"https:\/\/www.numbas.org.uk\/theme-testing\/wp-json\/wp\/v2\/media?parent=869"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.numbas.org.uk\/theme-testing\/wp-json\/wp\/v2\/categories?post=869"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.numbas.org.uk\/theme-testing\/wp-json\/wp\/v2\/tags?post=869"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}