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.
The default max score values for long and short answer questions are currently hardcoded to 10 and 5 respectively. These should really be configured through the UI somewhere.
I have attached a patch to make these fields configurable through the UI at /admin/quiz/settings/questions_settings
Comment | File | Size | Author |
---|---|---|---|
#2 | 0001-Allow-the-user-to-configure-the-default-max-score-va.patch | 3.78 KB | michaelk |
0001-Allow-the-user-to-configure-the-default-max-score-va.patch | 3.79 KB | michaelk | |
Comments
Comment #1
Sivaji_Ganesh_Jojodae CreditAttribution: Sivaji_Ganesh_Jojodae commented+1 for committing this patch. But falcon is trying to limit the new features request as to make the quiz 7.x stable sooner, so i'm leaving this issue at his discretion.
Did a quick review of patch, I'm sure it needs work.
1. Two return?
2. $form['#validate'] must be array string given. ($form['#validate'][] = 'long_answer_config_validate';)
Comment #2
michaelk CreditAttribution: michaelk commentedOh, yep, the double return was just a copy/paste error when I was generating the patch off of our live code.
The $form['#validate'] was just the same code used in the multichoice question code for its configuration section.
I went ahead and made both changes, and have attached an updated version of the patch.
Comment #3
Sivaji_Ganesh_Jojodae CreditAttribution: Sivaji_Ganesh_Jojodae commentedSince this is not a show stopper i committed this patch to git.