From 22962abbf02b37bbc717ce8490dc315e3d770c2e Mon Sep 17 00:00:00 2001 From: danmarsden Date: Mon, 9 Feb 2009 09:52:59 +0000 Subject: [PATCH] MDL-17198 - show better confirmation of choice selection. merged from HEAD --- mod/choice/view.php | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/mod/choice/view.php b/mod/choice/view.php index 4128cd1dab7..dc8ec470e06 100644 --- a/mod/choice/view.php +++ b/mod/choice/view.php @@ -34,9 +34,11 @@ delete_records('choice_answers', 'id', $answer->id); } } + $navigation = build_navigation('', $cm); + print_header_simple(format_string($choice->name), "", $navigation, "", "", true, + update_module_button($cm->id, $course->id, $strchoice), navmenu($course, $cm)); /// Submit any new data if there is any - if ($form = data_submitted() && has_capability('mod/choice:choose', $context)) { $timenow = time(); if (has_capability('mod/choice:deleteresponses', $context)) { @@ -52,16 +54,11 @@ } else { choice_user_submit_response($answer, $choice, $USER->id, $course->id, $cm); } - redirect("view.php?id=$cm->id"); - exit; + notify(get_string('choicesaved','choice'),'notifysuccess'); } /// Display the choice and possibly results - $navigation = build_navigation('', $cm); - print_header_simple(format_string($choice->name), "", $navigation, "", "", true, - update_module_button($cm->id, $course->id, $strchoice), navmenu($course, $cm)); - add_to_log($course->id, "choice", "view", "view.php?id=$cm->id", $choice->id, $cm->id); /// Check to see if groups are being used in this choice