Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Hi,
I recently wanted to provide difference scoring for a multichoice question. When I added different score in the 'score if not chosen' I came to know that the default score in quiz scoring got saved.
This looked like a bug to me because only when the 'score if not chosen' is left empty the default score must be saved, if not the entered score must be saved. I am here with adding a patch which might solve this issue.
Thank you
Comment | File | Size | Author |
---|---|---|---|
#2 | Screen Shot 2015-02-25 at 3.04.09 PM.png | 17.92 KB | sandra@digitalworldbiology.com |
multichoice_score_saving.patch | 864 bytes | Sabareesh | |
Comments
Comment #1
Sivaji_Ganesh_Jojodae CreditAttribution: Sivaji_Ganesh_Jojodae commentedSabareesh,
Thanks for the patch. But it is not solving the issue.
In insertAlternative() and updateAlternative() methods I'm receiving the score_if_not_chosen if not chosen as 0. I'm not 100% sure about the scoring, as I see in forgive() method it is intentionally changed to 0, off course there is a comment line too regarding the same.
Respective code is snip below
Comment #2
sandra@digitalworldbiology.com CreditAttribution: sandra@digitalworldbiology.com commentedI can confirm that this is not working in 7x.5 alpha 8.
Here's how to test this:
1. Create a multiple choice question.
2. Add an option for an incorrect answer.
3. Open the ADVANCED OPTIONS link below the answer field.
4. By default, the value in the "Score if chosen" field will be -1.
5. Change the value to 0 and save the question.
6. Open the question again, the new value should appear in the field, but instead the value will still be -1.
Comment #3
djdevinDupe