]> git.mjollnir.org Git - moodle.git/commitdiff
fix Undefined property: stdClass::$studentfeedbackurl (line 282) and Undefined prope...
authorgbateson <gbateson>
Mon, 21 Jan 2008 08:16:02 +0000 (08:16 +0000)
committergbateson <gbateson>
Mon, 21 Jan 2008 08:16:02 +0000 (08:16 +0000)
mod/hotpot/lib.php

index 0c20858f25bd08a6fc24c16ff80811ae0fa5f283..a6250485969e7e229ed5588af092c1f9aa7264e6 100644 (file)
@@ -281,11 +281,8 @@ function hotpot_set_form_values(&$hotpot) {
         $hotpot->errors['reference']= get_string('error_nofilename', 'hotpot');
     }
 
-    if ($hotpot->studentfeedbackurl=='http://') {
+    if (empty($hotpot->studentfeedbackurl) || $hotpot->studentfeedbackurl=='http://') {
         $hotpot->studentfeedbackurl = '';
-    }
-
-    if (empty($hotpot->studentfeedbackurl)) {
         switch ($hotpot->studentfeedback) {
             case HOTPOT_FEEDBACK_WEBPAGE:
                 $ok = false;
@@ -1081,9 +1078,15 @@ function hotpot_print_recent_mod_activity($activity, $course, $detail=false) {
 
     global $CFG, $THEME, $USER;
 
+    if (isset($THEME->cellcontent2)) {
+        $bgcolor =  ' bgcolor="'.$THEME->cellcontent2.'"';
+    } else {
+        $bgcolor = '';
+    }
+
     print '<table border="0" cellpadding="3" cellspacing="0">';
 
-    print '<tr><td bgcolor="'.$THEME->cellcontent2.'" class="forumpostpicture" width="35" valign="top">';
+    print '<tr><td'.$bgcolor.' class="forumpostpicture" width="35" valign="top">';
     print_user_picture($activity->user->userid, $course, $activity->user->picture);
     print '</td><td width="100%"><font size="2">';