{"id":2039,"date":"2023-07-06T08:13:04","date_gmt":"2023-07-06T08:13:04","guid":{"rendered":"https:\/\/www.numbas.org.uk\/?p=2039"},"modified":"2023-11-28T15:46:19","modified_gmt":"2023-11-28T15:46:19","slug":"development-update-june-2023","status":"publish","type":"post","link":"https:\/\/www.numbas.org.uk\/theme-testing\/blog\/2023\/07\/development-update-june-2023\/","title":{"rendered":"Development update: July 2023"},"content":{"rendered":"\n<p>Here&#8217;s a development update, covering everything since the release of Numbas v7 last December.<\/p>\n\n\n\n<p>Progress on Numbas has continued fairly quietly, while I&#8217;ve had to split my attention between this, Chirun, and other stuff at Newcastle.<\/p>\n\n\n\n<p>I gave a talk at EAMS 2023 with an update on developments over the last year:<\/p>\n\n\n\n<figure class=\"wp-block-embed is-type-video is-provider-youtube wp-block-embed-youtube wp-embed-aspect-16-9 wp-has-aspect-ratio\"><div class=\"wp-block-embed__wrapper\">\n<iframe loading=\"lazy\" title=\"Numbas development update 2023\" width=\"500\" height=\"281\" src=\"https:\/\/www.youtube.com\/embed\/gxFrP1cG7ik?feature=oembed\" frameborder=\"0\" allow=\"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share\" allowfullscreen><\/iframe>\n<\/div><\/figure>\n\n\n\n<!--more-->\n\n\n\n<h2 class=\"wp-block-heading\">Numbas runtime<\/h2>\n\n\n\n<p>I&#8217;ve tagged <a href=\"https:\/\/github.com\/numbas\/Numbas\/releases\/tag\/v7.1\">v7.1 of the Numbas runtime on GitHub<\/a>.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Spreadsheets extension<\/h3>\n\n\n\n<p>I&#8217;ve written an extension which adds a data type and functions for working with, displaying and editing spreadsheets, or tables of data.<\/p>\n\n\n\n<figure class=\"wp-block-video\"><video autoplay loop muted src=\"https:\/\/www.numbas.org.uk\/wp-content\/uploads\/2023\/06\/spreadsheet.mp4\" playsinline><\/video><\/figure>\n\n\n\n<p>I was motivated to write this extension by my colleague Chris Pearson from the school of engineering, who has written questions where students have to fill in a replica of a levelling table, implemented as a gap-fill with hundreds of gaps. <\/p>\n\n\n\n<p>Those questions are not pleasant to work with, so I thought that we needed a better way of dealing with spreadsheet-like tables.<\/p>\n\n\n\n<p>With the spreadsheets extension, you can upload a .xlsx file from Excel into a question variable definition, and then fill it in or change the styling of cells using JME functions. You can display static spreadsheets to the student, but more excitingly there&#8217;s a &#8220;Spreadsheet&#8221; custom part type where you give the student a spreadsheet to fill in and can mark their answers.<\/p>\n\n\n\n<p>I can see this extension being really useful for courses outside the pure maths topics that Numbas has typically been best at. Tables are a really common way of working with data!<\/p>\n\n\n\n<p>I&#8217;ve <a href=\"https:\/\/numbas.mathcentre.ac.uk\/exam\/32338\/spreadsheets-extension\/\">made an exam with a few demo questions<\/a>.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Improvements to the printable worksheet theme<\/h3>\n\n\n\n<p>Laura and I spent some time rejigging the &#8220;printable worksheet&#8221; theme. It hadn&#8217;t had much attention since I first wrote it over a decade ago. We made the interface a bit tidier and easier to understand, and added some features.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" width=\"1024\" height=\"500\" src=\"https:\/\/www.numbas.org.uk\/wp-content\/uploads\/2023\/07\/worksheet-1024x500.png\" alt=\"Screenshot of the printed worksheet theme, showing a sidebar with form controls and a rendering of the printed worksheet to the right.\" class=\"wp-image-2049\" srcset=\"https:\/\/www.numbas.org.uk\/wp-content\/uploads\/2023\/07\/worksheet-1024x500.png 1024w, https:\/\/www.numbas.org.uk\/wp-content\/uploads\/2023\/07\/worksheet-300x146.png 300w, https:\/\/www.numbas.org.uk\/wp-content\/uploads\/2023\/07\/worksheet-768x375.png 768w, https:\/\/www.numbas.org.uk\/wp-content\/uploads\/2023\/07\/worksheet-1536x750.png 1536w, https:\/\/www.numbas.org.uk\/wp-content\/uploads\/2023\/07\/worksheet-600x293.png 600w, https:\/\/www.numbas.org.uk\/wp-content\/uploads\/2023\/07\/worksheet.png 1846w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><figcaption class=\"wp-element-caption\">The new printable worksheet theme<\/figcaption><\/figure>\n\n\n\n<p>You can now choose to show question content on the answer sheet. This is useful for questions with parts that have expected answers, so you don&#8217;t have to repeat the expected answer in the Advice section.<\/p>\n\n\n\n<p>There are controls for the page margins, and all the display options from the default theme are there, which should help students who need bigger text or a particular colour combination.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Handling more Unicode characters<\/h3>\n\n\n\n<p>Over the years we&#8217;ve had sporadic reports of students writing unusual characters in answer boxes, causing errors when Numbas can&#8217;t interpret them.<\/p>\n\n\n\n<p>Usually this is because the student&#8217;s keyboard layout isn&#8217;t the standard UK one we work with, and it produces variants of characters such as carets, brackets and dashes that are more appropriate for the student&#8217;s home language.<\/p>\n\n\n\n<p>The other main cause of input errors was when students would copy a mathematical symbol either from a LaTeX rendering in a content area, or by searching for the symbol because they don&#8217;t know how to type the name that Numbas understands.<\/p>\n\n\n\n<p>Text in a web browser is encoded using Unicode, the universal standard for representing writing digitally. Unicode is enormous: at the moment it contains 149,186 characters, representing all sorts of glyphs such as letters, symbols, ideograms, punctuation, and emoji. <\/p>\n\n\n\n<p>So I&#8217;d been putting off really tackling this issue properly. I&#8217;ve added in support for various Unicode characters as they come to our attention, but I&#8217;d prefer to get ahead of the game and anticipate the kinds of characters that might come up.<\/p>\n\n\n\n<p>I noticed that <a href=\"https:\/\/github.com\/maths\/moodle-qtype_stack\/issues\/860\">the STACK people were having the same sorts of problems<\/a>, so I decided it would be worthwhile to spend a few days looking very closely at the mathematical parts of Unicode, and working out how to map them onto the existing syntax recognised by our two systems.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" width=\"356\" height=\"664\" src=\"https:\/\/www.numbas.org.uk\/wp-content\/uploads\/2023\/07\/Screenshot-2023-07-06-at-08-46-10-unicode-math\u2026-JupyterLab.png\" alt=\"A table with two columns, listing English names for mathematical symbols such as &quot;DIVIDES&quot; and &quot;TRIPLE INTEGRAL&quot; and renderings of the symbols.\" class=\"wp-image-2052\" srcset=\"https:\/\/www.numbas.org.uk\/wp-content\/uploads\/2023\/07\/Screenshot-2023-07-06-at-08-46-10-unicode-math\u2026-JupyterLab.png 356w, https:\/\/www.numbas.org.uk\/wp-content\/uploads\/2023\/07\/Screenshot-2023-07-06-at-08-46-10-unicode-math\u2026-JupyterLab-161x300.png 161w\" sizes=\"(max-width: 356px) 100vw, 356px\" \/><figcaption class=\"wp-element-caption\">Some of the many mathematical symbols in Unicode.<\/figcaption><\/figure>\n\n\n\n<p>I wrote some Python code to help me work through each category of Unicode characters. There&#8217;s a standard algorithm for normalising characters onto a subset of the whole: this deals with most sets of characters that are just minor variations on a more common character, but it&#8217;s not completely consistent. For the remaining characters, I had to look through each of them and decide how they should be interpreted.<\/p>\n\n\n\n<p>My code, and the tables of character mappings, are available in the <a href=\"https:\/\/github.com\/numbas\/unicode-math-normalization\">Unicode math normalization project<\/a>. The mappings have been integrated into Numbas&#8217;s JME system, so you can write expressions like <code>\u221a\u276a3\u00b2 + 4\u00b2\u276b<\/code> and Numbas knows what to do.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Offline attempt analysis<\/h3>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" width=\"1024\" height=\"521\" src=\"https:\/\/www.numbas.org.uk\/wp-content\/uploads\/2023\/07\/analysis-results-1024x521.png\" alt=\"\" class=\"wp-image-2054\" srcset=\"https:\/\/www.numbas.org.uk\/wp-content\/uploads\/2023\/07\/analysis-results-1024x521.png 1024w, https:\/\/www.numbas.org.uk\/wp-content\/uploads\/2023\/07\/analysis-results-300x153.png 300w, https:\/\/www.numbas.org.uk\/wp-content\/uploads\/2023\/07\/analysis-results-768x391.png 768w, https:\/\/www.numbas.org.uk\/wp-content\/uploads\/2023\/07\/analysis-results-1536x781.png 1536w, https:\/\/www.numbas.org.uk\/wp-content\/uploads\/2023\/07\/analysis-results-600x305.png 600w, https:\/\/www.numbas.org.uk\/wp-content\/uploads\/2023\/07\/analysis-results.png 1846w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><figcaption class=\"wp-element-caption\">The offline analysis tool<\/figcaption><\/figure>\n\n\n\n<p>Laura has added a system for generating a file containing all the data for an attempt, that a student can download once they&#8217;ve finished an exam. There&#8217;s a tool included in the exam package (and available through the editor) that can load these files, and show you a table of results for a whole class of students.<\/p>\n\n\n\n<p>The motivation for this feature is to support teachers, usually in secondary schools, who don&#8217;t have access to a proper virtual learning environment but would like to use students&#8217; scores on Numbas tests as part of their assessment.<\/p>\n\n\n\n<p>There&#8217;s <a href=\"https:\/\/docs.numbas.org.uk\/en\/latest\/tutorials\/deliver-to-students.html#obtaining-students-results-without-a-vle\">some info in the documentation on how to use this<\/a>.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Other changes<\/h3>\n\n\n\n<h4 class=\"wp-block-heading\">Enhancements<\/h4>\n\n\n\n<ul>\n<li>Matrix and vector values can have complex number entries. (<a href=\"https:\/\/github.com\/numbas\/Numbas\/commit\/50ddaba74f04f855ed2953c17f79bc318eaaf77d\">code<\/a>)<\/li>\n\n\n\n<li>You can now give a generic message to show at the end of the exam. (<a href=\"https:\/\/docs.numbas.org.uk\/en\/latest\/exam\/reference.html#term-End-message\">documentation<\/a>)<\/li>\n\n\n\n<li>There are new JME functions <code><a href=\"https:\/\/docs.numbas.org.uk\/en\/latest\/jme-reference.html#lu_decomposition\">lu_decomposition<\/a><\/code>, <code><a href=\"https:\/\/docs.numbas.org.uk\/en\/latest\/jme-reference.html#gauss_jordan_elimination\">gauss_jordan_elimination<\/a><\/code> and <code><a href=\"https:\/\/docs.numbas.org.uk\/en\/latest\/jme-reference.html#inverse\">inverse<\/a><\/code> for the common matrix operations.<\/li>\n\n\n\n<li>There&#8217;s now dedicated code to make substitutions into JME expressions, instead of using the generic string substitution. (<a href=\"https:\/\/github.com\/numbas\/Numbas\/issues\/971\">issue<\/a>)<\/li>\n\n\n\n<li>When rendering negative number tokens to JME, they&#8217;re bracketed as if they&#8217;re a unary minus operator applied to a positive number. (<a href=\"https:\/\/github.com\/numbas\/Numbas\/commit\/8d26aea25c5a9368a933e9c6d2a11a8248ce324d\">code<\/a>)<\/li>\n\n\n\n<li>Added some unit tests for pre-submit tasks. (<a href=\"https:\/\/github.com\/numbas\/Numbas\/commit\/2a99f4abc7290c30aa0f0307496ab6b65d7b7480\">code<\/a>)<\/li>\n\n\n\n<li>If <code>Numbas.load_pre_submit_cache<\/code> is <code>false<\/code>, then cached results for pre-submit tasks aren&#8217;t used. This is used by the LTI provider. (<a href=\"https:\/\/github.com\/numbas\/numbas-lti-provider\/issues\/265\">issue<\/a>)<\/li>\n\n\n\n<li>Taking an <code>integer<\/code> value to the power of a <code>decimal<\/code> value produces a <code>decimal<\/code> value instead of a less-precise <code>number<\/code>. (<a href=\"https:\/\/github.com\/numbas\/Numbas\/issues\/978\">issue<\/a>)<\/li>\n\n\n\n<li>Leaving the &#8220;maximum marks&#8221; field for a part empty is equivalent to setting it to zero. (<a href=\"https:\/\/github.com\/numbas\/Numbas\/issues\/979\">issue<\/a>)<\/li>\n\n\n\n<li>You get a &#8220;correct answer is missing&#8221; error when the &#8220;expected answer&#8221; field for a mathematical expression part is empty, instead of a cryptic code trace. (<a href=\"https:\/\/github.com\/numbas\/Numbas\/issues\/977\">issue<\/a>)<\/li>\n\n\n\n<li>When reviewing an attempt, you&#8217;re always able to move to any question, regardless of the &#8220;Allow move to previous question?&#8221; exam setting. (<a href=\"https:\/\/github.com\/numbas\/Numbas\/issues\/966\">issue<\/a>)<\/li>\n\n\n\n<li>In &#8220;match choices with answers&#8221; parts, clicking anywhere in the cell corresponding to a choice selects that choice. (<a href=\"https:\/\/github.com\/numbas\/Numbas\/issues\/965\">issue<\/a>)<\/li>\n\n\n\n<li>When the answer input box for a gap would be too wide, a scrollbar is shown. (<a href=\"https:\/\/github.com\/numbas\/Numbas\/issues\/958\">issue<\/a>)<\/li>\n\n\n\n<li>Variables are substituted into the alt text for images without requiring the <code>eval-alt<\/code> attribute. (<a href=\"https:\/\/github.com\/numbas\/Numbas\/issues\/922\">issue<\/a>)<\/li>\n\n\n\n<li>If the question author doesn&#8217;t give TeX code for a custom constant, its name is used. (<a href=\"https:\/\/github.com\/numbas\/Numbas\/issues\/915\">issue<\/a>)<\/li>\n\n\n\n<li>Christian Arteaga updated the Spanish translation. Thanks!<\/li>\n\n\n\n<li>There&#8217;s a new JME function <code>with_precision<\/code> which adds precision information to a number value. (This is added automatically by functions like <code>precround<\/code> and <code>siground<\/code>). (<a href=\"https:\/\/docs.numbas.org.uk\/en\/latest\/jme-reference.html#with_precision\">documentation<\/a>)<\/li>\n\n\n\n<li>In JavaScript, the version of the Numbas runtime is stored in <code>Numbas.version<\/code>. (<a href=\"https:\/\/github.com\/numbas\/Numbas\/commit\/b2c34a6cab8801f68af02bdd30abc6710d7c699a\">code<\/a>)<\/li>\n\n\n\n<li>The <code>trunc<\/code> function can now take an optional number of decimal places to truncate to. Thanks to Anurag Raut. (<a href=\"https:\/\/github.com\/numbas\/Numbas\/issues\/1008\">issue<\/a>, <a href=\"https:\/\/docs.numbas.org.uk\/en\/latest\/jme-reference.html#trunc\">documentation<\/a>)<\/li>\n\n\n\n<li>In JavaScript, the <code>value<\/code> attribute of a <code>THTML<\/code> token is a plain array instead of a jQuery object. (<a href=\"https:\/\/github.com\/numbas\/Numbas\/commit\/b0c1a64d5d145f3e52e1e86b35a4ba107a65581e\">code<\/a>)<\/li>\n\n\n\n<li>The expression <code>root(x,2)<\/code> is rendered to LaTeX in the same way as <code>sqrt(x)<\/code>. (<a href=\"https:\/\/github.com\/numbas\/Numbas\/issues\/1004\">issue<\/a>)<\/li>\n\n\n\n<li>When the gaps in a gap-fill part have different types, the &#8220;sort student&#8217;s answers before marking?&#8221; option is ignored. (<a href=\"https:\/\/github.com\/numbas\/Numbas\/issues\/992\">issue<\/a>)<\/li>\n\n\n\n<li>Questions containing only &#8220;information only&#8221; parts don&#8217;t count towards the number of questions shown on the front page. (<a href=\"https:\/\/github.com\/numbas\/Numbas\/issues\/991\">issue<\/a>)<\/li>\n\n\n\n<li>In &#8220;sequence&#8221; mode exams, there&#8217;s now a link on the sidebar to view the exam introduction again. (<a href=\"https:\/\/github.com\/numbas\/Numbas\/issues\/990\">issue<\/a>)<\/li>\n\n\n\n<li>The code repository now contains a settings file for the &#8220;<a href=\"https:\/\/somethingorotherwhatever.com\/can-i-also-use\/\">Can I also use?<\/a>&#8221; tool, documenting browser features used by Numbas with the default theme. (<a href=\"https:\/\/github.com\/numbas\/Numbas\/commit\/993347c04addf9712924dc7d9aa7ffac793b1dbe\">code<\/a>)<\/li>\n\n\n\n<li>Strings produced by the <code>currency<\/code> function are marked as valid LaTeX, and dollar signs in rendered LaTeX are escaped. (<a href=\"https:\/\/github.com\/numbas\/Numbas\/commit\/9628569ce6dcd55bff6be80362e31b7eb40d3550\">code<\/a>)<\/li>\n\n\n\n<li>There is now a &#8220;pipe&#8221; operator <code>|&gt;<\/code> which you can use to chain a series of transformations of a single value. (<a href=\"https:\/\/docs.numbas.org.uk\/en\/latest\/jme-reference.html#pipe\">documentation<\/a>)<\/li>\n\n\n\n<li>In the mathematical expression part&#8217;s marking algorithm, the <code>formula_type<\/code> note is <code>\"number\"<\/code> by default, if automatic inference fails. (<a href=\"https:\/\/github.com\/numbas\/Numbas\/commit\/17bb7215757571f9fa56fa0ebbd7493bcbbffee8\">code<\/a>)<\/li>\n\n\n\n<li>The function <code>transpose<\/code> now works on lists of lists. (<a href=\"https:\/\/github.com\/numbas\/Numbas\/commit\/6d039949bb84634c467c2d2744f34afc8592973d\">code<\/a>, <a href=\"https:\/\/docs.numbas.org.uk\/en\/latest\/jme-reference.html#transpose\">documentation<\/a>)<\/li>\n<\/ul>\n\n\n\n<h4 class=\"wp-block-heading\">Bug fixes<\/h4>\n\n\n\n<ul>\n<li>Fixed a bug with custom JavaScript functions so they have access to environment variables such as <code>question<\/code>. (<a href=\"https:\/\/github.com\/numbas\/Numbas\/commit\/5b187bec4f8e6386a5bf9579e945a73a61b08885\">code<\/a>)<\/li>\n\n\n\n<li>The attempt resume process doesn&#8217;t try to load deterministic variables. (<a href=\"https:\/\/github.com\/numbas\/Numbas\/commit\/0260c62b8856501d325359cab6082ccfd6c32bfc\">code<\/a>)<\/li>\n\n\n\n<li>Fixed a bug where variables with names containing capital letters weren&#8217;t saved. (<a href=\"https:\/\/github.com\/numbas\/Numbas\/commit\/9fb794bb8554913b77a59fe708baded923af4759\">code<\/a>)<\/li>\n\n\n\n<li>Fixed the definition of the <code>random_integer_partition<\/code> function. (<a href=\"https:\/\/github.com\/numbas\/Numbas\/issues\/976\">code<\/a>)<\/li>\n\n\n\n<li>Fixed a bug with bracketing operators during rendering to JME. (<a href=\"https:\/\/github.com\/numbas\/Numbas\/issues\/975\">issue<\/a>)<\/li>\n\n\n\n<li>Question variable definitions are always converted to a string. (<a href=\"https:\/\/github.com\/numbas\/Numbas\/commit\/1d91a5b453101ed52357e3b8ff762309162dbe44\">code<\/a>)<\/li>\n\n\n\n<li>Questions with custom constants don&#8217;t restore variables until the constants have been defined. (<a href=\"https:\/\/github.com\/numbas\/Numbas\/issues\/980\">issue<\/a>)<\/li>\n\n\n\n<li>When the &#8220;number&#8221; answer input widget&#8217;s value is a fraction, it isn&#8217;t run through the decimal number cleaning routine. (<a href=\"https:\/\/github.com\/numbas\/Numbas\/commit\/fa4f7b200c6712ff27501f0ead48a09a26f908ef\">code<\/a>)<\/li>\n\n\n\n<li>Fixed a typo in <code><a href=\"https:\/\/github.com\/numbas\/Numbas\/commit\/5358d69378d2346ea862519f9f84fc303eca034b\">Numbas.jme.enumerate_signatures<\/a><\/code>.<\/li>\n\n\n\n<li>Disabled answer widgets never report changes. (<a href=\"https:\/\/github.com\/numbas\/Numbas\/commit\/33acdb18dd90c4622c0bf063a250946d2acc71f7\">code<\/a>)<\/li>\n\n\n\n<li>When converting a range to a list, the <code>decimal<\/code> data type is used so that rounding errors aren&#8217;t introduced. (<a href=\"https:\/\/github.com\/numbas\/Numbas\/issues\/989\">issue<\/a>)<\/li>\n\n\n\n<li>The precision of a number-valued question variable is now saved correctly. (<a href=\"https:\/\/github.com\/numbas\/Numbas\/issues\/988\">issue<\/a>)<\/li>\n\n\n\n<li>In a diagnostic-mode exam. the &#8220;after exam ended&#8221; note is not re-evaluated on resuming the attempt. (<a href=\"https:\/\/github.com\/numbas\/Numbas\/issues\/999\">issue<\/a>)<\/li>\n\n\n\n<li>Fixed slicing a matrix by a range. (<a href=\"https:\/\/github.com\/numbas\/Numbas\/issues\/1003\">issue<\/a>)<\/li>\n\n\n\n<li>The printed worksheet theme no longer prints the names of extensions used at the end of each question. (<a href=\"https:\/\/github.com\/numbas\/Numbas\/issues\/1006\">issue<\/a>)<\/li>\n\n\n\n<li>The default theme no longer overrides browser default outlines for focused elements. (<a href=\"https:\/\/github.com\/numbas\/Numbas\/commit\/0a6c441a8c7bfeb226b8c1f34e40f3dff22bffab\">code<\/a>)<\/li>\n\n\n\n<li>Fixed the definition of exponentiation in <code>decimal<\/code> values when the base is a negative real number. (<a href=\"https:\/\/github.com\/numbas\/Numbas\/issues\/1012\">issue<\/a>)<\/li>\n\n\n\n<li>When working out the number of elements in a range, some floating-point error is tolerated. (<a href=\"https:\/\/github.com\/numbas\/Numbas\/commit\/38d7e2f453c80d4acd5e0e68b5863f004adc915e\">code<\/a>)<\/li>\n\n\n\n<li>The value definition for a custom constant is always converted to a string. (<a href=\"https:\/\/github.com\/numbas\/Numbas\/commit\/87698360bc952e53924356188f454bf86f20f680\">code<\/a>)<\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\">Extensions<\/h3>\n\n\n\n<ul>\n<li>Updated to v1.5.0 of the JSXGraph library. (<a href=\"https:\/\/github.com\/numbas\/numbas-extension-jsxgraph\/commit\/82bdc4e9cfdcc3062b8b67d8c96c3a23c15c30e7\">code<\/a>)<\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\">Numbas editor<\/h2>\n\n\n\n<p>I&#8217;ve tagged <a href=\"https:\/\/github.com\/numbas\/editor\/releases\/tag\/v7.1\">v7.1 of the Numbas editor on GitHub<\/a>.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Custom variable templates in the variable editor<\/h3>\n\n\n\n<p>In order to make working with spreadsheets straightforward, I needed a way of uploading a .xlsx file to the question editor and using it with question variables.<\/p>\n\n\n\n<p>I&#8217;ve added an API for extensions to register new variable template types. This lets you present an interactive component to the question author, and generate a corresponding JME variable definition.<\/p>\n\n\n\n<p>I can see this being useful for other extensions; there could be an interactive tool to draw diagrams, for example. See the <a href=\"https:\/\/docs.numbas.org.uk\/en\/latest\/extensions\/writing-extensions.html#adding-a-new-variable-template-type\">documentation<\/a> for more info.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Other changes<\/h3>\n\n\n\n<h4 class=\"wp-block-heading\">Enhancements<\/h4>\n\n\n\n<ul>\n<li>Any variable type that can be converted to HTML causes the warning about HTML nodes to be shown in the variable editor. (<a href=\"https:\/\/github.com\/numbas\/editor\/commit\/047ef634292ab81a79a684e58b66fb82259a32f9\">code<\/a>, <a href=\"https:\/\/github.com\/numbas\/numbas-extension-jsxgraph\/issues\/3\">issue<\/a>)<\/li>\n\n\n\n<li>Accounts can have a permission <code>editor.view_everything<\/code> which gives them read access to everything in the database. (<a href=\"https:\/\/github.com\/numbas\/editor\/commit\/3d703c2ab575f45b0c725be4257366bb6776d48a\">code<\/a>)<\/li>\n\n\n\n<li>Thanks to Maanas Arora, when matrix or vector values are displayed, they&#8217;re shown as &#8220;Matrix\/Vector of N items&#8221; instead of &#8220;List of N items&#8221;. (<a href=\"https:\/\/github.com\/numbas\/editor\/issues\/751\">issue<\/a>)<\/li>\n\n\n\n<li>Again thanks to Maanas Arora, the first setup form fills in the &#8220;Python executable field&#8221; automatically. (<a href=\"https:\/\/github.com\/numbas\/editor\/issues\/760\">issue<\/a>)<\/li>\n\n\n\n<li>The URL <code>\/.well-known\/change-password<\/code> is now supported. (<a href=\"https:\/\/github.com\/numbas\/editor\/commit\/3b598cdec0a8247b16566dd4f1864324891921d4\">code<\/a>, <a href=\"https:\/\/web.dev\/change-password-url\/\">info on this well-known URL<\/a>)<\/li>\n\n\n\n<li>In the part testing tab, the feedback area adds a scrollbar when messages are too wide. (<a href=\"https:\/\/github.com\/numbas\/editor\/issues\/764\">issue<\/a>)<\/li>\n\n\n\n<li>If you upload a zip file whose contents are wrapped in a container directory, the container is unwrapped. This allows you to upload zip files of extensions directly from GitHub. (<a href=\"https:\/\/github.com\/numbas\/editor\/issues\/770\">issue<\/a>)<\/li>\n\n\n\n<li>Laura wrote some documentation about how to use the Django admin interface to manage extensions. (<a href=\"https:\/\/github.com\/numbas\/editor\/pull\/772\">issue<\/a>, <a href=\"https:\/\/docs.numbas.org.uk\/en\/latest\/admin\/admin-interface.html\">documentation<\/a>)<\/li>\n\n\n\n<li>On the editor item preview page, you can create a link to open the item in the Numbas lockdown app, after you specify a password. (<a href=\"https:\/\/github.com\/numbas\/editor\/commit\/a87dc6f56dd213c8f3c0b95b191bc1de587453ca\">code<\/a>, <a href=\"https:\/\/docs.numbas.org.uk\/en\/latest\/tutorials\/deliver-to-students.html#direct-link-via-the-numbas-editor\">documentation<\/a>)<\/li>\n\n\n\n<li>The logic to deactivate a user account has been moved to a function, <code>accounts.models.deactivate_user<\/code>, which can be used from the Python shell or scripts. (<a href=\"https:\/\/github.com\/numbas\/editor\/commit\/cb51e2f16dcfc1e1fe77215783beb39883769a9f\">code<\/a>)<\/li>\n\n\n\n<li>The Testing tab for an Extension part renders the part&#8217;s prompt so that you can interact with it and submit an answer. (<a href=\"https:\/\/github.com\/numbas\/editor\/issues\/776\">issue<\/a>)<\/li>\n<\/ul>\n\n\n\n<h4 class=\"wp-block-heading\">Bug fixes<\/h4>\n\n\n\n<ul>\n<li>Fixed detection of AJAX requests following a change in Django. (<a href=\"https:\/\/github.com\/numbas\/editor\/commit\/820dffe920bdaae093740f350e5cfa8a78fb1ae0\">code<\/a>)<\/li>\n\n\n\n<li>Fixed a typo in the method to delete a folder in a project. (<a href=\"https:\/\/github.com\/numbas\/editor\/commit\/ec71ac43ccc81b30fb84bfdb49aac03cd15fc0a2\">code<\/a>)<\/li>\n\n\n\n<li>When showing the dimensions of a matrix, the <code>.rows<\/code> and <code>.columns<\/code> attributes are used instead of looking at the underlying list objects. (<a href=\"https:\/\/github.com\/numbas\/editor\/commit\/4493ef2445475ec7c06575eff58af358512c3eaa\">code<\/a>)<\/li>\n\n\n\n<li>CSS stylesheets provided by extensions are loaded in the question editor. (<a href=\"https:\/\/github.com\/numbas\/editor\/commit\/c19575bb63186d901b5890aae6897101806a28d7\">code<\/a>)<\/li>\n\n\n\n<li>Fixed a bug that caused the custom part type editor to make a save request as soon as it loads. (<a href=\"https:\/\/github.com\/numbas\/editor\/commit\/f08de5cfa766dd40898dc3588b4e8ea5621ce74b\">code<\/a>)<\/li>\n\n\n\n<li>The variable <code>part_path<\/code>, defined in marking scripts, is recognised as an existing variable by the reference finder. (<a href=\"https:\/\/github.com\/numbas\/editor\/commit\/5229b35c842dcc63cac4cbf00b74b62f0ed7d5d0\">code<\/a>)<\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"lti-provider\">Numbas LTI provider<\/h2>\n\n\n\n<p>I&#8217;ve tagged <a href=\"https:\/\/github.com\/numbas\/numbas-lti-provider\/releases\/tag\/v3.3\">v3.3 of the Numbas LTI provider<\/a>.<\/p>\n\n\n\n<p>There&#8217;s hardly been any activity on the Numbas LTI provider lately. It&#8217;s running smoothly!<\/p>\n\n\n\n<p>In the medium term we&#8217;ll need to add support for LTI 1.3 Advantage, as LMSes drop support for LTI 1.1. I expect this to be quite complicated, but I&#8217;ve got my head round LTI 1.3 by rewriting the Chirun LTI tool, so I know what I&#8217;m doing, at least.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Enhancements<\/h3>\n\n\n\n<ul>\n<li>The Docker setup now has settings for configuring how email is sent. (<a href=\"https:\/\/github.com\/numbas\/numbas-lti-provider-docker\/commit\/ac5d0f0705553fa497cb3d63c44d8171733532a9\">code<\/a>)<\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\">Bug fixes<\/h3>\n\n\n\n<ul>\n<li>The pre-submit cache is cleared before re-marking question parts, so that they&#8217;re really re-evaluated. (<a href=\"https:\/\/github.com\/numbas\/numbas-lti-provider\/issues\/265\">issue<\/a>)<\/li>\n\n\n\n<li>The Docker setup always restarts the postgres, redis and nginx containers automatically. (<a href=\"https:\/\/github.com\/numbas\/numbas-lti-provider-docker\/commit\/21ce3d8e77393164f2a8a1819b2bd2505e82c070\">code<\/a>)<\/li>\n\n\n\n<li>The maximum length for the <code>lis_result_sourcedid<\/code> and <code>lis_person_sourcedid<\/code> LTI parameters has been increased. (<a href=\"https:\/\/github.com\/numbas\/numbas-lti-provider\/commit\/3aedba4e129acf30e26ee89b9a7b07cbc63fac8c\">code<\/a>)<\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>Here&#8217;s a development update, covering everything since the release of Numbas v7 last December. Progress on Numbas has continued fairly quietly, while I&#8217;ve had to split my attention between this, Chirun, and other stuff at Newcastle. I gave a talk at EAMS 2023 with an update on developments over the last year:<\/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\/2039"}],"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=2039"}],"version-history":[{"count":15,"href":"https:\/\/www.numbas.org.uk\/theme-testing\/wp-json\/wp\/v2\/posts\/2039\/revisions"}],"predecessor-version":[{"id":2077,"href":"https:\/\/www.numbas.org.uk\/theme-testing\/wp-json\/wp\/v2\/posts\/2039\/revisions\/2077"}],"wp:attachment":[{"href":"https:\/\/www.numbas.org.uk\/theme-testing\/wp-json\/wp\/v2\/media?parent=2039"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.numbas.org.uk\/theme-testing\/wp-json\/wp\/v2\/categories?post=2039"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.numbas.org.uk\/theme-testing\/wp-json\/wp\/v2\/tags?post=2039"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}