mirror of
https://github.com/moodle/moodle.git
synced 2025-01-19 14:27:22 +01:00
MDL-58557 mod_choice: only check responses if event is actionable
This commit is contained in:
parent
ae068eb145
commit
a0499b7fff
@ -1205,15 +1205,15 @@ function mod_choice_core_calendar_provide_event_action(calendar_event $event,
|
||||
return null;
|
||||
}
|
||||
|
||||
if (choice_get_my_response($choice)) {
|
||||
// There is no action if the user has already submitted their choice.
|
||||
return null;
|
||||
}
|
||||
|
||||
// The choice is actionable if we don't have a start time or the start time is
|
||||
// in the past.
|
||||
$actionable = (!$choice->timeopen || $choice->timeopen <= $now);
|
||||
|
||||
if ($actionable && choice_get_my_response($choice)) {
|
||||
// There is no action if the user has already submitted their choice.
|
||||
return null;
|
||||
}
|
||||
|
||||
return $factory->create_instance(
|
||||
get_string('viewchoices', 'choice'),
|
||||
new \moodle_url('/mod/choice/view.php', array('id' => $cm->id)),
|
||||
|
Loading…
x
Reference in New Issue
Block a user