From: nicolasconnault Date: Tue, 18 Aug 2009 05:17:04 +0000 (+0000) Subject: MDL-19816 Upgraded calls to helpbutton, print_simple_box* and notify X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=8b1b03820fb70ab017bf0f09db8a945d08cff196;p=moodle.git MDL-19816 Upgraded calls to helpbutton, print_simple_box* and notify --- diff --git a/mod/survey/lib.php b/mod/survey/lib.php index b517d4cc72..34902e457d 100644 --- a/mod/survey/lib.php +++ b/mod/survey/lib.php @@ -619,7 +619,7 @@ function survey_print_multi($question) { * @param object $question */ function survey_print_single($question) { - global $DB, $qnum; + global $DB, $qnum, $OUTPUT; $rowclass = survey_question_rowclass(0); @@ -649,7 +649,7 @@ function survey_print_single($question) { } else if ($question->type < 0) { // Choose several of a number $options = explode( ",", $question->options); - notify("This question type not supported yet"); + echo $OUTPUT->notification("This question type not supported yet"); } echo ""; diff --git a/mod/survey/report.php b/mod/survey/report.php index ca0c9e4e74..2f0fdff5db 100644 --- a/mod/survey/report.php +++ b/mod/survey/report.php @@ -92,7 +92,7 @@ $groupingid = $cm->groupingid; - print_simple_box_start("center"); + echo $OUTPUT->box_start("generalbox boxaligncenter"); if ($showscales) { echo "$strsummary"; echo "    $strscales"; @@ -114,7 +114,7 @@ $action = "questions"; } } - print_simple_box_end(); + echo $OUTPUT->box_end(); $spacer = new html_image(); $spacer->height = 30; @@ -136,7 +136,7 @@ survey_print_graph("id=$id&group=$currentgroup&type=overall.png"); echo ""; } else { - notify(get_string("nobodyyet","survey")); + echo $OUTPUT->notification(get_string("nobodyyet","survey")); } break; @@ -144,7 +144,7 @@ echo $OUTPUT->heading($strscales); if (! $results = survey_get_responses($survey->id, $currentgroup, $groupingid) ) { - notify(get_string("nobodyyet","survey")); + echo $OUTPUT->notification(get_string("nobodyyet","survey")); } else { @@ -195,7 +195,7 @@ } if (! $results = survey_get_responses($survey->id, $currentgroup, $groupingid) ) { - notify(get_string("nobodyyet","survey")); + echo $OUTPUT->notification(get_string("nobodyyet","survey")); } else { @@ -315,7 +315,7 @@ echo $OUTPUT->heading(get_string("analysisof", "survey", get_string('participants'))); if (! $results = survey_get_responses($survey->id, $currentgroup, $groupingid) ) { - notify(get_string("nobodyyet","survey")); + echo $OUTPUT->notification(get_string("nobodyyet","survey")); } else { survey_print_all_responses($cm->id, $results, $course->id); } @@ -332,15 +332,15 @@ if ($notes != '' and confirm_sesskey()) { if (survey_get_analysis($survey->id, $user->id)) { if (! survey_update_analysis($survey->id, $user->id, $notes)) { - notify("An error occurred while saving your notes. Sorry."); + echo $OUTPUT->notification("An error occurred while saving your notes. Sorry."); } else { - notify(get_string("savednotes", "survey")); + echo $OUTPUT->notification(get_string("savednotes", "survey")); } } else { if (! survey_add_analysis($survey->id, $user->id, $notes)) { - notify("An error occurred while saving your notes. Sorry."); + echo $OUTPUT->notification("An error occurred while saving your notes. Sorry."); } else { - notify(get_string("savednotes", "survey")); + echo $OUTPUT->notification(get_string("savednotes", "survey")); } } } diff --git a/mod/survey/view.php b/mod/survey/view.php index 907e06f9ba..89bfc55805 100644 --- a/mod/survey/view.php +++ b/mod/survey/view.php @@ -59,7 +59,7 @@ } if (isguest()) { - notify(get_string("guestsnotallowed", "survey")); + echo $OUTPUT->notification(get_string("guestsnotallowed", "survey")); } @@ -112,7 +112,7 @@ echo '
'; echo ""; - print_simple_box(format_module_intro('survey', $survey, $cm->id), 'center', '70%', '', 5, 'generalbox', 'intro'); + echo $OUTPUT->box(format_module_intro('survey', $survey, $cm->id), 'generalbox boxaligncenter bowidthnormal', 'intro'); // Get all the major questions and their proper order if (! $questions = $DB->get_records_list("survey_questions", "id", explode(',', $survey->questions))) {