From 7143a2841e9bdce6c0e4dccfeb8c68731687b0ea Mon Sep 17 00:00:00 2001 From: michaelpenne Date: Tue, 21 Sep 2004 22:15:30 +0000 Subject: [PATCH] added an include for lib.php changed the display of page titles changed matching such that if two matching items match to the same answer, that answer only apprears once in the drop down menu. Changed how the grade essay question link apprears. Only appears if there is an essay to grade. --- mod/lesson/view.php | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/mod/lesson/view.php b/mod/lesson/view.php index 0dd26e8ab3..976eef4e1e 100644 --- a/mod/lesson/view.php +++ b/mod/lesson/view.php @@ -6,7 +6,8 @@ require_once("../../config.php"); require_once("locallib.php"); require_once("styles.php"); - + require_once("lib.php"); + require_variable($id); // Course Module ID optional_variable($pageid); // Lesson Page ID @@ -530,12 +531,15 @@ } } } - - //print_heading($page->title); + /// CDC-FLAG /// moved name and title down here for Flow style, michaelp echo "
"; echo ""; echo ($lesson->name) . ""; + if ($page->qtype == LESSON_BRANCHTABLE) { + echo ":
"; + print_heading($page->title); + } echo "

"; /// CDC-FLAG /// @@ -645,6 +649,7 @@ echo "$answer->answer: "; echo "\n"; echo "\n"; /// CDC-FLAG /// link to grade essay questions - if (count_records("lesson_pages", "lessonid", $lesson->id, "qtype", LESSON_ESSAY) > 0) { + if (count_records("lesson_essay", "lessonid", $lesson->id) > 0) { echo "
id&action=essayview\">".get_string("gradeessay", "lesson")."

"; } /// CDC-FLAG /// tree code - in final release, will use lang file for all text output. @@ -1459,7 +1463,7 @@ elseif ($action == 'essayview') { print_heading_with_help($lesson->name, "overview", "lesson"); if (!$essays = get_records_select("lesson_essay", "lessonid = $lesson->id", "timesubmitted")) { - error("Error: could not find essays"); + error("No one has answered essay questions yet..."); } if (!$pages = get_records_select("lesson_pages", "lessonid = $lesson->id")) { error("Error: could not find lesson pages"); -- 2.39.5