numbas / Numbas

A completely browser-based e-assessment/e-learning system, with an emphasis on mathematics
http://www.numbas.org.uk
Apache License 2.0
207 stars 122 forks source link

Narrow screen: End exam button next to the Next question button #460

Closed christianp closed 7 years ago

christianp commented 8 years ago

It's not obvious, once you've finished the last question, how to end the exam - at the moment you have to open the menu.

christianp commented 8 years ago

Here's how it currently looks: image The End Exam button should appear to the right of the greyed-out "Next" button when we're on the last question.

darshan934 commented 8 years ago

Hi, I'd like to work on this.

christianp commented 8 years ago

Go for it! The relevant file is themes/default/files/index.html. Copy the existing "End exam" button, and add a visible: data-binding to make it visible only when we're on the last question.

darshan934 commented 8 years ago

Thanks for the information, what will be the tag following visible (data-bind="visible:____") such that the end button only appears at the last question?

janga1997 commented 7 years ago

I would like to work on this issue, but it seems like the file structure has changed since posting this issue. Can you help me with the new location of this issue?

christianp commented 7 years ago

The sidebar and the top nav bar are both in themes/default/templates/nav.html. You should copy the endBtn from https://github.com/numbas/Numbas/blob/master/themes/default/templates/nav.html#L51 to just after the "next question button" at https://github.com/numbas/Numbas/blob/master/themes/default/templates/nav.html#L67

It might be worth adding the class btn-warning to the new button, to make it look important.

If that looks weird, or we run out of space on small screens, this might need rethinking. Or we could hide the "next question" button when on the last question.