*/
function print_heading($text, $align='', $size=2, $class='main', $return=false) {
if ($align) {
- $align = ' align="'.$align.'"';
+ $align = ' style="text-align:'.$align.';"';
}
if ($class) {
$class = ' class="'.$class.'"';
$output = '';
if (!$link) {
+
$link = $_SERVER['HTTP_REFERER'];
}
$output .= '<div class="continuebutton">';
+ // MDL-7861, referer string might not be xhtml strict
+ // e.g. &
+
$output .= print_single_button($link, NULL, get_string('continue'), 'post', $CFG->framename, true);
$output .= '</div>'."\n";
$output = '';
$output .= '<div class="singlebutton">';
// taking target out, will need to add later target="'.$target.'"
- $output .= '<form action="'. $link .'" method="'. $method .'">';
+ $output .= '<form action="'. $link .'" method="'. $method .'">';
$output .= '<fieldset class="invisiblefieldset">';
if ($options) {
foreach ($options as $name => $value) {
if (isset($table->align)) {
foreach ($table->align as $key => $aa) {
if ($aa) {
- $align[$key] = ' align="'. $aa .'"';
+ $align[$key] = ' text-align:'. $aa.';';
} else {
$align[$key] = '';
}
if (isset($table->size)) {
foreach ($table->size as $key => $ss) {
if ($ss) {
- $size[$key] = ' width="'. $ss .'"';
+ $size[$key] = ' width:'. $ss .';';
} else {
$size[$key] = '';
}
if (isset($table->wrap)) {
foreach ($table->wrap as $key => $ww) {
if ($ww) {
- $wrap[$key] = ' style="white-space:nowrap;" ';
+ $wrap[$key] = ' white-space:nowrap;';
} else {
$wrap[$key] = '';
}
if (!isset($align[$key])) {
$align[$key] = '';
}
- $output .= '<th valign="top" '. $align[$key].$size[$key] .' style="white-space:nowrap;" class="header c'.$key.'" scope="col">'. $heading .'</th>';
+
+ $output .= '<th class="header c'.$key.'" scope="col">'. $heading .'</th>';
+ // commenting the following code out as <th style does not validate MDL-7861
+ //$output .= '<th sytle="vertical-align:top;'. $align[$key].$size[$key] .';white-space:nowrap;" class="header c'.$key.'" scope="col">'. $heading .'</th>';
}
$output .= '</tr>'."\n";
}
if (!isset($wrap[$key])) {
$wrap[$key] = '';
}
- $output .= '<td '. $align[$key].$size[$key].$wrap[$key] .' class="cell c'.$key.'">'. $item .'</td>';
+ $output .= '<td style="'. $align[$key].$size[$key].$wrap[$key] .'" class="cell c'.$key.'">'. $item .'</td>';
}
}
$output .= '</tr>'."\n";
if (!$redirect) {
//seems not to work properly
-// $redirect = urlencode($_SERVER["HTTP_REFERER"].'#sid='.$submission->id);
+ $redirect = htmlentities($_SERVER["HTTP_REFERER"].'#sid='.$submission->id);
}
/// top frame with the navigation bar and the assessment form
if ($frameset == "top") {
-
+ // removed <base target="_parent" />
+ // because it does not validate MDL-7861
print_header_simple(format_string($workshop->name), "",
"<a href=\"index.php?id=$course->id\">$strworkshops</a> ->
<a href=\"view.php?id=$cm->id\">".format_string($workshop->name,true)."</a> -> $strassess",
- "", '<base target="_parent" />', true);
+ "", '', true);
// there can be an assessment record (for teacher submissions), if there isn't...
if (!$assessment = get_record("workshop_assessments", "submissionid", $submission->id, "userid",
}
/// print bottom frame with the submission
-
- print_header('', '', '', '', '<base target="_parent" />');
+ // removed <base target="_parent" /> as it does not validate MDL-7861
+ print_header('', '', '', '', '');
$title = '"'.$submission->title.'" ';
if (workshop_is_teacher($workshop)) {
$title .= ' '.get_string('by', 'workshop').' '.workshop_fullname($submission->userid, $course->id);
workshop_print_submission($workshop, $submission);
if (workshop_is_teacher($workshop)) {
- echo '<br /><center><b>'.get_string('assessments', 'workshop').': </b><br />';
+ echo '<br /><div style="text-align:center"><b>'.get_string('assessments', 'workshop').': </b><br />';
echo workshop_print_submission_assessments($workshop, $submission, "all");
- echo '</center>';
+ echo '</div>';
}
}
?>
<form id="gradingform" action="assessments.php" method="post">
+<fieldset class="invisiblefieldset">
<input type="hidden" name="action" value="updategrading" />
<input type="hidden" name="id" value="<?php echo $cm->id ?>" />
<input type="hidden" name="redirect" value="<?php echo $redirect ?>" />
<input type="hidden" name="aid" value="<?php echo $aid ?>" />
- <center>
+ <div class="boxaligncenter">
<table cellpadding="5" border="1">
<tr valign="top">
<td align="right"><b><?php print_string("teacherscomment", "workshop") ?>:</b></td>
</tr>
</table>
<input type="submit" value="<?php print_string("savemygrading", "workshop") ?>" />
- </center>
+ </div>
+</fieldset>
</form>
\ No newline at end of file
<input type="hidden" name="action" value="insertcomment" />
<input type="hidden" name="id" value="<?php echo $cm->id ?>" />
<input type="hidden" name="aid" value="<?php echo $aid ?>" />
- <center>
+ <div class="boxaligncenter">
<table cellpadding="5" border="1">
<?php
echo " </td></tr></table>\n";
echo "<input type=\"submit\" value=\"".get_string("savemycomment", "workshop")."\" />\n";
- echo "</center></form>\n";
- echo "<center><b>".get_string("assessment", "workshop"). "</b></center>\n";
+ echo "</div></form>\n";
+ echo "<div style=\"text-align:center\"><b>".get_string("assessment", "workshop"). "</b></div>\n";
workshop_print_assessment($workshop, $assessment);
}
}
//save time of agreement
set_field("workshop_assessments", "timeagreed", $timenow, "id", $assessment->id);
- echo "<centre><b>".get_string("savedok", "workshop")."</b></center><br />\n";
+ echo "<div style=\"text-align:center\"><b>".get_string("savedok", "workshop")."</b></div><br />\n";
add_to_log($course->id, "workshop", "agree", "viewassessment.php?id=$cm->id&aid=$assessment->id", "$assessment->id");
print_continue("view.php?id=$cm->id");
<input type="hidden" name="action" value="updatecomment" />
<input type="hidden" name="id" value="<?php echo $cm->id ?>" />
<input type="hidden" name="cid" value="<?php echo $cid ?>" />
- <center>
+ <div class="boxaligncenter">
<table cellpadding="5" border="1">
<?php
echo " </textarea>\n";
echo " </td></tr></table>\n";
echo "<input type=\"submit\" value=\"".get_string("savemycomment", "workshop")."\" />\n";
- echo "</center></form>\n";
+ echo "</div></form>\n";
workshop_print_assessment($workshop, $assessment);
}
<form id="form" method="post" action="assessments.php">
<input type="hidden" name="id" value="<?php echo $cm->id ?>" />
<input type="hidden" name="action" value="insertelements" />
- <center><table cellpadding="5" border="1">
+ <div class="boxaligncenter"><table cellpadding="5" border="1">
<?php
// get existing elements, if none set up appropriate default ones
echo " <td colspan=\"2\" class=\"workshopassessmentheading\"> </td>\n";
echo "</tr>\n";
}
- echo "</center></table><br />\n";
- echo "<center><b>".get_string("gradetable","workshop")."</b></center>\n";
- echo "<center><table cellpadding=\"5\" border=\"1\"><tr><td align=\"CENTER\">".
+ echo "</div></table><br />\n";
+ echo "<div style=\"text-align:center\"><b>".get_string("gradetable","workshop")."</b></div>\n";
+ echo "<div class=\"boxaligncenter\"><table cellpadding=\"5\" border=\"1\"><tr><td align=\"CENTER\">".
get_string("numberofnegativeresponses", "workshop");
echo "</td><td>". get_string("suggestedgrade", "workshop")."</td></tr>\n";
for ($j = $workshop->grade; $j >= 0; $j--) {
choose_from_menu($numbers, "maxscore[$i]", $elements[$i]->maxscore, "");
echo "</td></tr>\n";
}
- echo "</table></center>\n";
+ echo "</table></div>\n";
break;
case 3: // criterion grading
</table><br />
<input type="submit" value="<?php print_string("savechanges") ?>" />
<input type="submit" name="cancel" value="<?php print_string("cancel") ?>" />
- </center>
+ </div>
</form>
<?php
}
}
// get the teacher's assessment first
if ($teachersassessment = workshop_get_submission_assessment($submission, $USER)) {
- echo "<center><b>".get_string("teacherassessments", "workshop", $course->teacher)."</b></center>\n";
+ echo "<div style=\"text-align:center\"><b>".get_string("teacherassessments", "workshop", $course->teacher)."</b></div>\n";
workshop_print_assessment($workshop, $teachersassessment);
}
// now the student's assessment (don't allow changes)
$user = get_record("user", "id", $assessment->userid);
- echo "<center><b>".get_string("assessmentby", "workshop", $user->firstname." ".$user->lastname)."</b></center>\n";
+ echo "<div style=\"text-align:center\"><b>".get_string("assessmentby", "workshop", $user->firstname." ".$user->lastname)."</b></div>\n";
workshop_print_assessment($workshop, $assessment);
include('assessment_grading_form.html');
set_field("workshop_comments", "timecreated", $timenow, "id", $comment->id);
// ..and kick to comment into life (probably not needed but just in case)
set_field("workshop_comments", "mailed", 0, "id", $comment->id);
- echo "<centre><b>".get_string("savedok", "workshop")."</b></center><br />\n";
+ echo "<centre><b>".get_string("savedok", "workshop")."</b></div><br />\n";
add_to_log($course->id, "workshop", "comment",
"viewassessment.php?id=$cm->id&aid=$assessment->id", "$comment->id");
$submitted = userdate($submission->timecreated);
}
else {
- $submitted = "<font color=\"red\">".userdate($submission->timecreated)."</font>";
+ $submitted = "<span class=\"redfont\">".userdate($submission->timecreated)."</span>";
}
if (!$workshop->visible) {
//Show dimmed if the mod is hidden
}
}
if ($verbose) {
- echo "<p align=\"center\">".get_string("numberofsubmissions", "workshop", count($num))."<br />\n";
+ echo "<p style=\"text-align:center\">".get_string("numberofsubmissions", "workshop", count($num))."<br />\n";
echo get_string("numberofassessmentsweighted", "workshop", $total)."</p>\n";
}
print_table($table);
}
- echo "<center><p><b>".get_string("studentsubmissions", "workshop", $course->student).
- "</b></center><br />\n";
+ echo "<div style=\"text-align:center;\"><p><b>".get_string("studentsubmissions", "workshop", $course->student).
+ "</b></div><br />\n";
unset($table);
$table->head = array (get_string("title", "workshop"), get_string("action", "workshop"),
get_string("comment", "workshop"));
print_table($table);
}
else {
- echo "<center>".get_string("noassessmentsdone", "workshop")."</center>\n";
+ echo "<div style=\"text-align:center;\">".get_string("noassessmentsdone", "workshop")."</div>\n";
}
}
print_table($table);
}
else {
- echo "<center>".get_string("noassessmentsdone", "workshop")."</center>\n";
+ echo "<div style=\"text-align:center;\">".get_string("noassessmentsdone", "workshop")."</div>\n";
}
}
}
}
if (isset($table->data)) {
- echo "<p><center><b>".get_string("pleaseassessyoursubmissions", "workshop", $course->student).
- "</b></center><br />\n";
+ echo "<p><div style=\"text-align:center;\"><b>".get_string("pleaseassessyoursubmissions", "workshop", $course->student).
+ "</b></div><br />\n";
print_table($table);
}
}
}
if (isset($table->data)) {
- echo "<p><center><b>".get_string("pleaseassessthesestudentsubmissions", "workshop", $course->student).
- "</b></center><br />\n";
+ echo "<p><div style=\"text-align:center;\"><b>".get_string("pleaseassessthesestudentsubmissions", "workshop", $course->student).
+ "</b></div><br />\n";
print_table($table);
}
else {
- echo "<p><center><b>".get_string("nosubmissionsavailableforassessment", "workshop")."</b></center><br />\n";
+ echo "<p><div style=\"text-align:center;\"><b>".get_string("nosubmissionsavailableforassessment", "workshop")."</b></div><br />\n";
}
}
number_format($stats->min* $workshop->gradinggrade / 100, 1));
print_heading(get_string("gradinggrade", "workshop")." ".get_string("analysis", "workshop"));
print_table($table);
- echo "<p align=\"center\"><a href=\"assessments.php?id=$cm->id&action=regradestudentassessments\">".
+ echo "<p style=\"text-align:center\"><a href=\"assessments.php?id=$cm->id&action=regradestudentassessments\">".
get_string("regradestudentassessments", "workshop")."</a> ";
helpbutton("regrading", get_string("regradestudentassessments", "workshop"), "workshop");
echo "</p>\n";
}
$datesubmitted = userdate($submission->timecreated);
if ($submission->late) {
- $datesubmitted = "<font color=\"red\">".$datesubmitted."</font>";
+ $datesubmitted = "<span class=\"redfont\">".$datesubmitted."</span>";
}
$action = "<a href=\"submissions.php?action=adminamendtitle&id=$cm->id&sid=$submission->id\">".
get_string("amendtitle", "workshop")."</a>";
print_table($table);
}
else {
- echo "<center>".get_string("noassessmentsdone", "workshop")."</center>\n";
+ echo "<div style=\"text-align:center;\">".get_string("noassessmentsdone", "workshop")."</div>\n";
}
}
}
$datesubmitted = userdate($submission->timecreated);
if ($submission->late) {
- $datesubmitted = "<font color=\"red\">".$datesubmitted."</font>";
+ $datesubmitted = "<span class=\"redfont\">".$datesubmitted."</span>";
}
$n = count_records_select("workshop_assessments", "submissionid = $submission->id AND
timecreated < ($timenow - $CFG->maxeditingtime)");
error ("Workshop_print_assessment: Submission record not found");
}
+ // removed target=\"submission\" as it does not validate
+ // MDL-7861
print_heading(get_string('assessmentof', 'workshop',
- "<a href=\"submissions.php?id=$cm->id&action=showsubmission&sid=$submission->id\" target=\"submission\">".
+ "<a href=\"submissions.php?id=$cm->id&action=showsubmission&sid=$submission->id\" >".
$submission->title.'</a>'));
}
$showgrades = true;
}
- echo "<center>\n";
+ echo "<div class=\"boxaligncenter\">\n";
// see if this is a pre-filled assessment for a re-submission...
if ($assessment->resubmission) {
// show links depending on who doing the viewing
$firstcomment = FALSE;
if (workshop_is_teacher($workshop, $USER->id) and ($comment->userid != $USER->id)) {
- echo "<p align=\"right\"><a href=\"assessments.php?action=addcomment&id=$cm->id&aid=$assessment->id\">".
+ echo "<p style=\"text-align:right\"><a href=\"assessments.php?action=addcomment&id=$cm->id&aid=$assessment->id\">".
get_string("reply", "workshop")."</a></p>\n";
}
elseif (($comment->userid ==$USER->id) and (($timenow - $comment->timecreated) < $CFG->maxeditingtime)) {
- echo "<p align=\"right\"><a href=\"assessments.php?action=editcomment&id=$cm->id&cid=$comment->id\">".
+ echo "<p style=\"text-align:right\"><a href=\"assessments.php?action=editcomment&id=$cm->id&cid=$comment->id\">".
get_string("edit", "workshop")."</a>\n";
if ($USER->id == $submission->userid) {
echo " | <a href=\"assessments.php?action=agreeassessment&id=$cm->id&aid=$assessment->id\">".
}
elseif (($comment->userid != $USER->id) and (($USER->id == $assessment->userid) or
($USER->id == $submission->userid))) {
- echo "<p align=\"right\"><a href=\"assessments.php?action=addcomment&id=$cm->id&aid=$assessment->id\">".
+ echo "<p style=\"text-align:right\"><a href=\"assessments.php?action=addcomment&id=$cm->id&aid=$assessment->id\">".
get_string("reply", "workshop")."</a>\n";
if ($USER->id == $submission->userid) {
echo " | <a href=\"assessments.php?action=agreeassessment&id=$cm->id&aid=$assessment->id\">".
}
echo '</table>';
}
- echo '</center>';
+ echo '</div>';
}
// now print the grading form with the grading grade if any
// FORM is needed for Mozilla browsers, else radio bttons are not checked
?>
<form id="assessmentform" method="post" action="assessments.php">
+ <div>
<input type="hidden" name="id" value="<?php echo $cm->id ?>" />
<input type="hidden" name="aid" value="<?php echo $assessment->id ?>" />
<input type="hidden" name="action" value="updateassessment" />
<input type="hidden" name="returnto" value="<?php echo $returnto ?>" />
<input type="hidden" name="elementno" value="" />
<input type="hidden" name="stockcommentid" value="" />
- <center>
- <table cellpadding="2" border="1">
+ <div class="boxaligncenter">
+ <table cellpadding="2" border="1" class="boxaligncenter">
<?php
echo "<tr valign=\"top\">\n";
- echo " <td colspan=\"2\" class=\"workshopassessmentheading\"><center><b>";
+ echo " <td colspan=\"2\" class=\"workshopassessmentheading\"><div style=\"text-align:center;\"><b>";
if ($assessment and workshop_is_teacher($workshop)) {
$user = get_record('user', 'id', $assessment->userid);
print_string("assessmentby", "workshop", fullname($user));
} else {
print_string('assessment', 'workshop');
}
- echo '</b><br />'.userdate($assessment->timecreated)."</center></td>\n";
+ echo '</b><br />'.userdate($assessment->timecreated)."</div></td>\n";
echo "</tr>\n";
// only show the grade if grading strategy > 0 and the grade is positive
echo "<tr valign=\"top\">\n";
echo " <td align=\"right\"><p><b>". get_string("element","workshop")." $iplus1:</b></p></td>\n";
echo " <td>".format_text($elements[$i]->description);
- echo "<p align=\"right\"><font size=\"1\">".get_string("weight", "workshop").": ".
- number_format($WORKSHOP_EWEIGHTS[$elements[$i]->weight], 2)."</font></p>\n";
+ echo "<p style=\"text-align:right\">".get_string("weight", "workshop").": ".
+ number_format($WORKSHOP_EWEIGHTS[$elements[$i]->weight], 2)."</p>\n";
echo "</td></tr>\n";
if ($showgrades) {
echo "<tr valign=\"top\">\n";
switch ($SCALE->type) {
case 'radio' :
// show selections highest first
- echo "<center><b>$SCALE->start</b> ";
+ echo "<div class=\"boxaligncenter\"><b>$SCALE->start</b> ";
for ($j = $SCALE->size - 1; $j >= 0 ; $j--) {
$checked = false;
if (isset($grades[$i]->grade)) {
echo " <input type=\"radio\" name=\"grade[$i]\" value=\"$j\" alt=\"$j\" /> \n";
}
}
- echo " <b>$SCALE->end</b></center>\n";
+ echo " <b>$SCALE->end</b></div>\n";
break;
case 'selection' :
unset($numbers);
echo "<tr valign=\"top\">\n";
echo " <td align=\"right\"><p><b>". get_string("element","workshop")." $iplus1:</b></p></td>\n";
echo " <td>".format_text($elements[$i]->description);
- echo "<p align=\"right\"><font size=\"1\">".get_string("weight", "workshop").": ".
- number_format($WORKSHOP_EWEIGHTS[$elements[$i]->weight], 2)."</font>\n";
+ echo "<p style=\"text-align:right\">".get_string("weight", "workshop").": ".
+ number_format($WORKSHOP_EWEIGHTS[$elements[$i]->weight], 2)."\n";
echo "</td></tr>\n";
echo "<tr valign=\"top\">\n";
echo " <td align=\"right\"><p><b>". get_string("grade"). ":</b></p></td>\n";
switch ($SCALE->type) {
case 'radio' :
// show selections highest first
- echo "<center><b>$SCALE->start</b> ";
+ echo "<div class=\"boxaligncenter\"><b>$SCALE->start</b> ";
for ($j = $SCALE->size - 1; $j >= 0 ; $j--) {
$checked = false;
if (isset($grades[$i]->grade)) {
echo " <input type=\"radio\" name=\"grade[$i]\" value=\"$j\" alt=\"$j\" /> \n";
}
}
- echo " <b>$SCALE->end</b></center>\n";
+ echo " <b>$SCALE->end</b></div>\n";
break;
case 'selection' :
unset($numbers);
// echo "<tr><td>".get_string("numberofnegativeitems", "workshop")."</td><td>$negativecount</td></tr>\n";
// echo "<tr valign=\"top\">\n";
// echo " <td colspan=\"2\" class=\"workshopassessmentheading\"> </td>\n";
- echo "</table></center>\n";
+ echo "</table></div>\n";
// now print the grade table
- echo "<p><center><b>".get_string("gradetable","workshop")."</b></center>\n";
- echo "<center><table cellpadding=\"5\" border=\"1\"><tr><td align=\"CENTER\">".
+ echo "<p><div style=\"text-align:center;\"><b>".get_string("gradetable","workshop")."</b></div>\n";
+ echo "<div class=\"boxaligncenter\"><table cellpadding=\"5\" border=\"1\"><tr><td align=\"CENTER\">".
get_string("numberofnegativeresponses", "workshop");
echo "</td><td>". get_string("suggestedgrade", "workshop")."</td></tr>\n";
for ($j = 100; $j >= 0; $j--) {
echo "<tr><td align=\"CENTER\">$i</td><td align=\"CENTER\">{$elements[$i]->maxscore}</td></tr>\n";
}
}
- echo "</table></center>\n";
- echo "<p><center><table cellpadding=\"5\" border=\"1\"><tr><td><b>".get_string("optionaladjustment",
+ echo "</table></div>\n";
+ echo "<p><div class=\"boxaligncenter\"><table cellpadding=\"5\" border=\"1\"><tr><td><b>".get_string("optionaladjustment",
"workshop")."</b></td><td>\n";
unset($numbers);
for ($j = 20; $j >= -20; $j--) {
}
echo "<td align=\"center\">{$elements[$i]->maxscore}</td></tr>\n";
}
- echo "</table></center>\n";
- echo "<p><center><table cellpadding=\"5\" border=\"1\"><tr><td><b>".get_string("optionaladjustment",
+ echo "</table></div>\n";
+ echo "<p><div class=\"boxaligncenter\"><table cellpadding=\"5\" border=\"1\"><tr><td><b>".get_string("optionaladjustment",
"workshop")."</b></td><td>\n";
unset($numbers);
for ($j = 20; $j >= -20; $j--) {
echo "<tr valign=\"top\">\n";
echo "<td align=\"right\"><b>".get_string("element", "workshop")." $iplus1:</b></td>\n";
echo "<td>".format_text($elements[$i]->description).
- "<p align=\"right\"><font size=\"1\">".get_string("weight", "workshop").": ".
- number_format($WORKSHOP_EWEIGHTS[$elements[$i]->weight], 2)."</font></td></tr>\n";
+ "<p style=\"text-align:right\">".get_string("weight", "workshop").": ".
+ number_format($WORKSHOP_EWEIGHTS[$elements[$i]->weight], 2)."</td></tr>\n";
echo "<tr valign=\"top\">\n";
echo " <td class=\"workshopassessmentheading\" align=\"center\"><b>".get_string("select", "workshop").
"</b></td>\n";
onclick=\"getElementById('assessmentform').action.value='addcomment';getElementById('assessmentform').submit();\" />\n";
}
}
- echo "</center>";
- echo "</form>\n";
+ echo "</div>";
+ echo "</div></form>\n";
}
if ($assessments = workshop_get_user_assessments_done($workshop, $user)) {
foreach ($assessments as $assessment) {
workshop_print_assessment($workshop, $assessment);
- echo "<p align=\"right\">".
+ echo "<p style=\"text-align:right\">".
'<a href="viewassessment.php?&id='.$cm->id.'&stype=student&aid='.$assessment->id.'">'.
get_string('assessthisassessment', 'workshop').'</a> | '.
"<a href=\"assessments.php?action=confirmdelete&id=$cm->id&aid=$assessment->id\">".
if (!$user = get_record("user", "id", $assessment->userid)) {
error (" workshop_print_assessments_for_admin: unable to get user record");
}
- echo "<p><center><b>".get_string("assessmentby", "workshop", fullname($user))."</b></center></p>\n";
+ echo "<p><div style=\"text-align:center;\"><b>".get_string("assessmentby", "workshop", fullname($user))."</b></div></p>\n";
workshop_print_assessment($workshop, $assessment);
- echo "<p align=\"right\"><a href=\"assessments.php?action=confirmdelete&id=$cm->id&aid=$assessment->id\">".
+ echo "<p style=\"text-align:right\"><a href=\"assessments.php?action=confirmdelete&id=$cm->id&aid=$assessment->id\">".
get_string("delete", "workshop")."</a></p><hr />\n";
}
}
if ($date) {
$strdifference = format_time($date - time());
if (($date - time()) < 0) {
- $strdifference = "<font color=\"red\">$strdifference</font>";
+ $strdifference = "<span class=\"redfont\">$strdifference</span>";
}
$string .= '<b>'.get_string($type, 'workshop').'</b>: '.userdate($date)." ($strdifference)<br />";
}
function workshop_print_difference($time) {
if ($time < 0) {
$timetext = get_string("late", "assignment", format_time($time));
- return " (<font color=\"red\">$timetext</font>)";
+ return " (<span class=\"redfont\">$timetext</span>)";
} else {
$timetext = get_string("early", "assignment", format_time($time));
return " ($timetext)";
if (!$course = get_record("course", "id", $workshop->course)) {
error("Print key: course not found");
}
- echo "<div align=\"center\">\n";
+ echo "<div class=\"workshopkey\">\n";
echo "<p><small>{} ".get_string("assessmentby", "workshop", $course->student)."; \n";
echo "[] ".get_string("assessmentby", "workshop", $course->teacher)."; \n";
echo "<> ".get_string("assessmentdropped", "workshop").";\n";
$ffurl = "file.php?file=/$filearea/$file";
}
echo "<tr><td><b>".get_string("attachment", "workshop")." $n:</b> \n";
+ // removed target=\"uploadedfile\" as it does not validate
+ // MDL-7861
echo "<img src=\"$CFG->pixpath/f/$icon\" class=\"icon\" alt=\"".get_string('file')."\" />".
- " <a target=\"uploadedfile\" href=\"$CFG->wwwroot/$ffurl\">$file</a></td></tr>";
+ " <a href=\"$CFG->wwwroot/$ffurl\">$file</a></td></tr>";
$n++;
}
}
function workshop_print_time_to_deadline($time) {
if ($time < 0) {
$timetext = get_string("afterdeadline", "workshop", format_time($time));
- return " (<font color=\"red\">$timetext</font>)";
+ return " (<span class=\"redfont\">$timetext</span>)";
} else {
$timetext = get_string("beforedeadline", "workshop", format_time($time));
return " ($timetext)";
}
$usehtmleditor = can_use_html_editor();
- echo "<div align=\"center\">";
+ echo "<div class=\"workshopuploadform\">";
echo "<form enctype=\"multipart/form-data\" method=\"POST\" action=\"upload.php\">";
+ echo "<fieldset class=\"invisiblefieldset\">";
echo " <input type=\"hidden\" name=\"id\" value=\"$cm->id\" />";
echo "<table celpadding=\"5\" border=\"1\" align=\"center\">\n";
// now get the submission
}
echo "</td></tr></table>\n";
echo " <input type=\"submit\" name=\"save\" value=\"".get_string("submitassignment","workshop")."\" />";
- echo "</form>";
+ echo "</fieldset></form>";
echo "</div>";
}
</tr>
<tr valign="top">
<td align="right"><b><?php print_string("description", "workshop") ?>:</b><br />
- <font size="1">
<?php
helpbutton("writing", get_string("helpwriting"), "moodle", true, true);
echo "<br />";
}
?>
<br />
- </font>
</td>
<td>
<?php
if ($usehtmleditor) {
echo '<input type="hidden" name="format" value="'.FORMAT_HTML.'" />';
} else {
- echo '<p align="right">';
+ echo '<p style="text-align:right">';
helpbutton("textformat", get_string("formattexttype"));
print_string("formattexttype");
echo ': ';
<?php print_standard_coursemodule_settings($form); ?>
</table>
<br />
-<center>
+<div class="boxaligncenter">
<input type="hidden" name="course" value="<?php p($form->course) ?>" />
<input type="hidden" name="sesskey" value="<?php p($form->sesskey) ?>" />
<input type="hidden" name="coursemodule" value="<?php p($form->coursemodule) ?>" />
<input type="hidden" name="mode" value="<?php p($form->mode) ?>" />
<input type="submit" value="<?php print_string("savechanges") ?>" />
<input type="submit" name="cancel" value="<?php print_string("cancel") ?>" />
-
-
-</center>
+</div>
</form>
print_heading(get_string("amendtitle", "workshop"));
?>
<form id="amendtitleform" action="submissions.php" method="post">
+ <fieldset class="invisiblefieldset">
<input type="hidden" name="action" value="adminupdatetitle" />
<input type="hidden" name="id" value="<?php echo $cm->id ?>" />
<input type="hidden" name="sid" value="<?php echo $sid ?>" />
- <center>
+ <div class="boxaligncenter">
<table cellpadding="5" border="1">
<?php
echo " <input type=\"text\" name=\"title\" size=\"60\" maxlength=\"100\" value=\"$submission->title\" />\n";
echo " </td></tr></table>\n";
echo "<input type=\"submit\" value=\"".get_string("amendtitle", "workshop")."\" />\n";
- echo "</center></form>\n";
+ echo "</div></fieldset></form>\n";
print_heading("<a $CFG->frametarget href=\"view.php?id=$cm->id#sid=$submission->id\">".get_string("cancel")."</a>");
}
}
?>
<form id="editform" enctype="multipart/form-data" action="submissions.php" method="post">
+ <fieldset class="invisiblefieldset">
<input type="hidden" name="action" value="updatesubmission" />
<input type="hidden" name="id" value="<?php echo $cm->id ?>" />
<input type="hidden" name="sid" value="<?php echo $sid ?>" />
- <center>
+ <div class="boxaligncenter">
<table cellpadding="5" border="1">
<?php
echo "<tr valign=\"top\"><td><b>". get_string("title", "workshop").":</b>\n";
if ($basedir = workshop_file_area($workshop, $submission)) {
if ($files = get_directory_list($basedir)) {
echo "<tr><td><b>".get_string("attachments", "workshop").
- "</b><div align=\"right\"><input type=\"button\" value=\"".get_string("removeallattachments",
+ "</b><div style=\"text-align:right;\"><input type=\"button\" value=\"".get_string("removeallattachments",
"workshop")."\" onclick=\"getElementById('editform').action.value='removeattachments';
getElementById('editform').submit();\"/></div></td></tr>\n";
$n = 1;
} else {
$ffurl = "file.php?file=/$filearea/$file";
}
+ // removed target=\"uploadedfile\"
+ // as it does not validate MDL_7861
echo "<tr><td>".get_string("attachment", "workshop")." $n: <img src=\"$CFG->pixpath/f/$icon\"
class=\"icon\" alt=\"".get_string('file')."\" />".
- " <a target=\"uploadedfile\" href=\"$CFG->wwwroot/$ffurl\">$file</a></td></tr>\n";
+ " <a href=\"$CFG->wwwroot/$ffurl\">$file</a></td></tr>\n";
}
} else {
echo "<tr><td><b>".get_string("noattachments", "workshop")."</b></td></tr>\n";
echo "</table>\n";
echo "<input type=\"submit\" value=\"".get_string("savemysubmission", "workshop")."\" />\n";
- echo "</center></form>\n";
+ echo "</div></fieldset></form>\n";
}
$title .= get_string('by', 'workshop').' '.workshop_fullname($submission->userid, $course->id);
}
print_heading($title);
- echo '<center>'.get_string('submitted', 'workshop').': '.userdate($submission->timecreated).'</center><br />';
+ echo '<div style="text-align:center">'.get_string('submitted', 'workshop').': '.userdate($submission->timecreated).'</div><br />';
workshop_print_submission($workshop, $submission);
- print_continue($_SERVER['HTTP_REFERER'].'#sid='.$submission->id);
+ print_continue(htmlentities($_SERVER['HTTP_REFERER'].'#sid='.$submission->id));
}
// show the final grades as stored in the tables...
if ($submissions = workshop_get_user_submissions($workshop, $USER)) { // any submissions from user?
print_heading(get_string("displayoffinalgrades", "workshop"));
- echo "<center><table border=\"1\" width=\"90%\"><tr>";
+ echo "<div class=\"boxaligncenter\"><table border=\"1\" width=\"90%\"><tr>";
echo "<td><b>".get_string("submissions", "workshop")."</b></td>";
if ($workshop->wtype) {
echo "<td align=\"center\"><b>".get_string("assessmentsdone", "workshop")."</b></td>";
echo "<td align=\"center\">$grade</td>";
echo "<td align=\"center\">".number_format($gradinggrade + $grade, 1)."</td></tr>\n";
}
- echo "</table></center><br clear=\"all\" />\n";
+ echo "</table></div><br clear=\"all\" />\n";
workshop_print_key($workshop);
} else {
print_heading(get_string('nowork', 'workshop'));
workshop_print_assignment_info($workshop);
print_simple_box(format_text($workshop->description, $workshop->format), 'center', '70%', '', 5, 'generalbox', 'intro');
if (isset($_SERVER["HTTP_REFERER"])) {
- print_continue($_SERVER["HTTP_REFERER"]);
+ print_continue(htmlentities($_SERVER["HTTP_REFERER"]));
} else {
print_continue("$CFG->wwwroot/course/view.php?id=$cm->id");
}
}
if (!$redirect) {
- $redirect = urlencode($_SERVER["HTTP_REFERER"].'#sid='.$submission->id);
+ $redirect = htmlentities($_SERVER["HTTP_REFERER"].'#sid='.$submission->id);
}
require_login($course->id, false, $cm);
if ($frameset == "top") {
+ // removed <base target="_parent" /> as it does not validate
print_header_simple(format_string($workshop->name), "",
"<a href=\"index.php?id=$course->id\">$strworkshops</a> ->
<a href=\"view.php?id=$cm->id\">".format_string($workshop->name,true)."</a> -> $strassess",
- "", '<base target="_parent" />', true);
+ "", '', true);
// show assessment but don't allow changes
workshop_print_assessment($workshop, $assessment, false, $allowcomments);
}
/// print bottom frame with the submission
-
- print_header('', '', '', '', '<base target="_parent" />');
+ // removed <base target="_parent" /> as it does not validate
+ print_header('', '', '', '', '');
$title = '"'.$submission->title.'" ';
if (workshop_is_teacher($workshop)) {
$title .= ' '.get_string('by', 'workshop').' '.workshop_fullname($submission->userid, $course->id);
/***
*** Modules: Workshop
***/
+.redfont {
+ color: red;
+}
+
+.workshopuploadform,
+.workshopkey {
+ text-align:center;
+}
\ No newline at end of file