From: vyshane Date: Mon, 8 Jan 2007 07:58:22 +0000 (+0000) Subject: Xhtml fixes for MDL-7861. X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=0fd5feef056810ce74165c146e31e7697084e996;p=moodle.git Xhtml fixes for MDL-7861. --- diff --git a/question/category_class.php b/question/category_class.php index b4cc1688a9..8b0c34743e 100644 --- a/question/category_class.php +++ b/question/category_class.php @@ -305,7 +305,7 @@ class question_category_object { $this->edittable->align["$category->id.name"] = "left"; $this->edittable->wrap["$category->id.name"] = "nowrap"; $row["$category->id.name"] = '' .$this->str->edit. ' ' . $fill . $category->name . ''; $this->edittable->align["$category->id.info"] = "left"; @@ -320,17 +320,17 @@ class question_category_object { $this->edittable->wrap["$category->id.publish"] = "nowrap"; if (!empty($category->publish)) { $row["$category->id.publish"] = '' .$this->str->hide. ' '; + '&sesskey='.$USER->sesskey.$pagelink.'">' .$this->str->hide. ' '; } else { $row["$category->id.publish"] = '' .$this->str->publish. ' '; + '&sesskey='.$USER->sesskey.$pagelink.'">' .$this->str->publish. ' '; } if ($category->id != $this->defaultcategory->id) { $this->edittable->align["$category->id.delete"] = "center"; $this->edittable->wrap["$category->id.delete"] = "nowrap"; $row["$category->id.delete"] = '' .$this->str->delete. ' '; + '&delete=' . $category->id . '&sesskey='.$USER->sesskey.$pagelink.'">' .$this->str->delete. ' '; } else { $row["$category->id.delete"] = ''; } @@ -340,11 +340,11 @@ class question_category_object { $icons = ''; if ($up) { $icons .= ' - ' . $this->str->moveup. ' '; + ' . $this->str->moveup. ' '; } if ($down) { $icons .= ' - ' .$this->str->movedown. ' '; + ' .$this->str->movedown. ' '; } $row["$category->id.order"]= $icons; diff --git a/question/editlib.php b/question/editlib.php index 3d0b505f12..da9ab4b00d 100644 --- a/question/editlib.php +++ b/question/editlib.php @@ -159,17 +159,21 @@ function question_category_form($course, $current, $recurse=1, $showhidden=false $strshow = get_string("show", "quiz"); $streditcats = get_string("editcategories", "quiz"); - echo "
"; - echo "$strcategory: "; + echo "
"; + echo "$strcategory: "; echo ""; popup_form ("edit.php?courseid=$course->id&cat=", $catmenu, "catmenu", $current, "", "", "", false, "self"); echo ""; echo "
wwwroot/question/category.php\">"; + echo "
"; echo "id\" />"; echo ""; + echo '
'; echo "
"; echo '
'; + echo '
'; + echo "
"; echo '
'; echo "id}\" />"; echo ''; @@ -188,9 +192,9 @@ function question_category_form($course, $current, $recurse=1, $showhidden=false } echo ' onchange="getElementById(\'displayoptions\').submit(); return true;" />'; print_string('showhidden', 'quiz'); - echo ''; + echo '
'; + echo '
'; } @@ -240,7 +244,7 @@ function question_list($course, $categoryid, $quizid=0, $strpreview = get_string("preview","quiz"); if (!$categoryid) { - echo "

"; + echo "

"; print_string("selectcategoryabove", "quiz"); echo "

"; if ($quizid) { @@ -268,7 +272,7 @@ function question_list($course, $categoryid, $quizid=0, echo ''; popup_form ("$CFG->wwwroot/question/question.php?category=$category->id&qtype=", $qtypemenu, "addquestion", "", "choose", "", "", false, "self"); - echo ''; + echo ''; helpbutton("questiontypes", $strcreatenewquestion, "quiz"); echo ''; } @@ -278,7 +282,7 @@ function question_list($course, $categoryid, $quizid=0, echo ''; } - echo ''; + echo ''; if (has_capability('moodle/question:import', $context)) { echo ''.$strimportquestions.''; @@ -290,7 +294,7 @@ function question_list($course, $categoryid, $quizid=0, echo "wwwroot/question/export.php?category={$category->id}&courseid={$course->id}\">$strexportquestions"; helpbutton("export", $strexportquestions, "quiz"); } - echo ''; + echo ''; echo ''; @@ -302,7 +306,7 @@ function question_list($course, $categoryid, $quizid=0, $showhidden = $showhidden ? '' : " AND hidden = '0'"; if (!$totalnumber = count_records_select('question', "category IN ($categorylist) AND parent = '0' $showhidden")) { - echo "

"; + echo "

"; print_string("noquestions", "quiz"); echo "

"; return; @@ -313,7 +317,7 @@ function question_list($course, $categoryid, $quizid=0, $page = 0; if (!$questions = get_records_select('question', "category IN ($categorylist) AND parent = '0' $showhidden", $sortorder, '*', 0, $perpage)) { // There are no questions at all - echo "

"; + echo "

"; print_string("noquestions", "quiz"); echo "

"; return; @@ -330,41 +334,41 @@ function question_list($course, $categoryid, $quizid=0, print_simple_box_start('center', '100%', '#ffffff', 0); echo ''; $actionwidth = $canedit ? 95 : 70; - echo ""; + echo ""; $sortoptions = array('name, qtype ASC' => get_string("sortalpha", "quiz"), 'qtype, name ASC' => get_string("sorttypealpha", "quiz"), 'id ASC' => get_string("sortage", "quiz")); $orderselect = choose_from_menu ($sortoptions, 'sortorder', $sortorder, false, 'this.form.submit();', '0', true); $orderselect .= ''; - echo " - "; + echo " + "; echo "\n"; foreach ($questions as $question) { - echo "\n\n
$straction$straction$strquestionname $orderselect$strtype$strquestionname $orderselect$strtype
\n"; + echo "
\n"; // add to quiz if ($quizid && has_capability('mod/quiz:manage', $context)) { echo "id&quizid=$quizid&sesskey=$USER->sesskey\">pixpath/t/moveleft.gif\" border=\"0\" alt=\"$straddtoquiz\" /> "; + src=\"$CFG->pixpath/t/moveleft.gif\" alt=\"$straddtoquiz\" /> "; } // preview echo "id&quizid=$quizid','$strpreview', " . QUESTION_PREVIEW_POPUP_OPTIONS . ", false)\">pixpath/t/preview.gif\" border=\"0\" alt=\"$strpreview\" /> "; + src=\"$CFG->pixpath/t/preview.gif\" alt=\"$strpreview\" /> "; // edit, hide, delete question, using question capabilities, not quiz capabilieies if (has_capability('moodle/question:manage', $context)) { echo "wwwroot/question/question.php?id=$question->id\">pixpath/t/edit.gif\" border=\"0\" alt=\"$stredit\" /> "; + src=\"$CFG->pixpath/t/edit.gif\" alt=\"$stredit\" /> "; // hide-feature if($question->hidden) { echo "id&unhide=$question->id&sesskey=$USER->sesskey\">pixpath/t/restore.gif\" border=\"0\" alt=\"$strrestore\" />"; + src=\"$CFG->pixpath/t/restore.gif\" alt=\"$strrestore\" />"; } else { echo "id&deleteselected=$question->id&q$question->id=1\">pixpath/t/delete.gif\" border=\"0\" alt=\"$strdelete\" />"; + src=\"$CFG->pixpath/t/delete.gif\" alt=\"$strdelete\" />"; } } echo " id\" value=\"1\" />"; diff --git a/question/type/description/questiontype.php b/question/type/description/questiontype.php index d215f4e18c..f9afbb8ae7 100644 --- a/question/type/description/questiontype.php +++ b/question/type/description/questiontype.php @@ -38,7 +38,7 @@ class description_qtype extends default_questiontype { $editlink = ''; if (has_capability('moodle/question:manage', get_context_instance(CONTEXT_COURSE, $cmoptions->course))) { $stredit = get_string('edit'); - $linktext = ''.$stredit.''; + $linktext = ''.$stredit.''; $editlink = link_to_popup_window('/question/question.php?id='.$question->id, $stredit, $linktext, 450, 550, $stredit, '', true); } diff --git a/question/type/questiontype.php b/question/type/questiontype.php index 4e6be55480..182468b3f3 100644 --- a/question/type/questiontype.php +++ b/question/type/questiontype.php @@ -567,7 +567,7 @@ class default_questiontype { $editlink = ''; if ($context && has_capability('moodle/question:manage', $context)) { $stredit = get_string('edit'); - $linktext = ''.$stredit.''; + $linktext = ''.$stredit.''; $editlink = link_to_popup_window('/question/question.php?inpopup=1&id='.$question->id, 'editquestion', $linktext, 450, 550, $stredit, '', true); } diff --git a/question/type/rqp/types.php b/question/type/rqp/types.php index 3ca4ce7d76..a65a829276 100644 --- a/question/type/rqp/types.php +++ b/question/type/rqp/types.php @@ -140,7 +140,7 @@ delete_records('question_rqp_types', 'id', $type->id); } else { foreach ($servers as $server) { - $actions = ''.$strinfo.' '.$strdelete.''; + $actions = ''.$strinfo.' '.$strdelete.''; $serverurl = ($info == $server->id) ? ''.$server->url.'' : $server->url; $table->add_data(array($type->name, $serverurl, $actions)); }