fix Undefined property: stdClass::$studentfeedbackurl (line 282) and Undefined property: stdClass::$cellcontent2 (line 1081) in mod/hotpot/lib.php

This commit is contained in:
gbateson
2008-01-21 08:16:02 +00:00
parent ab327964e7
commit e5eabf22fe
+8 -5
View 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">';