apluslms / a-plus

A+ frontend portal - A+ LMS documentation:
https://apluslms.github.io/
Other
67 stars 72 forks source link

Add a "Reset" button to questionnaires #494

Open jaguarfi opened 4 years ago

jaguarfi commented 4 years ago

Migrated from Trello

Solves:

raphendyr commented 4 years ago

To clarify, questionnaires change the visible form to the latest feedback, and there is no way get the original form back. If the latest feedback doesn't include a form, then the student can't continue. This happens when grader connection fails for example.

A+ could check that if the feedback contains a form, then it can be used in place of the GET data, but even then one should be able to get the original one.

It could be cool, if the A+ would try to fill the GET form with the latest POST data (i.e. last submitted content, which might not match correctly when input names change).

markkuriekkinen commented 4 years ago

This only applies to questionnaires embedded in chapters. If it is an independent exercise, the exercise page always loads the exercise description. The feedback is shown on a different page for independent exercises.

Jaakko's comment had some extra ideas that I comment in my next comment. To my understanding, the original issue only requests that a "reset button" is added to questionnaires in chapters so that the student could always load the exercise description. Normally, chapters replace the exercise description with the feedback of the previous submission.

Should we add a reset button to the template around here? https://github.com/apluslms/a-plus/blob/cd0cfb593656340dbcdab9078a7781d0d96599cd/exercise/templates/exercise/exercise_plain.html#L129

If yes, then the chapter.js code should load the exercise description when the reset button is clicked. https://github.com/apluslms/a-plus/blob/master/exercise/static/exercise/chapter.js

markkuriekkinen commented 4 years ago

To clarify, questionnaires change the visible form to the latest feedback, and there is no way get the original form back. If the latest feedback doesn't include a form, then the student can't continue. This happens when grader connection fails for example.

Yes, and having a reset button for loading the exercise description would fix this, but it is a nuisance for the user to do it manually. Your next point contains the idea about checking if there is any HTML form in the feedback.

A+ could check that if the feedback contains a form, then it can be used in place of the GET data, but even then one should be able to get the original one.

So, if there is no HTML form in the feedback of a questionnaire, we could assume that it is broken and the exercise description could be loaded by default without requiring the user to click a reset button. Even if a form exists, there are still cases when the user/student could want to reset the exercise description.

It could be cool, if the A+ would try to fill the GET form with the latest POST data (i.e. last submitted content, which might not match correctly when input names change).

This sounds like a new idea that falls out of scope for this issue. Or what did you think?

Remember that chapter exercises are not always questionnaires. Questionnaires have the data-aplus-quiz attribute. Normal exercises (like file upload exercises) do not show the feedback in place of the exercise in the chapter page.

raphendyr commented 4 years ago

Remember that chapter exercises are not always questionnaires. Questionnaires have the data-aplus-quiz attribute. Normal exercises (like file upload exercises) do not show the feedback in place of the exercise in the chapter page.

I think we should find a way to automate this so that the data-aplus-quiz could be dropped. I assume that it was introduced as a simple way to tell A+ that it should use the feedback in place of the original question.

Assuming we used automation, we could have event flows like:

GET form -> POST submission -> result form with errors -> POST fixed form -> accept form, return "ok"

Here, first the user would see the original empty form, after submission the form would be replaced with a form including errors and finally, the "ok" page would be shown, but the form visible to the user would be the original one.

For example, I'm working on adding form validation to file submission forms (e.g. async.generalForm in mooc-grader), which could return form with errors and A+ can't currently handle that nicely.

This sounds like a new idea that falls out of scope for this issue. Or what did you think?

Depends if we want to fix more of the UX around exercise forms, or just patch the "bug". I would do some planning how the exercise boxes should work, e.g., if we could remove the modal dialog (which has ripple effects on Matthew's work).

If we can spare the resources, I would do a bigger overhaul on the exercise box (i.e. I would remove the modal, the data-aplus-quiz. and I would merge quizzes and normal forms together in the chapther code). We could merge the normal layout with the chapter, so we could use the same javascript in both (e.g. a signle exercise could be replaced with a chapter including a single exercise).

saarasat commented 4 years ago

Can someone think of an independent exercise in a course I could check? How does it differ of the ones embedded in chapters?

markkuriekkinen commented 4 years ago

Independent exercises have a different navbar and there are panels with meta data on the right. The page only shows the exercise description since there is no content chapter.

Example courses:

markkuriekkinen commented 4 years ago

I added you as an assistant to this test course that has LTI exercises. The course has no chapters so the exercise pages use the "independent exercise" layout. https://plus.cs.aalto.fi/test/matlab-test/

raphendyr commented 4 years ago

However, I think we should deprecated that layout in favor of chapter style exercises. Thus, single exercise pages should be rendered like a chapter with a single exercise. I don't personally see reason to keep around the old layout with two tabs and trying to keep that working while most of the develipment focuses on the chapter variant.

markkuriekkinen commented 4 years ago

The independent exercises can be left as is. There is no need to change them now.

raphendyr commented 4 years ago

Furthermore, if independed exercises would require some fixes, those shouldn't be done. I.e. those exercises should be fixed by making them use the chapter system on a later date (and as part of new issue&pr).

saarasat commented 4 years ago

Alrighty, good to know!

PasiSa commented 2 years ago

Marked for discussion, and (at least temporarily) removed high priority label until further discussion and scheduling

markkuriekkinen commented 2 years ago

The problem of not being able to reset questionnaires and reach the clean exercise description without showing any old feedback keeps popping up from time to time. This is still important.