show user what selection they made when updates are not allowed.

This commit is contained in:
danmarsden 2005-04-15 01:40:22 +00:00
parent 80a1d8fec7
commit cabf7c2397
2 changed files with 5 additions and 0 deletions

View File

@ -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';
?>

View File

@ -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