?>
<form id="assessmentform" method="post" action="assessments.php">
<input type="hidden" name="id" value="<?php echo $cm->id ?>" />
- <input type="hidden" name="aid" value="<?php echo $assessment->id ?>" />
+ <input type="hidden" name="aid" value="<?php echo @$assessment->id ?>" />
<input type="hidden" name="action" value="updateassessment" />
<input type="hidden" name="resubmit" value="0" />
<input type="hidden" name="returnto" value="<?php echo $returnto ?>" />
$timenow = time();
// always show the teacher the grading grade if it's not their assessment!
- if (isteacher($course->id) and ($assessment->userid != $USER->id) and $exercise->gradinggrade) {
+ if ($assessment and isteacher($course->id) and ($assessment->userid != $USER->id) and $exercise->gradinggrade) {
echo "<tr><td align=\"right\"><b>".get_string("gradeforstudentsassessment", "exercise", $course->student).
"</td><td>\n";
echo number_format($exercise->gradinggrade * $assessment->gradinggrade / 100.0, 0);
<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="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="" />
} else {
print_string('assessment', 'workshop');
}
- echo '</b><br />'.userdate($assessment->timecreated)."</div></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
- if ($showgrades and $workshop->gradingstrategy and $assessment->grade >= 0) {
+ if ($assessment and $showgrades and $workshop->gradingstrategy and $assessment->grade >= 0) {
echo "<tr valign=\"top\">\n
<td colspan=\"2\" align=\"center\">
<b>".get_string("thegradeis", "workshop").": ".
$timenow = time();
// now show the grading grade if available...
- if ($assessment->timegraded) {
+ if ($assessment and $assessment->timegraded) {
echo "<tr valign=\"top\">\n";
echo "<td colspan=\"2\" class=\"workshopassessmentheading\" align=\"center\"><b>".
get_string('gradeforstudentsassessment', 'workshop')."</b></td>\n";