From 2a488ba5537442d7a569e4d241f270f5deb201c6 Mon Sep 17 00:00:00 2001 From: moodler Date: Thu, 4 Nov 2004 09:24:51 +0000 Subject: [PATCH] Some XHTML compatibility changes --- mod/lesson/locallib.php | 6 +- mod/lesson/mod.html | 120 ++++++++++++------------- mod/lesson/view.php | 191 ++++++++++++++++++++-------------------- 3 files changed, 160 insertions(+), 157 deletions(-) diff --git a/mod/lesson/locallib.php b/mod/lesson/locallib.php index 948f3b16ef..c216efd66f 100644 --- a/mod/lesson/locallib.php +++ b/mod/lesson/locallib.php @@ -914,14 +914,14 @@ function lesson_print_tree_link_menu($page, $id, $showpages=false) { $output = ""; $close = false; $title=$page->title; //CDC Chris Berri took out parsing of title in left menu on 6/11 - $link="id=$id&action=navigation&pageid=".$page->id; + $link="id=$id&action=navigation&pageid=".$page->id; if($page->id == $_REQUEST['pageid']) { $close=true; $output.=""; } - $output .= "
  • id\">".$title."
  • \n"; + $output .= "
  • id\">".$title."
  • \n"; if($close) { $output.="
    "; @@ -1131,4 +1131,4 @@ function lesson_check_nickname($name) { } /// CDC-FLAG /// -?> \ No newline at end of file +?> diff --git a/mod/lesson/mod.html b/mod/lesson/mod.html index d8e405f7e0..9564959353 100644 --- a/mod/lesson/mod.html +++ b/mod/lesson/mod.html @@ -1,7 +1,7 @@ dirroot/mod/lesson/locallib.php"); // for parameter array if ($form->mode == "add") { if ($defaults = get_record("lesson_default", "course", $form->course)) { @@ -110,17 +110,17 @@ if ($form->mode == "add") {
    - - - +

    :

    + + - + - + - + - + - - + + - + - + - - + + - - + + - + - + - - + + - - + + - + - + - + - + - + - + - + - + - + - + - + - + - - + + - - + + - + - + mode == "add") {
    : - +

    :

    : mode == "add") {

    :

    : mode == "add") {

    :

    : mode == "add") {

    :

    : - +

    :

    : =0; $i--) { @@ -176,7 +176,7 @@ if ($form->mode == "add") {

    :

    : mode == "add") {

    :

    : - ongoing, ""); helpbutton("ongoing", get_string("ongoing", "lesson"), "lesson"); @@ -198,8 +198,8 @@ if ($form->mode == "add") {

    :

    : 1; $i--) { @@ -211,8 +211,8 @@ if ($form->mode == "add") {

    :

    : mode == "add") {

    :

    : - review, ""); helpbutton("review", get_string("displayreview", "lesson"), "lesson"); @@ -239,17 +239,17 @@ if ($form->mode == "add") {

    :

    : - nextpagedefault, ""); helpbutton("nextpageaction", get_string("actionaftercorrectanswer", "lesson"), "lesson"); ?>

    :

    : mode == "add") {

    :

    : mode == "add") {

    :

    : mode == "add") {

    :

    : - +

    student) ?>:

    student) ?>: mode == "add") {

    :

    : mode == "add") {

    :

    : mode == "add") {

    :

    : mode == "add") {

    :

    : - px + px

    :

    : - px + px

    :

    : - +

    :

    : mode == "add") {

    :

    : mode == "add") {

    :

    : - +

    :

    : available); echo " - "; @@ -407,8 +407,8 @@ if ($form->mode == "add") { ?>

    :

    : deadline); echo " - "; @@ -417,7 +417,7 @@ if ($form->mode == "add") {

    :

    : mode == "add") { if ($form->mode != "add") { ?>

    :

    : - + - +
    - - - - - - - -"> + + + + + + + +" />
    diff --git a/mod/lesson/view.php b/mod/lesson/view.php index c250552d1c..ed3b74ecdc 100644 --- a/mod/lesson/view.php +++ b/mod/lesson/view.php @@ -5,7 +5,6 @@ require_once('../../config.php'); require_once('locallib.php'); - require_once('styles.php'); require_once('lib.php'); require_variable($id); // Course Module ID @@ -41,8 +40,9 @@ $action = 'teacherview'; } elseif (time() < $lesson->available) { print_header($course->shortname .': '. $lesson->name, $course->fullname, - $navigation .'id .'>'. $strlessons .' -> '. $lesson->name .'', - '', '', true, '', navmenu($course, $cm)); + $navigation .''. $strlessons .' -> '. $lesson->name .'', '', + "", true, + '', navmenu($course, $cm)); print_simple_box_start('center'); echo '
    '; echo get_string('lessonopen', 'lesson', userdate($lesson->available)).'
    '; @@ -53,8 +53,9 @@ exit(); } elseif (time() > $lesson->deadline) { print_header($course->shortname .': '. $lesson->name, $course->fullname, - "$navigation id>$strlessons -> id\">$lesson->name", - '', '', true, '', navmenu($course, $cm)); + "$navigation id\">$strlessons -> id\">$lesson->name", '', + "", true, + '', navmenu($course, $cm)); print_simple_box_start('center'); echo '
    '; echo get_string('lessonclosed', 'lesson', userdate($lesson->deadline)) .'
    '; @@ -91,8 +92,9 @@ } print_header($course->shortname .': '. $lesson->name, $course->fullname, - "$navigation id>$strlessons -> id\">$lesson->name", - '', '', true, $button, // took out update_module_button($cm->id, $course->id, $strlesson) and replaced it with $button + "$navigation id\">$strlessons -> id\">$lesson->name", '', + "", true, + $button, // took out update_module_button($cm->id, $course->id, $strlesson) and replaced it with $button navmenu($course, $cm)); // set up some general variables @@ -103,7 +105,7 @@ } else { $pixpath = $path .'/../theme/'. $CFG->theme .'/pix'; } - + /************** navigation **************************************/ if ($action == 'navigation') { //CDC Chris Berri added this echo call for left menu. must match that in lesson.php for styles @@ -112,9 +114,9 @@ if($page = get_record_select('lesson_pages', 'lessonid = '. $lesson->id .' AND prevpageid = 0')) { // print the pages echo '
    '; - echo ''; - echo ''; - echo ''; + echo ''; + echo ''; + echo ''; echo ""; exit(); } } } - redirect("view.php?id=$cm->id&action=essayview", get_string("emailsuccess", "lesson")); + redirect("view.php?id=$cm->id&action=essayview", get_string("emailsuccess", "lesson")); } /*******************high scores **************************************/ @@ -1893,7 +1896,7 @@ if (isset($_GET['link'])) { echo "
    id\">".get_string("returntocourse", "lesson").""; } else { - echo "
    id\">".get_string("cancel", "lesson")." | id&action=navigation\">".get_string("startlesson", "lesson").""; + echo "
    id\">".get_string("cancel", "lesson")." | id&action=navigation\">".get_string("startlesson", "lesson").""; } echo "
    "; @@ -1920,7 +1923,7 @@ if ($pasthighscore = get_record_select("lesson_high_scores", "lessonid = $lesson->id and userid = $USER->id")) { $pastgrade = $grades[$pasthighscore->gradeid]->grade; if ($pastgrade >= $newgrade->grade) { - redirect("view.php?id=$cm->id&action=highscores&link=1", "Update Successful"); + redirect("view.php?id=$cm->id&action=highscores&link=1", "Update Successful"); } else { // delete old and find out where new one goes if (!delete_records("lesson_high_scores", "id", $pasthighscore->id)) { @@ -1971,7 +1974,7 @@ error("Insert of new high score Failed!"); } - redirect("view.php?id=$cm->id&action=highscores&link=1", get_string("postsuccess", "lesson")); + redirect("view.php?id=$cm->id&action=highscores&link=1", get_string("postsuccess", "lesson")); echo "
    "; } /*******************name for highscores **************************************/ @@ -1980,18 +1983,18 @@ echo "
    "; if (isset($_POST['name'])) { if (lesson_check_nickname(trim($_POST['name']))) { - redirect("view.php?id=$cm->id&action=updatehighscores&name=".trim($_POST['name']), get_string("nameapproved", "lesson")); + redirect("view.php?id=$cm->id&action=updatehighscores&name=".trim($_POST['name']), get_string("nameapproved", "lesson")); } else { echo get_string("namereject", "lesson")."

    "; } } echo "
    "; - echo "id\">"; - echo ""; + echo "id\" />"; + echo ""; - echo get_string("entername", "lesson").":
    "; - echo ""; + echo get_string("entername", "lesson").":
    "; + echo ""; echo "
    "; echo "
    "; } -- 2.39.5