Coder Social home page Coder Social logo

numbas-extension-geogebra'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.

numbas-extension-geogebra's People

Contributors

christianp avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

numbas-extension-geogebra's Issues

Error on iPads

This question produces an error:

Problem encountered when creating GeoGebra applet: TypeError: undefined is not an object (evaluating 'a.length')

Cannot create points in 3d/ with three coordinates

When trying to create a point in the 3d-view, ['A',vector(1,2,3)] does not seem to work as intendes, it seems to only pass the x- and y-coordinate, z-coordinate will always be zero, even when using redefinitions like ['A: B'], where B=(1,2,3) still results in A=(1,2,0).

[Enhancement] Documentation/demos should probably cover some more use-cases in the future

Firstly, let me say that I really admire the work you have done with Numbas and this extension in particular.
Reading both the Numbas documentation and the readme provided here, it took me quite some time to figure out some things I think would justify an inclusion somewhere in the documentation:

  1. I struggled to find out where I can actually set the amount of marks for a question of the type extension (because these lack the "Marking settings"-option). We can use set_credits() under "Marking algorithm" in our custom marking algorithm, but I found no way to comfortably set the marks-parameter itself. What I did was include this.marks=4 in the "When the part is created" field under "Scripts" -- which works just fine but is a bit oblique/should be documented somewhere.
  2. As far as I can tell, none of the demos provided here cover the creation of new objects by the students, which was something I needed in my example and for which I had to figure out how to use the exists( )-function properly. Maybe one such example should be included as well? (I ended up using something similiar to if(exists(app,"f")=true,if(definition_string(app,"f")=f_correct, ...), ...); - which works if you know what the name of the next object that will be created by the user is (in this case f). I still have not figured out how to do it without knowing that.

Suspend/resume code doesn't handle the ggbapplet data type variables correctly.

Resuming a paused exam gives:

Numbas has failed
Sorry, Numbas has encountered an error which means it can't continue. Below is a description of the error.
Numbas Error: Error loading question 2: Variable geogebra is not defined.

Steps to reproduce.

  1. Make an exam which uses a question that has a ggbapplet variable, for example: Christian's https://numbas.mathcentre.ac.uk/question/68262/mark-a-part-as-correct-if-the-student-moves-a-point-to-the-right-position/
  2. Download exam package as zip.
  3. In Blackboard, create an assignment / open Numbas LTI provider.
  4. In Settings, replace/upload the exam package.
  5. In Blackboard, switch to student view.
  6. As student, click on the assignment and start an attempt.
  7. As student, pause exam and close the 'Paused' window.
  8. As student, in Blackboard, click on the assignment to open Numbas LTI provider.
  9. As student, click on 'Continue' button to continue previous attempt.
  10. Question hangs on loading.

Alternately, the hang also occurs if the instructor tries to review the student's attempt. If the question is rewritten to use the old method of loading the ggbapplet, the question will still hang unless you actually delete the ggbapplet variable.

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.