Permalink
Browse files

fix Undefined property: stdClass::$studentfeedbackurl (line 282) and …

…stdClass::$cellcontent2 (line 1081) in mod\hotpot\lib.php
  • Loading branch information...
1 parent 96be763 commit 4855134e63764debf14d0d5a1d2ceeb622a2289b gbateson committed Jan 21, 2008
Showing with 8 additions and 5 deletions.
  1. +8 −5 mod/hotpot/lib.php
View
@@ -279,11 +279,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;
@@ -1076,9 +1073,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">';

0 comments on commit 4855134

Please sign in to comment.