GithubHelp home page GithubHelp logo

numbas / editor Goto Github PK

View Code? Open in Web Editor NEW
59.0 59.0 62.0 33.02 MB

An editor for the Numbas e-learning system.

Home Page: http://numbas.mathcentre.ac.uk

License: Apache License 2.0

Python 15.35% CSS 1.36% HTML 15.37% JavaScript 62.16% Makefile 0.27% Less 5.50%
algebra assessment django e-assessment editor education javascript math newcastle-university numbas python up-for-grabs

editor's Introduction

Numbas logo

Numbas is an open-source system for creating tests which run entirely in the browser. It has been developed by Newcastle University's School of Mathematics, Statistics and Physics.

For more information about Numbas and what it does, see our website at numbas.org.uk.

How to use Numbas

Documentation for Numbas users is at numbas-editor.readthedocs.org.

Installation

This repository contains the Numbas compiler, which runs as standalone Python 3, but the most convenient way to use Numbas is through the web-based editor.

A publicly-available editor, requiring no set-up, is available at numbas.mathcentre.ac.uk. Or, you can follow our instructions for Windows, Mac, or Ubuntu to install your own instance.

If you decide to run your own installation, install the compiler's dependencies with pip install -r requirements.txt.

This repository is just one part of the Numbas ecosystem. See the numbas organisation for the other pieces, including the web-based editor, extensions, and VLE integrations.

Contributing to Numbas

Numbas is open source, and we welcome contributions of any sort. Bug reports or feature suggestions can be added to the GitHub issue tracker, or emailed to [email protected].

See our page on contributing to Numbas for more information on how you can help.

We keep a list of tasks specifically for new contributors, under the good-first-issue label. There's a corresponding list in the editor repository, too. These tasks should be fairly straightforward to implement without much knowledge of how all the code fits together.

Development

This tool runs on the command line: run python bin/numbas.py to see the options. You can give it the name of a .exam file or pipe one in.

When making changes to the JavaScript runtime, it's a good idea to run the unit tests in the tests directory. These can run in a browser, or on the command-line.


Running tests in a browser

Start a local web server with python -m http.server and go to http://localhost:8000/tests. The tests under tests/jme contain tests to do with the JME system, and tests/parts contains tests to do with the part marking algorithms.

Running tests on the command-line

You can run the tests from the command-line using node.js:

Install the dependencies:

cd tests
npm install

Then run the tests with:

npm test

If you make a change, please try to add unit tests to confirm that Numbas behaves as expected.

The Makefile in this repository collects together scripts to run the unit tests, and builds the API documentation. Linux and Mac OS have built-in support Makefiles, but Windows doesn't. On Windows, cygwin provides make.

API documentation for developers is at numbas.github.io/Numbas. This is generated using JSDoc, with a custom template. Run make docs to rebuild the API documentation into ../numbas-docs.

Copyright

Copyright 2011-18 Newcastle University

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

You can see a plain-English explanation of the license and what it allows at tl;drLegal

Copyright in the content produced using Numbas resides with the author.

editor's People

Contributors

akshett avatar andersshenholm avatar anshitabaid avatar anthonyyoud avatar calvinm4 avatar chrismgraham avatar christianp avatar dependabot[bot] avatar dgabrielson avatar georgestagg avatar gerlou avatar helenashton avatar janonbread avatar jastee07 avatar joshuacapel avatar keyboardguy avatar lycanic avatar maanasarora avatar maheshwaran17 avatar mjguru avatar nabeelsait avatar stuwilmur avatar sudiptog81 avatar yannickneyt avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

editor's Issues

Using \eqnarray in context areas

Doesn't give any maths display in rich text input. The first \eqnarray is surrounded by a box, the rest as is.
Similarly for \align.

Maths display in content areas in the editor

Look at MAS1141 CBA1_1
The statement contains latex in display mode. Clicking on this shows the maths display for only part of the latex, although when the question is run the display is fine. The html editor shows no spaces or anything untoward (as far as I am concerned!). This may be an effect of copying and pasting as for example the question further down in this example asks:

Find the unit vector $\boldsymbol{\widehat{C}}$ in the direction of $\boldsymbol{C}$.

The \boldsymbol{ was copied and pasted and immediately this was done the error "Missing close brace" appeared but remained even though the close brace was added.
But on running this also displayed properly.

Adding and deleting Show steps is broken

Tried to add Steps in a question which does not have Steps (MAS1142 CBA1_5) . It did not appear when the question was run. I tried to delete it in the editor and another copy of the Steps appeared! Eventually found myself with 4 copies of now empty Steps. (Not quite sure how the content was removed!)

Display on entering exponentials with negative powers in answers. Also expressions starting with negative fractions.

Entering e^(cx) for a negative c in an answer results in a display with brackets around the c, whereas other displays in content areas do not have the brackets. See MAS1041CBA3_2. This also occurs with the revealed answer.

On entering an expression which starts with a negative fraction e.g. -3/4e^x-7/4x^4 then the first negative fraction is not displayed nicely, whereas the second one is. An issue with the negative as a unary operator?

The html editor for content areas

When clicked on you sometimes get very small edit windows, or very narrow edit windows or quite rarely, well proportioned windows.

Error in answer expression parsing on revealing

From MAS1041CBA3_8 answer expression for second question.

(-({a}_x+{b})^2/{c})_cos({c}_x+{d}) gives, for example, (-(2x+7))^2_cos(3x+4) on revealing. Clearly wrong.
I have had to write as
-(({a}_x+{b})^2/{c})_cos({c}*x+{d}) in order to get the correct expression

Error message on code which runs

See advice in MAS1041CBA3_5 and in particular the advice for the second question. The cursor on the eqnarray there reports an error although the question compiles and runs. I inserted simplify and displaystyle in various places and this appears to be the reason why the error message appeared in the first place(?)

ruleset not being obeyed

In question MAS1041CBA2_4 the last part has a mathematical expression input as a fraction. Ruleset used is dPoly. But if the fraction has a negative numerator then the display does not follow the rule and gives a nasty display.

Questions in exams: run,delete and copy buttons

Have the buttons for running and copying for each question in the list of questions for an exam (as well as the delete button). This is for purely local purposes in the exam. The copying button would create a reference to the copy of the question into the same exam. It is often the case that you want to use a question for a template for other questions in an exam. Also being able to run a single question within an exam would be useful.

Error message on adding a blank line in an editor content area

If you add a new line in a content area in the editor (but do not type anything in) an error message is generated as follows on attempting to run from the editor.

Error making the preview: Compilation failed. Failed to compile exam Traceback (most recent call last): File "/srv/numbas/dist/bin/exam.py", line 58, in makeContentNode return etree.fromstring(''+s+'') File "/usr/lib/python3.1/xml/etree/ElementTree.py", line 947, in XML parser.feed(text) File "/usr/lib/python3.1/xml/etree/ElementTree.py", line 1224, in feed self._parser.Parse(data, 0) xml.parsers.expat.ExpatError: undefined entity: line 4, column 5 During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/srv/numbas/dist/bin/exam.py", line 273, in tostring xml = self.toxml() File "/srv/numbas/dist/bin/exam.py", line 267, in toxml questions.append(q.toxml()) File "/srv/numbas/dist/bin/exam.py", line 380, in toxml que...............

However, if you type something in that line then no error message and the question runs.

New author's notes section and maths display

On occasion I would use the notes to explain the reason why I chose a particular mode of solution for the question or some other mathematical comment. In that case there would normally be maths in the notes relevant to the question and this should be displayed for the author and for other authorised authors as well. Could Test Run also display the notes?

Themes

Users should be able to

1 - choose a theme to use with an exam

2 - upload themes in .zip format.

Deleting questions and exams not showing the question deletion.

This is an issue for users to be aware of.
Created a copy of a question in an exam and added to it to the same exam. Then clicked on the copy to put it into the question editor and deleted it there using the red button. On accessing the exam by clicking on its tab, the exam list of questions still showed the copy as you need to refresh to show the deletion.

Displaying decimals as fractions when fractionNumber rule turned on

See question Bill2 in the editor. The ruleset std in that question includes the rule fractionNumbers. Although the variables {a}, {b} are set as decimals the question prompt $\simplify[std]{{a}+{b}}$ converts the decimals into fractions. fractionNumbers is meant to take fraction expressions and retain them as fractions, not to convert decimal numbers.

Exam upload

Should uploading an exam also upload any questions defined within that exam?

Variables in the displaying maths part of the help documentation

If you write something like [\int \var{a} y;dy] in the display maths test area of the displaying maths section then very nicely we have a spotted as a variable. However if we write [\int \simplify{{a} y};dy] then not only a is displayed as a variable but y is given as one, which it is not.

Better delete links

Instead of showing a separate form when clicking on Delete, show a JS dialog box of some sort, which POSTs directly to the exam_delete URL. Form could be as in editor/templates/(exam|question)/delete.html.

All of question not displayed in editor.

Several times when bringing, for example, MAS1041CBA2_4, into the editor the last sections of the question are missing. However if I keep on trying this, eventually all of the question is loaded.

Answer fields for mathematical expressions

It is difficult to edit these answer fields and to see if they are correct, other than running the questions and using reveal. The field is to small and there should be a display mode for the answer

Long definition of a variable.

If a variable has a long definition then the definition is shown as a scroll bar in the variables section with no other detail.
For example, variable d1 in MAS1041_20122013_CBA1_1

Deleting an exam

Copied an exam. Then chose to delete the copy. The question about whether or not I really wanted to delete it was referring to a question not the copy's name. So I chickened out as I might have removed all the exams as it looks like a bug.
Created Test exam and a copy. Tried to delete copy, and chose yes , the name of the exam still exists even after refreshing. Get error page on accessing. Tried to delete the original Test. Asked whether or not I wanted to delete a question, not an exam, somehow chosen from the list of questions and not even in the exam. So once again I made my excuses and left.

maths display in content areas with simplify

For example, if
$\simplify[std]{{a}+{b}x} $ is in a content area and is clicked on we get the maths display subvar(a,gray)+subvar(b,gray)x rather than the maths display expected.

Navigation settings for exams

These should all be switched on by default , they are turned off at present, allowing for free navigation and for question regeneration.

Simple editing mode for questions

Only content areas and (selected) variables visible/editable. "Advanced mode" button somewhere on the page switches to the detailed view with everything editable.
Which view users see by default should be a setting.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.