From: nicolasconnault Date: Thu, 6 Mar 2008 09:42:33 +0000 (+0000) Subject: MDL-13046 Fixed notices. Merging from MOODLE_19_STABLE X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=6dfea401198141bd86e3f078386e9fa9507c7757;p=moodle.git MDL-13046 Fixed notices. Merging from MOODLE_19_STABLE --- diff --git a/mod/exercise/locallib.php b/mod/exercise/locallib.php index be25289779..365ee1e634 100644 --- a/mod/exercise/locallib.php +++ b/mod/exercise/locallib.php @@ -1569,7 +1569,7 @@ function exercise_print_assessment_form($exercise, $assessment = false, $allowch ?>
- + @@ -2004,7 +2004,7 @@ function exercise_print_assessment_form($exercise, $assessment = false, $allowch $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 "".get_string("gradeforstudentsassessment", "exercise", $course->student). "\n"; echo number_format($exercise->gradinggrade * $assessment->gradinggrade / 100.0, 0); diff --git a/mod/workshop/locallib.php b/mod/workshop/locallib.php index acc3c7cdab..58b7d91a45 100644 --- a/mod/workshop/locallib.php +++ b/mod/workshop/locallib.php @@ -2053,7 +2053,7 @@ function workshop_print_assessment($workshop, $assessment = false, $allowchanges
- + @@ -2069,11 +2069,11 @@ function workshop_print_assessment($workshop, $assessment = false, $allowchanges } else { print_string('assessment', 'workshop'); } - echo '
'.userdate($assessment->timecreated)."
\n"; + echo '
'.userdate(@$assessment->timecreated)."\n"; echo "\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 "\n ".get_string("thegradeis", "workshop").": ". @@ -2594,7 +2594,7 @@ function workshop_print_assessment($workshop, $assessment = false, $allowchanges $timenow = time(); // now show the grading grade if available... - if ($assessment->timegraded) { + if ($assessment and $assessment->timegraded) { echo "\n"; echo "". get_string('gradeforstudentsassessment', 'workshop')."\n";