From 7762e45ef494bc41da34f9b6dfe0965ca3e2c6b4 Mon Sep 17 00:00:00 2001 From: gbateson Date: Mon, 22 Oct 2007 01:48:14 +0000 Subject: [PATCH] improve XHTML compatability of HotPot reports; fix termination of tags for JCloze and JQuiz --- mod/hotpot/report/click/report.php | 4 ++-- mod/hotpot/report/default.php | 3 ++- mod/hotpot/report/fullstat/report.php | 4 ++-- mod/hotpot/report/overview/report.php | 14 +++++++------- mod/hotpot/report/simplestat/report.php | 4 ++-- mod/hotpot/template/v6.php | 4 ++-- 6 files changed, 17 insertions(+), 16 deletions(-) diff --git a/mod/hotpot/report/click/report.php b/mod/hotpot/report/click/report.php index f3428e6f05..cdfe1e1b76 100644 --- a/mod/hotpot/report/click/report.php +++ b/mod/hotpot/report/click/report.php @@ -221,7 +221,7 @@ class hotpot_report extends hotpot_default_report { } // foreach $detail // set data cell values for $this->set_data_click( - $allow_review ? ''.$clickcount.'' : $clickcount, + $allow_review ? ''.$clickcount.'' : $clickcount, trim(userdate($attempt->timefinish, $strftimetime)), $exercisetype, $click @@ -399,7 +399,7 @@ class hotpot_report extends hotpot_default_report { $idnumber = fullname($attempt); } if ($options['reportformat']=='htm') { - $idnumber = ''.$idnumber.''; + $idnumber = ''.$idnumber.''; } $this->data['user'] = array( 'idnumber' => $idnumber, diff --git a/mod/hotpot/report/default.php b/mod/hotpot/report/default.php index 254e5b22a4..0983ec636e 100644 --- a/mod/hotpot/report/default.php +++ b/mod/hotpot/report/default.php @@ -389,6 +389,7 @@ class hotpot_default_report { $align = empty($table->align[$i]) ? '' : ' align="'.$table->align[$i].'"'; $class = empty($table->class[$i]) ? $d : ' class="'.$table->class[$i].'"'; + $class = ' class="'.(empty($table->class[$i]) ? $d : $table->class[$i]).'"'; $size = empty($table->size[$i]) ? '' : ' width="'.$table->size[$i].'"'; $wrap = empty($table->wrap[$i]) ? '' : ' nowrap="nowrap"'; @@ -472,7 +473,7 @@ class hotpot_default_report { } else { // $cell is a string $text = $cell; } - print $td.$text."\n"; + print $td.$text.(empty($table->fontsize[$col]) ? '' : '')."\n"; } else { $skipcol[$col]--; } diff --git a/mod/hotpot/report/fullstat/report.php b/mod/hotpot/report/fullstat/report.php index 42f387dc23..371c7db495 100644 --- a/mod/hotpot/report/fullstat/report.php +++ b/mod/hotpot/report/fullstat/report.php @@ -72,13 +72,13 @@ class hotpot_report extends hotpot_default_report { $name = "$u->firstname $u->lastname"; } if ($is_html) { - $name = ''.$name.''; + $name = ''.$name.''; } $grade = isset($user->grade) ? $user->grade : $blank; foreach ($user->attempts as $attempt) { $attemptnumber = $attempt->attempt; if ($allow_review) { - $attemptnumber = ' '.$attemptnumber.''; + $attemptnumber = ' '.$attemptnumber.''; } $cells = array ($name, $grade, $attemptnumber); // $name and $grade are only printed on first line per user diff --git a/mod/hotpot/report/overview/report.php b/mod/hotpot/report/overview/report.php index 52218f535b..738b9ac358 100644 --- a/mod/hotpot/report/overview/report.php +++ b/mod/hotpot/report/overview/report.php @@ -49,7 +49,7 @@ class hotpot_report extends hotpot_default_report { $name = fullname($u); if ($is_html) { $picture = print_user_picture($u->userid, $course->id, $u->picture, false, true); - $name = ''.$name.''; + $name = ''.$name.''; } $grade = isset($user->grade) && $user->grade<>' ' ? $user->grade : $spacer; $attemptcount = count($user->attempts); @@ -83,11 +83,11 @@ class hotpot_report extends hotpot_default_report { $attemptnumber = $attempt->attempt; $starttime = trim(userdate($attempt->timestart, $strtimeformat)); if ($is_html && isset($attempt->score) && (has_capability('mod/hotpot:viewreport',get_context_instance(CONTEXT_COURSE, $course->id)) || $hotpot->review)) { - $attemptnumber = ''.$attemptnumber.''; - $starttime = ''.$starttime.''; + $attemptnumber = ''.$attemptnumber.''; + $starttime = ''.$starttime.''; } if ($is_html && has_capability('mod/hotpot:viewreport',get_context_instance(CONTEXT_COURSE, $course->id))) { - $checkbox = ''.$spacer; + $checkbox = ''.$spacer; } else { $checkbox = ''; } @@ -116,13 +116,13 @@ class hotpot_report extends hotpot_default_report { $table->start = $this->deleteform_javascript(); $table->start .= '
'."\n"; $table->start .= ''."\n"; - $table->start .= ''."\n"; + $table->start .= ''."\n"; $table->finish = '
'."\n"; $table->finish .= ' '."\n"; if ($abandoned) { - $table->finish .= ''."\n"; + $table->finish .= ''."\n"; } - $table->finish .= ''."\n"; + $table->finish .= ''."\n"; $table->finish .= '
'."\n"; $table->finish .= '
'."\n"; } diff --git a/mod/hotpot/report/simplestat/report.php b/mod/hotpot/report/simplestat/report.php index 6df2e561e0..1cda711c66 100644 --- a/mod/hotpot/report/simplestat/report.php +++ b/mod/hotpot/report/simplestat/report.php @@ -58,7 +58,7 @@ class hotpot_report extends hotpot_default_report { $name = fullname($u); if ($is_html) { $picture = print_user_picture($u->userid, $course->id, $u->picture, false, true); - $name = ''.$name.''; + $name = ''.$name.''; } if (isset($user->grade)) { $grade = $user->grade; @@ -97,7 +97,7 @@ class hotpot_report extends hotpot_default_report { // get attempt number $attemptnumber= $attempt->attempt; if ($is_html && $allow_review) { - $attemptnumber = ''.$attemptnumber.''; + $attemptnumber = ''.$attemptnumber.''; } if ($is_best_grade) { $score = ''.$attemptnumber.''; diff --git a/mod/hotpot/template/v6.php b/mod/hotpot/template/v6.php index 017117fef1..6db415dee1 100644 --- a/mod/hotpot/template/v6.php +++ b/mod/hotpot/template/v6.php @@ -913,7 +913,7 @@ class hotpot_xml_quiz_template extends hotpot_xml_template_default { $a++; } - $gap .= ''; + $gap .= ''; } if ($includeclues) { $clue = $this->parent->xml_value($question_record, $question."['clue'][0]['#']"); @@ -1264,7 +1264,7 @@ class hotpot_xml_quiz_template extends hotpot_xml_template_default { $question_type==HOTPOT_JQUIZ_HYBRID ) { $str .= '
'; - $str .= '

'; + $str .= '

'; $caption = $this->v6_expand_CheckCaption(); $str .= $this->v6_expand_jquiz_button($caption, "CheckShortAnswer($q)"); -- 2.39.5