Including single Numbas questions in websites

33 views
Skip to first unread message

Stephan Boltzmann

unread,
Apr 29, 2024, 3:39:21 PMApr 29
to Numbas Users
Finding the perfect software for cross-format publishing of a math textbook is tricky.
ConTeXt has some nice features, but the support for interactive exercises is very limited.
Numbas is one of the most elaborate tools for interactive exercises, but as far as I can see not intended for cross-format publishing of books.

Is there a way to export a single question with numbas to include it in a website (intended a book)? Simple feedback for the question would be enough (without tracking progress).

Christian Lawson-Perfect

unread,
Apr 30, 2024, 5:05:25 AMApr 30
to numbas...@googlegroups.com
If you're happy to load the Numbas questions from numbas.mathcentre.ac.uk, you can use the "Share" link that you get when you run a question. See the documentation at https://docs.numbas.org.uk/en/latest/tutorials/deliver-to-students.html#direct-link-via-the-numbas-editor.

You can download a copy of a question to package with your book by clicking the Download link in the question editor, and choose "standalone .zip". This contains everything you need to run the question.

To embed the question in a webpage, use an <iframe> tag pointing to the question's index.html file.


I hope that helps!

--
You received this message because you are subscribed to the Google Groups "Numbas Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to numbas-users...@googlegroups.com.
To view this discussion on the web, visit https://groups.google.com/d/msgid/numbas-users/55fae9a4-95e6-40ab-b692-afd5a6f0300dn%40googlegroups.com.

Stephan Boltzmann

unread,
Apr 30, 2024, 5:33:26 AMApr 30
to Numbas Users
Thanks, sharing the link to a question generated in the official editor is a nice solution!

Don Shearman

unread,
Apr 30, 2024, 6:11:41 AMApr 30
to numbas...@googlegroups.com
If you're working from the University of Newcastle Numbas editor, when you "run" a question there is a link to share this question. This is a persistent link which can be used in an iFrame or similar on a web page to allow a user to link to a live version of that question. The same applies to tests. I'm not sure about how this would work inside ebook publishing systems but I think our library got it working for Pressbooks.

Regards

Don Shearman


--

Dean Ang Gmail

unread,
May 5, 2024, 9:19:53 PMMay 5
to Numbas Users
Dear all, 
Good day.
I echo Stephen's need to insert dynamic single question in ebooks or websites.
My current observations:
Numbas is a good dynamic quiz generator but there are few shortcomings:
(1)  It is not easy to customize the look of the question. There are too many css rules governing the styling of the question. My guess is that other than the default theme and user customized theme stylesheets, there are some injected rules from scripts to control how the question is presented overall.

(2) The quiz engine might not be optimal for inclusion in an ebook or a website. Correct me if I am wrong, I don't think different questions in the same project can and will look up the quiz engine script in a common location. Every downloaded zipped file has a script file, like in one of my example question, is up to a few meg in file size. If there are many questions in a project, I think the total file size will balloon very quickly.

From a end-user perspectives, I hope for the followings:
  • Easier ways to customize, via css, the look of a question for inclusion in a project.
  • Optimization of output through allowing different questions to refer to a common set of quiz engine files. Apology if this is already available. I am just unaware.
Thank you for allowing me to air my 2 cents worth of opinions.

Have a great day.
Reply all
Reply to author
Forward
0 new messages