} // foreach $detail
// set data cell values for
$this->set_data_click(
- $allow_review ? '<a href="review.php?hp='.$hotpot->id.'&attempt='.$attempt->id.'">'.$clickcount.'</a>' : $clickcount,
+ $allow_review ? '<a href="review.php?hp='.$hotpot->id.'&attempt='.$attempt->id.'">'.$clickcount.'</a>' : $clickcount,
trim(userdate($attempt->timefinish, $strftimetime)),
$exercisetype,
$click
$idnumber = fullname($attempt);
}
if ($options['reportformat']=='htm') {
- $idnumber = '<a href="'.$CFG->wwwroot.'/user/view.php?id='.$attempt->userid.'&course='.$course->id.'">'.$idnumber.'</a>';
+ $idnumber = '<a href="'.$CFG->wwwroot.'/user/view.php?id='.$attempt->userid.'&course='.$course->id.'">'.$idnumber.'</a>';
}
$this->data['user'] = array(
'idnumber' => $idnumber,
$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"';
} else { // $cell is a string
$text = $cell;
}
- print $td.$text."</td>\n";
+ print $td.$text.(empty($table->fontsize[$col]) ? '' : '</font>')."</td>\n";
} else {
$skipcol[$col]--;
}
$name = "$u->firstname $u->lastname";
}
if ($is_html) {
- $name = '<a href="'.$CFG->wwwroot.'/user/view.php?id='.$u->userid.'&course='.$course->id.'">'.$name.'</a>';
+ $name = '<a href="'.$CFG->wwwroot.'/user/view.php?id='.$u->userid.'&course='.$course->id.'">'.$name.'</a>';
}
$grade = isset($user->grade) ? $user->grade : $blank;
foreach ($user->attempts as $attempt) {
$attemptnumber = $attempt->attempt;
if ($allow_review) {
- $attemptnumber = ' <a href="review.php?hp='.$hotpot->id.'&attempt='.$attempt->id.'">'.$attemptnumber.'</a>';
+ $attemptnumber = ' <a href="review.php?hp='.$hotpot->id.'&attempt='.$attempt->id.'">'.$attemptnumber.'</a>';
}
$cells = array ($name, $grade, $attemptnumber);
// $name and $grade are only printed on first line per user
$name = fullname($u);
if ($is_html) {
$picture = print_user_picture($u->userid, $course->id, $u->picture, false, true);
- $name = '<a href="'.$CFG->wwwroot.'/user/view.php?id='.$u->userid.'&course='.$course->id.'">'.$name.'</a>';
+ $name = '<a href="'.$CFG->wwwroot.'/user/view.php?id='.$u->userid.'&course='.$course->id.'">'.$name.'</a>';
}
$grade = isset($user->grade) && $user->grade<>' ' ? $user->grade : $spacer;
$attemptcount = count($user->attempts);
$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 = '<a href="review.php?hp='.$hotpot->id.'&attempt='.$attempt->id.'">'.$attemptnumber.'</a>';
- $starttime = '<a href="review.php?hp='.$hotpot->id.'&attempt='.$attempt->id.'">'.$starttime.'</a>';
+ $attemptnumber = '<a href="review.php?hp='.$hotpot->id.'&attempt='.$attempt->id.'">'.$attemptnumber.'</a>';
+ $starttime = '<a href="review.php?hp='.$hotpot->id.'&attempt='.$attempt->id.'">'.$starttime.'</a>';
}
if ($is_html && has_capability('mod/hotpot:viewreport',get_context_instance(CONTEXT_COURSE, $course->id))) {
- $checkbox = '<input type=checkbox name="box'.$attempt->clickreportid.'" value="'.$attempt->clickreportid.'">'.$spacer;
+ $checkbox = '<input type="checkbox" name="box'.$attempt->clickreportid.'" value="'.$attempt->clickreportid.'" />'.$spacer;
} else {
$checkbox = '';
}
$table->start = $this->deleteform_javascript();
$table->start .= '<form method="post" action="report.php" id="deleteform" onsubmit="'."return deletecheck('".$strdeletecheck."', 'selection')".'">'."\n";
$table->start .= '<input type="hidden" name="del" value="selection" />'."\n";
- $table->start .= '<input type="hidden" name="id" value="'.$cm->id.'">'."\n";
+ $table->start .= '<input type="hidden" name="id" value="'.$cm->id.'" />'."\n";
$table->finish = '<center>'."\n";
$table->finish .= '<input type="submit" value="'.get_string("deleteselected").'" /> '."\n";
if ($abandoned) {
- $table->finish .= '<input type=button value="'.get_string('deleteabandoned', 'hotpot').'" onClick="if(deletecheck('."'".addslashes(get_string('deleteabandonedcheck', 'hotpot', $abandoned))."', 'abandoned', true".')) document.getElementById(\'deleteform\').submit();" />'."\n";
+ $table->finish .= '<input type="button" value="'.get_string('deleteabandoned', 'hotpot').'" onClick="if(deletecheck('."'".addslashes(get_string('deleteabandonedcheck', 'hotpot', $abandoned))."', 'abandoned', true".')) document.getElementById(\'deleteform\').submit();" />'."\n";
}
- $table->finish .= '<input type=button value="'.get_string("deleteall").'" onClick="if(deletecheck('."'".addslashes($strdeletecheck)."', 'all', true".'))document.getElementById(\'deleteform\').submit();" />'."\n";
+ $table->finish .= '<input type="button" value="'.get_string("deleteall").'" onClick="if(deletecheck('."'".addslashes($strdeletecheck)."', 'all', true".'))document.getElementById(\'deleteform\').submit();" />'."\n";
$table->finish .= '</center>'."\n";
$table->finish .= '</form>'."\n";
}
$name = fullname($u);
if ($is_html) {
$picture = print_user_picture($u->userid, $course->id, $u->picture, false, true);
- $name = '<a href="'.$CFG->wwwroot.'/user/view.php?id='.$u->userid.'&course='.$course->id.'">'.$name.'</a>';
+ $name = '<a href="'.$CFG->wwwroot.'/user/view.php?id='.$u->userid.'&course='.$course->id.'">'.$name.'</a>';
}
if (isset($user->grade)) {
$grade = $user->grade;
// get attempt number
$attemptnumber= $attempt->attempt;
if ($is_html && $allow_review) {
- $attemptnumber = '<a href="review.php?hp='.$hotpot->id.'&attempt='.$attempt->id.'">'.$attemptnumber.'</a>';
+ $attemptnumber = '<a href="review.php?hp='.$hotpot->id.'&attempt='.$attempt->id.'">'.$attemptnumber.'</a>';
}
if ($is_best_grade) {
$score = '<span class="highlight">'.$attemptnumber.'</span>';
$a++;
}
- $gap .= '<input type="text" id="Gap'.$q.'" onfocus="TrackFocus('.$q.')" onblur="LeaveGap()" class="GapBox" size="'.$gapsize.'" /></input>';
+ $gap .= '<input type="text" id="Gap'.$q.'" onfocus="TrackFocus('.$q.')" onblur="LeaveGap()" class="GapBox" size="'.$gapsize.'"></input>';
}
if ($includeclues) {
$clue = $this->parent->xml_value($question_record, $question."['clue'][0]['#']");
$question_type==HOTPOT_JQUIZ_HYBRID
) {
$str .= '<div class="ShortAnswer" id="Q_'.$q.'_SA"><form method="post" action="" onsubmit="return false;"><div>';
- $str .= '<input type="text" id="Q_'.$q.'_Guess" onfocus="TrackFocus('."'".'Q_'.$q.'_Guess'."'".')" onblur="LeaveGap()" class="ShortAnswerBox" size="9" /></input><br /><br />';
+ $str .= '<input type="text" id="Q_'.$q.'_Guess" onfocus="TrackFocus('."'".'Q_'.$q.'_Guess'."'".')" onblur="LeaveGap()" class="ShortAnswerBox" size="9"></input><br /><br />';
$caption = $this->v6_expand_CheckCaption();
$str .= $this->v6_expand_jquiz_button($caption, "CheckShortAnswer($q)");