mirror of
https://github.com/moodle/moodle.git
synced 2025-01-19 14:27:22 +01:00
show user what selection they made when updates are not allowed.
This commit is contained in:
parent
80a1d8fec7
commit
cabf7c2397
@ -38,6 +38,7 @@ $string['spaceleft'] = 'space available';
|
||||
$string['spacesleft'] = 'spaces available';
|
||||
$string['taken'] = 'Taken';
|
||||
$string['timerestrict'] = 'Restrict answering to this time period';
|
||||
$string['yourselection'] = 'Your selection';
|
||||
$string['viewallresponses'] = 'View $a responses';
|
||||
|
||||
?>
|
||||
|
@ -116,6 +116,10 @@
|
||||
print_simple_box(format_text($choice->text, $choice->format), 'center', '70%', '', 5, 'generalbox', 'intro');
|
||||
}
|
||||
|
||||
//if user has already made a selection, and they are not allowed to update it, show their selected answer.
|
||||
if (isset($USER->id) && ($current = get_record('choice_answers', 'choiceid', $choice->id, 'userid', $USER->id)) && !$choice->allowupdate) {
|
||||
print_simple_box(get_string("yourselection", "choice", userdate($choice->timeopen)).": ".format_string(choice_get_option_text($choice, $current->optionid)), "center");
|
||||
}
|
||||
|
||||
/// Print the form
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user