mirror of
https://github.com/moodle/moodle.git
synced 2025-04-19 07:25:30 +02:00
MDL-45376 Completion: Form locking is still not working right
On submit of the form, it called 'freeze' on the completion-related fields (even though they shouldn't have been frozen because you already clicked the unlock button).
This commit is contained in:
parent
f500ff4e52
commit
1710973161
@ -224,8 +224,10 @@ abstract class moodleform_mod extends moodleform {
|
||||
// is changed, maybe someone has completed it now)
|
||||
$mform->getElement('completionunlocked')->setValue(1);
|
||||
} else {
|
||||
// Has the element been unlocked?
|
||||
if ($mform->exportValue('unlockcompletion')) {
|
||||
// Has the element been unlocked, either by the button being pressed
|
||||
// in this request, or the field already being set from a previous one?
|
||||
if ($mform->exportValue('unlockcompletion') ||
|
||||
$mform->exportValue('completionunlocked')) {
|
||||
// Yes, add in warning text and set the hidden variable
|
||||
$mform->insertElementBefore(
|
||||
$mform->createElement('static', 'completedunlocked',
|
||||
|
Loading…
x
Reference in New Issue
Block a user