{"id":707,"date":"2015-05-20T15:04:46","date_gmt":"2015-05-20T15:04:46","guid":{"rendered":"http:\/\/www.numbas.org.uk\/numbas\/?p=673"},"modified":"2015-05-20T15:04:46","modified_gmt":"2015-05-20T15:04:46","slug":"development-log-may-2015","status":"publish","type":"post","link":"https:\/\/www.numbas.org.uk\/theme-testing\/blog\/2015\/05\/development-log-may-2015\/","title":{"rendered":"Development log: May 2015"},"content":{"rendered":"<p><img loading=\"lazy\" class=\"aligncenter size-full wp-image-674\" src=\"http:\/\/www.numbas.org.uk\/wp-content\/uploads\/2015\/05\/basket_dropdown.png\" alt=\"basket_dropdown\" width=\"813\" height=\"221\" \/><\/p>\n<p>We&#8217;ve just updated the Numbas editor with another long-awaited feature: a &#8220;shopping basket&#8221; to keep questions while you browse the database. You can create an exam containing the questions in your basket with one click, or select individual questions from the basket inside the question editor. This resolves a long-standing problem with the exam editor &#8211;\u00a0when there can be dozens\u00a0of questions\u00a0with the same name, and copies of those questions, it was\u00a0very\u00a0hard to find the questions you want in the miniature search interface included in the question editor.<\/p>\n<p>I&#8217;ve updated <a href=\"http:\/\/numbas-editor.readthedocs.org\/en\/latest\/create-exam.html\">the &#8220;create an exam&#8221; tutorial<\/a> with instructions on how to use the new &#8220;shopping basket&#8221; feature.<\/p>\n<p><!--more--><\/p>\n<h3>Other changes<\/h3>\n<p>The Numbas runtime:<\/p>\n<ul>\n<li>Added a JME function <em>list(range)<\/em> to convert a\u00a0range to a list. (<a href=\"http:\/\/numbas-editor.readthedocs.org\/en\/latest\/jme-reference.html#ranges\">docs<\/a>)<\/li>\n<li>Added a JME function\u00a0<em>filter<\/em> to select only elements of a list which satisfy a predicate. (<a href=\"https:\/\/github.com\/numbas\/Numbas\/commit\/144d18b87d7e2cd13ea9bb63f20a90a474935ce1\">code<\/a>)<\/li>\n<li>Added JME function let to\u00a0assign a\u00a0variable temporarily. (docs)<\/li>\n<li>Fixed <em>Numbas.jme.display.treeToJME<\/em> on a function with no arguments. (<a href=\"https:\/\/github.com\/numbas\/Numbas\/commit\/60426f6fea38479793664653ea0340ba9d859e94\">code<\/a>)<\/li>\n<li>Added JavaScript function <em>Numbas.util.zip<\/em> and JME function <em>zip<\/em>, which zip two or more lists together. (<a href=\"http:\/\/numbas-editor.readthedocs.org\/en\/latest\/jme-reference.html#zip\">docs<\/a>)<\/li>\n<li>Fixed a problem\u00a0when substituting a string into plain text just before some TeX code. (<a href=\"https:\/\/github.com\/numbas\/Numbas\/issues\/370\">issue<\/a>)<\/li>\n<li><em>div<\/em> tags in question content, matrix entry inputs\u00a0and correct answer displays get horizontal scrollbars when they&#8217;re too wide. (<a href=\"https:\/\/github.com\/numbas\/Numbas\/commit\/1d5262af3c4c005f33305e079fed6e1de168cd83\">code<\/a>)<\/li>\n<li>Fixed a bug where the radio buttons in the correct answer for a &#8220;match choices with answers&#8221; part weren&#8217;t set properly. (<a href=\"https:\/\/github.com\/numbas\/Numbas\/commit\/1af9446fcc203a411985a0c97c15998cee4fe81c\">code<\/a>)<\/li>\n<li>Part object constructor functions are now available in JavaScript through <em>Numbas.parts<\/em>. (<a href=\"https:\/\/github.com\/numbas\/Numbas\/commit\/b4e881cffe647e933142fb22f8ba0244437f0c87\">code<\/a>)<\/li>\n<li>Fixed a bug with precround when rounding a negative number. (<a href=\"https:\/\/github.com\/numbas\/Numbas\/commit\/9ce680741bf9d3bd6519aecbdf1e89dcf5b44b6f\">code<\/a>)<\/li>\n<li><em>Numbas.jme.wrapValue<\/em> can take a type hint when passed an array, when you want a matrix or vector, for example. (<a href=\"https:\/\/github.com\/numbas\/Numbas\/commit\/240f2c17c0c0ee69702768f3a4768055fe1c464a\">code<\/a>)<\/li>\n<li>You can use the arrow keys to move between cells in the matrix input part. (<a href=\"https:\/\/github.com\/numbas\/Numbas\/commit\/158b1123656e771daa6739b5d0990e4ad74eed6c\">code<\/a>)<\/li>\n<li>You can give a\u00a0dictionary of variables to <em>Numbas.jme.Scope.evaluate<\/em>, instead of explicitly creating a new scope with those variables in. (<a href=\"https:\/\/github.com\/numbas\/Numbas\/commit\/99e4865aeac0fa2ce7ff9163e078e4f87e4fd204\">code<\/a>)<\/li>\n<li>Fixed a bug where variable names which contain\u00a0an operator name (such as <i>in<\/i>) followed by an underscore were parsed as the operator name. (<a href=\"https:\/\/github.com\/numbas\/Numbas\/commit\/54fd59d11c70ef4a6ce1dc235f5d11b85e800d0f\">code<\/a>)<\/li>\n<li>The student&#8217;s name and ID\u00a0are loaded from SCORM and displayed on the results page. (<a href=\"https:\/\/github.com\/numbas\/Numbas\/commit\/237047e94e782d1ec37378c949ca4b59e67deede\">code<\/a>)<\/li>\n<li>You can now specify when custom part scripts run in relation to the built-in scripts: before, after, or instead of the built-in script. (<a href=\"https:\/\/github.com\/numbas\/Numbas\/commit\/ede665b8bf0188af112bfba2e323c7135e94e184\">code<\/a>)<\/li>\n<li>Fixed the logic for putting brackets around complex numbers. (<a href=\"https:\/\/github.com\/numbas\/Numbas\/commit\/14f706cc7d78b952071e951258a77a6708504ec2\">code<\/a>)<\/li>\n<li>Fixed the\u00a0<em>question<\/em> variable\u00a0made available\u00a0to\u00a0custom functions written in JavaScript. (<a href=\"https:\/\/github.com\/numbas\/Numbas\/commit\/5565f229dc42096b2ee586af6f204670a2de08c5\">code<\/a>)<\/li>\n<li>The\u00a0<em>product<\/em> function doesn&#8217;t die when one of the lists is empty. (<a href=\"https:\/\/github.com\/numbas\/Numbas\/commit\/dd1a267a24e35d276d76b424976c0f056f654863\">code<\/a>)<\/li>\n<li>JME string restrictions are case insensitive. (<a href=\"https:\/\/github.com\/numbas\/Numbas\/commit\/c0cfd3a8a9e998988655146a6343ca545f065585\">code<\/a>)<\/li>\n<\/ul>\n<p>The Numbas editor:<\/p>\n<ul>\n<li>The variable testing tab header shows &#8220;active&#8221; when a condition is defined.\u00a0(<a href=\"https:\/\/github.com\/numbas\/editor\/commit\/00078e0ee9f1a8f0fef184317c9935c51db05444\">code<\/a>)<\/li>\n<li>Fixed a problem with case-sensitivity in the variable dependency list. (<a href=\"https:\/\/github.com\/numbas\/editor\/issues\/241\">issue<\/a>)<\/li>\n<li>The various errors that can arise when generating\u00a0variables are handled better. (<a href=\"https:\/\/github.com\/numbas\/editor\/commit\/42e31d27d643437eab7c48cfebe9da437af568bc\">code<\/a>)<\/li>\n<li>When trying to find a set of variables satisfying the condition,\u00a0we only generate the variables required to evaluate the condition. (<a href=\"https:\/\/github.com\/numbas\/editor\/commit\/25f89eacca9dcde625c44b23b21865203aa3c2f9\">code<\/a>)<\/li>\n<li>The default value in the &#8220;insert gapfill&#8221; dialog is one more than the maximum gap number already present. (<a href=\"https:\/\/github.com\/numbas\/editor\/commit\/eb701206e331c27a48b93da2d13e09270bd27e30\">code<\/a>)<\/li>\n<li>There&#8217;s now a &#8220;conditional visibility&#8221; button in the editor, which lets you specify a condition in JME for showing a section of text. (<a href=\"https:\/\/github.com\/numbas\/editor\/commit\/feb61e5dcc56804dde5504c9199740bd99a27e10\">code<\/a>)<\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>We&#8217;ve just updated the Numbas editor with another long-awaited feature: a &#8220;shopping basket&#8221; to keep questions while you browse the database. You can create an exam containing the questions in your basket with one click, or select individual questions from the basket inside the question editor. This resolves a long-standing problem with the exam editor [&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\/707"}],"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=707"}],"version-history":[{"count":0,"href":"https:\/\/www.numbas.org.uk\/theme-testing\/wp-json\/wp\/v2\/posts\/707\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.numbas.org.uk\/theme-testing\/wp-json\/wp\/v2\/media?parent=707"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.numbas.org.uk\/theme-testing\/wp-json\/wp\/v2\/categories?post=707"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.numbas.org.uk\/theme-testing\/wp-json\/wp\/v2\/tags?post=707"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}