From: vyshane Date: Tue, 9 Jan 2007 09:07:16 +0000 (+0000) Subject: Xhtml fixes for MDL-7861. X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=0927589412a7cae3388b07f40c07058359a24c80;p=moodle.git Xhtml fixes for MDL-7861. --- diff --git a/mod/quiz/attempt.php b/mod/quiz/attempt.php index 90a40bf0af..691ef64293 100644 --- a/mod/quiz/attempt.php +++ b/mod/quiz/attempt.php @@ -140,10 +140,11 @@ } echo "
\n"; - echo "
id\" autocomplete=\"off\">\n"; + echo "id\" onclick=\"this.autocomplete='off'\">\n"; + echo '
'; print_simple_box_start("center"); - echo "
\n"; + echo "
\n"; print_string("requirepasswordmessage", "quiz"); echo "

\n"; echo " "; @@ -151,6 +152,7 @@ echo "
\n"; print_simple_box_end(); + echo '
'; echo "
\n"; if (empty($popup)) { @@ -458,9 +460,9 @@ unset($buttonoptions); $buttonoptions['q'] = $quiz->id; $buttonoptions['forcenew'] = true; - echo '
'; + echo '
'; print_single_button($CFG->wwwroot.'/mod/quiz/attempt.php', $buttonoptions, get_string('startagain', 'quiz')); - echo '
'; + echo ''; if ($quiz->popup) { notify(get_string('popupnotice', 'quiz')); } @@ -472,18 +474,21 @@ ?> \n"; + echo "
\n"; } // Add a hidden field with the quiz id + echo '
'; echo '\n"; /// Print the navigation panel if required @@ -503,7 +508,7 @@ //]]> \n"; + echo '\n"; quiz_print_navigation_panel($page, $numpages); echo "
\n"; } @@ -549,6 +554,7 @@ } // Finish the form + echo '
'; echo "
\n"; diff --git a/mod/quiz/attempt_close_js.php b/mod/quiz/attempt_close_js.php index 4932b57470..fbfeaab96a 100644 --- a/mod/quiz/attempt_close_js.php +++ b/mod/quiz/attempt_close_js.php @@ -1,6 +1,6 @@ -
+
@@ -14,7 +14,9 @@ document.write('"; + echo '
"; print_footer(); exit; diff --git a/mod/quiz/config.html b/mod/quiz/config.html index a96de083e3..29f61bc4a9 100644 --- a/mod/quiz/config.html +++ b/mod/quiz/config.html @@ -88,6 +88,7 @@
+
@@ -386,6 +387,7 @@ +
- +
@@ -32,8 +32,9 @@ var ec_quiz_finish = ec_page_start + ; diff --git a/mod/quiz/lib.php b/mod/quiz/lib.php index 9936a3883b..3015effca6 100644 --- a/mod/quiz/lib.php +++ b/mod/quiz/lib.php @@ -425,7 +425,7 @@ function quiz_print_recent_mod_activity($activity, $course, $detail=false) { echo "'; if(!empty($CFG->showblocksonmodpages)) { $buttons .= ''; + ''. + ''; } $buttons .= '
-
+
"; print_user_picture($activity->user->userid, $course, $activity->user->picture); - echo ""; + echo ""; if ($detail) { echo "modpixpath/$activity->type/icon.gif\" ". diff --git a/mod/quiz/locallib.php b/mod/quiz/locallib.php index 274f9bb9f7..72ca3f02b3 100644 --- a/mod/quiz/locallib.php +++ b/mod/quiz/locallib.php @@ -607,7 +607,7 @@ function quiz_get_question_review($quiz, $question) { $strpreview = get_string('previewquestion', 'quiz'); $context = $quiz->id ? '&contextquiz='.$quiz->id : ''; $quiz_id = $quiz->id ? '&quizid=' . $quiz->id : ''; - return " \"$strpreview\""; } diff --git a/mod/quiz/pagelib.php b/mod/quiz/pagelib.php index 74df0efaa5..8f2fe2c828 100644 --- a/mod/quiz/pagelib.php +++ b/mod/quiz/pagelib.php @@ -68,9 +68,11 @@ class page_quiz extends page_generic_activity { update_module_button($this->modulerecord->id, $this->courserecord->id, get_string('modulename', 'quiz')).'
frametarget.' method="get" action="view.php">'. + '
'. ''. ''. - '
'; } diff --git a/mod/quiz/report/analysis/report.php b/mod/quiz/report/analysis/report.php index a093a3c15f..a793f0dd26 100644 --- a/mod/quiz/report/analysis/report.php +++ b/mod/quiz/report/analysis/report.php @@ -358,12 +358,13 @@ class quiz_report extends quiz_default_report { global $CFG, $USER; echo '
'; echo '
'; + echo '
'; echo '

'.get_string('analysisoptions', 'quiz').':

'; echo ''; echo ''; echo ''; - echo ''; - echo '
'; + echo ''; + echo '
'; $options = array ( QUIZ_ALLATTEMPTS => get_string("attemptsall", 'quiz_analysis'), QUIZ_HIGHESTATTEMPT => get_string("attemptshighest", 'quiz_analysis'), QUIZ_FIRSTATTEMPT => get_string("attemptsfirst", 'quiz_analysis'), @@ -382,11 +383,12 @@ class quiz_report extends quiz_default_report { echo ''; helpbutton("analysisoptions", get_string("analysisoptions",'quiz_analysis'), 'quiz'); echo '
'; + echo ''; echo ''; echo ''; echo "\n"; - echo ''; + echo '
'; $options = array(); $options["id"] = "$cm->id"; $options["q"] = "$quiz->id"; diff --git a/mod/quiz/report/grading/report.php b/mod/quiz/report/grading/report.php index a4bf98ffea..25f2c9f341 100644 --- a/mod/quiz/report/grading/report.php +++ b/mod/quiz/report/grading/report.php @@ -269,8 +269,8 @@ class quiz_report extends quiz_default_report { } // grade all and "back" links - $links = "
id&questionid=$question->id&gradeall=1\">".get_string('gradeall', 'quiz').' | '. - "id&action=viewquestions\">".get_string('backtoquestionlist', 'quiz').'
'. + $links = "'. // print everything here print_heading($question->name); @@ -348,6 +348,7 @@ class quiz_report extends quiz_default_report { // Display the form with one part for each selected attempt echo ''. + '
'. ''. ''. ''. @@ -370,7 +371,7 @@ class quiz_report extends quiz_default_report { $options->readonly = 1; // print the user name, attempt count, the question, and some more hidden fields - echo '
'. + echo '
'. fullname($attempt, true).': '. get_string('attempt', 'quiz').$attempt->attempt; @@ -384,7 +385,8 @@ class quiz_report extends quiz_default_report { echo '
'; } - echo '
'. + echo '
'. + '
'. ''; if ($usehtmleditor) { diff --git a/mod/quiz/report/overview/report.php b/mod/quiz/report/overview/report.php index 777db51f7f..3dd0de415e 100644 --- a/mod/quiz/report/overview/report.php +++ b/mod/quiz/report/overview/report.php @@ -500,6 +500,7 @@ class quiz_report extends quiz_default_report { // Start form echo '
'; echo '
'; + echo '
'; echo ''; echo ''; @@ -515,16 +516,17 @@ class quiz_report extends quiz_default_report { echo '  '; $options = array('delete' => get_string('delete')); echo choose_from_menu($options, 'action', '', get_string('withselected', 'quiz'), 'if(this.selectedIndex > 0) submitFormById(\'attemptsform\');', '', true); - echo ''; + echo ''; echo ''; echo '
'; } // Close form + echo ''; echo ''; if (!empty($attempts)) { - echo ''; + echo '
'; $options = array(); $options["id"] = "$cm->id"; $options["q"] = "$quiz->id"; @@ -563,13 +565,14 @@ class quiz_report extends quiz_default_report { // Print display options echo '
'; echo '
'; + echo '
'; echo '

'.get_string('displayoptions', 'quiz').':

'; echo ''; echo ''; echo ''; echo ''; echo ''; - echo '
'; + echo '
'; echo ''; echo ''; echo ''; @@ -590,6 +593,7 @@ class quiz_report extends quiz_default_report { echo '
'; echo ''; echo '
'; + echo ''; echo ''; echo ''; echo "\n"; diff --git a/mod/quiz/report/regrade/report.php b/mod/quiz/report/regrade/report.php index 01a415ef2b..5943921a34 100644 --- a/mod/quiz/report/regrade/report.php +++ b/mod/quiz/report/regrade/report.php @@ -30,13 +30,13 @@ class quiz_report extends quiz_default_report { // Print heading print_heading(get_string('regradingquiz', 'quiz', format_string($quiz->name))); - echo '
'; + echo '
'; print_string('regradedisplayexplanation', 'quiz'); - echo '
'; + echo '
'; // Loop through all questions and all attempts and regrade while printing progress info foreach ($questions as $question) { - echo ''.get_string('regradingquestion', 'quiz', $question->name).' '.get_string('attempts', 'quiz').": \n"; + echo ''.get_string('regradingquestion', 'quiz', $question->name).' '.get_string('attempts', 'quiz').": \n"; foreach ($attempts as $attempt) { set_time_limit(30); $changed = regrade_question_in_attempt($question, $attempt, $quiz, true); @@ -47,7 +47,7 @@ class quiz_report extends quiz_default_report { echo ' #'.$attempt->id; } } - echo '
'; + echo '
'; // the following makes sure that the output is sent immediately. @flush();@ob_flush(); } diff --git a/mod/quiz/review.php b/mod/quiz/review.php index c27842eaec..69e824f61c 100644 --- a/mod/quiz/review.php +++ b/mod/quiz/review.php @@ -173,7 +173,7 @@ $attemptlist = ''; foreach ($attempts as $at) { $attemptlist .= ($at->id == $attempt->id) - ? ''.$at->attempt.', ' + ? ''.$at->attempt.', ' : ''.$at->attempt.', '; } $table->data[] = array(get_string('attempts', 'quiz').':', trim($attemptlist, ' ,')); @@ -212,9 +212,9 @@ unset($buttonoptions); $buttonoptions['q'] = $quiz->id; $buttonoptions['forcenew'] = true; - echo '
'; + echo '
'; print_single_button($CFG->wwwroot.'/mod/quiz/attempt.php', $buttonoptions, get_string('startagain', 'quiz')); - echo '
'; + echo ''; } else { // print number of the attempt print_heading(get_string('reviewofattempt', 'quiz', $attempt->attempt)); } @@ -229,9 +229,9 @@ $numpages = quiz_number_of_pages($attempt->layout); if ($numpages > 1 and !$showall) { print_paging_bar($numpages, $page, 1, 'review.php?attempt='.$attempt->id.'&'); - echo '
'; + echo '
'; + echo ''; } /// Print all the questions @@ -241,7 +241,7 @@ foreach ($pagequestions as $i) { if (!isset($questions[$i])) { print_simple_box_start('center', '90%'); - echo '' . $number . '
'; + echo '' . $number . '
'; notify(get_string('errormissingquestion', 'quiz', $i)); print_simple_box_end(); $number++; // Just guessing that the missing question would have lenght 1 diff --git a/mod/quiz/view.php b/mod/quiz/view.php index 300f5cb10b..0ad7248a63 100644 --- a/mod/quiz/view.php +++ b/mod/quiz/view.php @@ -90,12 +90,14 @@ print_simple_box(format_text($quiz->intro, FORMAT_MOODLE, $formatoptions), "center"); } + echo '
'; + // Print information about number of attempts and grading method. if ($quiz->attempts > 1) { - echo "

".get_string("attemptsallowed", "quiz").": $quiz->attempts

"; + echo "

".get_string("attemptsallowed", "quiz").": $quiz->attempts

"; } if ($quiz->attempts != 1) { - echo "

".get_string("grademethod", "quiz").": ".$QUIZ_GRADE_METHOD[$quiz->grademethod]."

"; + echo "

".get_string("grademethod", "quiz").": ".$QUIZ_GRADE_METHOD[$quiz->grademethod]."

"; } // Print information about timings. @@ -103,14 +105,15 @@ $available = ($quiz->timeopen < $timenow and ($timenow < $quiz->timeclose or !$quiz->timeclose)); if ($available) { if ($quiz->timelimit) { - echo "

".get_string("quiztimelimit","quiz", format_time($quiz->timelimit * 60))."

"; + echo "

".get_string("quiztimelimit","quiz", format_time($quiz->timelimit * 60))."

"; } quiz_view_dates($quiz); } else if ($timenow < $quiz->timeopen) { - echo "

".get_string("quiznotavailable", "quiz", userdate($quiz->timeopen)); + echo "

".get_string("quiznotavailable", "quiz", userdate($quiz->timeopen)); } else { - echo "

".get_string("quizclosed", "quiz", userdate($quiz->timeclose)); + echo "

".get_string("quizclosed", "quiz", userdate($quiz->timeclose)); } + echo '

'; } else { $available = false; } @@ -296,7 +299,7 @@ } if ($overallfeedback) { - echo '

', quiz_feedback_for_grade($mygrade, $quiz->id), '

'; + echo '

'.quiz_feedback_for_grade($mygrade, $quiz->id).'

'; } } @@ -307,7 +310,7 @@ } else if ($available && $moreattempts) { echo "
"; - echo "
"; + echo "
"; if ($unfinished) { $buttontext = get_string('continueattemptquiz', 'quiz'); @@ -327,10 +330,10 @@ $lastattempttime = $lastattempt->timefinish; if ($numattempts == 1 && $quiz->delay1 && $timenow <= $lastattempttime + $quiz->delay1) { $tempunavailable = get_string('temporaryblocked', 'quiz') . - ' '. userdate($lastattempttime + $quiz->delay1). ''; + ' '. userdate($lastattempttime + $quiz->delay1). ''; } else if ($numattempts > 1 && $quiz->delay2 && $timenow <= $lastattempttime + $quiz->delay2) { $tempunavailable = get_string('temporaryblocked', 'quiz') . - ' '. userdate($lastattempttime + $quiz->delay2). ''; + ' '. userdate($lastattempttime + $quiz->delay2). ''; } // If so, display a message and prevent the start button from appearing. @@ -389,7 +392,9 @@ document.write(''; + echo '
'; echo "sesskey\" />"; echo ''; echo ''; print_table($this->newtable); + echo '
'; echo ''; } @@ -381,9 +383,13 @@ class question_category_object { $this->output_edit_single_table($category,$page); echo '
'; echo '

+
-

'; + +
+ +

'; print_footer($this->course); exit; } else { @@ -440,11 +446,13 @@ class question_category_object { // wrap the table in a form and output it echo '

'; + echo '
'; echo "sesskey\" />"; echo ''; echo ''; echo ""; print_table($edittable); + echo '
'; echo '

'; } @@ -589,12 +597,14 @@ class question_category_object { $categorystrings = $this->categorystrings; unset ($categorystrings[$category->id]); echo "

"; + echo '
'; echo "sesskey\" />"; echo "course->id}\" />"; echo "id\" />"; choose_from_menu($categorystrings, "confirm", "", ""); echo ""; echo "str->cancel}\" />"; + echo '
'; echo "

"; print_footer($this->course); exit; diff --git a/question/edit.php b/question/edit.php index d811a5a855..a4c3a847af 100644 --- a/question/edit.php +++ b/question/edit.php @@ -63,7 +63,7 @@ include('tabs.php'); } - echo ''; + echo '
'; echo '
'; include($CFG->dirroot.'/question/showbank.php'); diff --git a/question/editlib.php b/question/editlib.php index da9ab4b00d..7fd276a3ad 100644 --- a/question/editlib.php +++ b/question/editlib.php @@ -192,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 '
'; } @@ -259,7 +259,7 @@ function question_list($course, $categoryid, $quizid=0, notify("Category not found!"); return; } - echo "
"; + echo '
'; $formatoptions = new stdClass; $formatoptions->noclean = true; echo format_text($category->info, FORMAT_MOODLE, $formatoptions, $course->id); @@ -298,7 +298,7 @@ function question_list($course, $categoryid, $quizid=0, echo ''; - echo '
'; + echo '
'; $categorylist = ($recurse) ? question_categorylist($category->id) : $category->id; @@ -330,18 +330,19 @@ function question_list($course, $categoryid, $quizid=0, $canedit = has_capability('moodle/question:manage', $context); echo '
'; + echo '
'; echo ''; 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 " + $orderselect .= ''; + echo ""; echo "\n"; foreach ($questions as $question) { @@ -354,7 +355,7 @@ function question_list($course, $categoryid, $quizid=0, } // preview - echo "id&quizid=$quizid','$strpreview', " . + echo "id&quizid=$quizid','$strpreview', " . QUESTION_PREVIEW_POPUP_OPTIONS . ", false)\">pixpath/t/preview.gif\" alt=\"$strpreview\" /> "; @@ -426,8 +427,8 @@ function question_list($course, $categoryid, $quizid=0, echo ' '; helpbutton('random', get_string('random', 'quiz'), 'quiz'); } - - echo "\n"; + echo ''; + echo "\n"; } -?> +?> \ No newline at end of file diff --git a/question/export.php b/question/export.php index e4d3ca0378..e53c088a90 100644 --- a/question/export.php +++ b/question/export.php @@ -122,8 +122,8 @@ else { $efile = "{$CFG->wwwroot}/file.php?file=/".$qformat->question_get_export_dir()."/$exportfilename".$file_ext."&forcedownload=1"; } - echo "

$download_str

"; - echo "

$downloadextra_str

"; + echo "

"; + echo "

$downloadextra_str

"; print_continue("edit.php?courseid=$course->id"); print_footer($course); @@ -144,6 +144,7 @@ print_simple_box_start("center"); echo "\n"; + echo '
'; echo "\n"; echo "
$straction$straction$strquestionname $orderselect$strquestionname $orderselect $strtype
\n"; @@ -178,6 +179,7 @@ echo "\n"; echo "
\n"; + echo '
'; echo "\n"; print_simple_box_end(); diff --git a/question/format/aon/format.php b/question/format/aon/format.php index e78f9775df..5c974a09ae 100644 --- a/question/format/aon/format.php +++ b/question/format/aon/format.php @@ -215,9 +215,9 @@ class qformat_aon extends qformat_default { print_heading($info); $options['category'] = $this->category->id; - echo "
"; + echo '
'; print_single_button("multiple.php", $options, get_string("randomcreate", "quiz")); - echo "
"; + echo "
"; return true; } diff --git a/question/format/blackboard_6/format.php b/question/format/blackboard_6/format.php index e47a4da724..cd0f011e46 100644 --- a/question/format/blackboard_6/format.php +++ b/question/format/blackboard_6/format.php @@ -846,7 +846,7 @@ function process_matching($quest, &$questions) { } else { global $course, $CFG; - print ''; + print '
'; print ''; print "
This matching question is malformed. Please ensure there are no blank answers, no two questions have the same answer, and/or there are correct answers for each question. There must be at least as many subanswers as subquestions, and at least one subquestion.
Question:".$quest->QUESTION_BLOCK->text; diff --git a/question/format/coursetestmanager/format.php b/question/format/coursetestmanager/format.php index 2416f394af..59aa6ddbdb 100755 --- a/question/format/coursetestmanager/format.php +++ b/question/format/coursetestmanager/format.php @@ -58,6 +58,7 @@ class qformat_coursetestmanager extends qformat_default { print_simple_box_start("center"); if ($hostname_access_error) { notify("couldn't connect to ODBC Socket Server on " . $hostname_access_error); } echo "
"; + echo '
'; echo ""; echo ""; echo "
"; @@ -79,6 +80,7 @@ class qformat_coursetestmanager extends qformat_default { echo " "; echo "
"; + echo '
'; echo "
"; print_simple_box_end(); print_footer($course); @@ -120,6 +122,7 @@ class qformat_coursetestmanager extends qformat_default { print_heading_with_help($strimportquestions, "import", "quiz"); print_simple_box_start("center"); echo "
"; + echo '
'; echo ""; echo ""; echo "
"; echo "Choose a category of questions to import:"; @@ -138,6 +141,7 @@ class qformat_coursetestmanager extends qformat_default { echo " "; echo "
"; + echo '
'; echo "
"; print_simple_box_end(); print_footer($course); diff --git a/question/import.php b/question/import.php index 9f20241f5b..3e0601e195 100644 --- a/question/import.php +++ b/question/import.php @@ -226,64 +226,66 @@ ?>
- - - - - - - - - - - - - - - - -
category; ?>:id, ""); ?> - fromfile; ?> - - importcategory, 'quiz'); ?>
fileformat; ?>:importquestions, "quiz"); ?>
matchgrades; ?>matchgradeserror,'' ); - helpbutton('matchgrades', $txt->matchgrades, 'quiz'); ?>
- - importfileupload; ?> - - - - - - - - - - -
upload; ?>:maxbytes,0,false); ?>
 
- - importfilearea; ?> - - - - - - - - - - -
file; ?>:
 id}&choose=form.choosefile", - "coursefiles", $txt->choosefile, 500, 750, $txt->choosefile); ?> -
- +
+ + + + + + + + + + + + + + + + +
category; ?>:id, ""); ?> + fromfile; ?> + + importcategory, 'quiz'); ?>
fileformat; ?>:importquestions, "quiz"); ?>
matchgrades; ?>matchgradeserror,'' ); + helpbutton('matchgrades', $txt->matchgrades, 'quiz'); ?>
+ + importfileupload; ?> + + + + + + + + + + +
upload; ?>:maxbytes,0,false); ?>
 
+ + importfilearea; ?> + + + + + + + + + + +
file; ?>:
 id}&choose=form.choosefile", + "coursefiles", $txt->choosefile, 500, 750, $txt->choosefile); ?> +
+ +

' . 'data = array($addline); echo "
+
id\"/> category\"/> qtype\"/> - "; + +
"; print_table($addtable); echo '
'; @@ -264,22 +266,27 @@ // Print the existing-datasets table if (!empty($table->data)) { echo "
+
id\"/> category\"/> qtype\"/> - "; + +
"; print_table($table); echo '
'; - echo "


+ echo "


+ +
id\"/> category\"/> qtype\"/> -
\n"; + + \n"; } else { notify( $strdataitemneed ); } diff --git a/question/type/datasetdependent/questiondatasets.html b/question/type/datasetdependent/questiondatasets.html index 40ab32ef08..e8d31ee673 100644 --- a/question/type/datasetdependent/questiondatasets.html +++ b/question/type/datasetdependent/questiondatasets.html @@ -1,5 +1,5 @@
-
+
@@ -30,6 +30,6 @@ " /> - + diff --git a/question/type/editquestionstart.html b/question/type/editquestionstart.html index 9f022e51d2..7e348a21ae 100644 --- a/question/type/editquestionstart.html +++ b/question/type/editquestionstart.html @@ -1,5 +1,5 @@ -
+
diff --git a/question/type/rqp/editquestion.html b/question/type/rqp/editquestion.html index fde1610c04..9c1cac82fe 100644 --- a/question/type/rqp/editquestion.html +++ b/question/type/rqp/editquestion.html @@ -1,4 +1,5 @@ +
@@ -55,4 +56,5 @@ ?>
+ diff --git a/question/type/rqp/types.php b/question/type/rqp/types.php index a65a829276..d3c5f51238 100644 --- a/question/type/rqp/types.php +++ b/question/type/rqp/types.php @@ -158,10 +158,12 @@ /// Print the table print_heading_with_help($stritemtypes, 'rqp', 'quiz'); echo '
'; + echo '
'; echo ''; - echo '
'; + echo '
'; $table->print_html(); - echo '
'; + echo '
'; + echo ''; echo ''; /// Finish the page