Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Some options for what's shown on the results page #506

Closed
christianp opened this issue Sep 28, 2017 · 4 comments
Closed

Some options for what's shown on the results page #506

christianp opened this issue Sep 28, 2017 · 4 comments

Comments

@christianp
Copy link
Member

Particularly, David Wishart wants the option not to show the questions and advice on the printed version of the results page (they're hidden in the screen stylesheet).

There could be options to show/hide each of the other sections: student info, score breakdown, timing.

@stefpiatek
Copy link

I'd be up for giving this a go, have just set up the local instance so I'll have a toy around if no-one else has started.

@christianp
Copy link
Member Author

Thanks! Let me know if you get stuck.

@christianp
Copy link
Member Author

There are two halves to this:

  • Add the option to the Numbas editor for exam authors.
  • Make the Numbas compiler (this repository) load the option, and act on it when displaying the results.

In the Numbas editor, you'll need to add some settings to the Exam object, and make sure they get saved and loaded.

  • In editor/exam/edit.js, add an object this.results_options = {showquestions: ko.observable(true), showadvice: ko.observable(true)}
  • Make sure those options are loaded and saved by the Exam.load and Exam.toJSON methods
  • Add the options to the exam editor template, inside the Feedback tab.

Then, in this repo:

  • In exam.py, load the options in Exam.fromDATA and produce some corresponding XML in Exam.toxml (yes, it's a bit redundant to have to translate JSON to XML, but there are historical reasons)
  • In runtime/scripts/exam.js, load the options from the XML.
  • Finally, in the default theme, you'll have to do something to question.html and the print stylesheet to only show questions or advice if the corresponding settings are turned on.

@christianp
Copy link
Member Author

Implemented, thanks to @stuwilmur!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants