Hi Tim, thanks for your reply.
1. Are you referring to the /course/modedit.php or the /mod/quiz/mod_form.php? It seems that when I'm updating the quiz page, it is actually loading the /course/modedit.php. Just want to confirm. Thanks!
I also tried a hack that I learned from a patch in moodle bug tracker, that patch is to hack the /lib/pear/HTML/QuickForm/select.php and at around line #597 (under the function of onQuickFormEvent, change it to:
if ('updateValue' == $event) {
$value = $this->_findValue($caller->_constantValues);
if (null === $value) {
$value = $this->_findValue($caller->_submitValues);
if (null === $value && (!$caller->isSubmitted() || !$this->getMultiple())) {
$value = $this->_findValue($caller->_defaultValues);
}
}
if (null !== $value) {
$this->setValue($value);
}
return true;
//add new codes here
else if ($arg[0] == delay1) {
$caller->disabledIf('delay1', 'timeclose[off]', 'checked');
}
} else {
return parent::onQuickFormEvent($event, $arg, $caller);
However, that seems to work for other options such as TIMING and DISPLAY pull-down menus, but when I tried to use the same logic with checkboxes under quiz REVIEW OPTIONS (e.g. scoreopen and scoreclosed), it won't work. Any idea why is that? Can you elaborate a little bit more about the approach that you mentioned? Thanks!
2. As for the "use-case for wanted to show the scores to students, then hide them again later," one example would be instructors might want to show answers/responses/feedback (not necessarily "scores") to students right after they take the quiz, but then they want to hide all these (at both quiz and Gradebook students' view) just so that students won't be able to try to "memorize" all the answers (or continue to remember the score they got). Does this make sense to you?
I think if there is really no good "use-case" for such scenario, then Moodle probably should remove the "possibility" to create such a combination at the UI level (e.g. be able to ONLY check the "score" under the "Later, while the quiz is still open" column). What do you think?