From c897eac5e42ca27ded487f73db9533e5c5c7eedc Mon Sep 17 00:00:00 2001 From: moodler Date: Wed, 8 Jan 2003 09:08:05 +0000 Subject: [PATCH] Some small robustness things, and a new style for quiz feedback text --- files/index.php | 2 +- files/mimetypes.php | 2 +- mod/choice/index.php | 2 ++ mod/choice/view.php | 2 ++ mod/quiz/lib.php | 2 +- theme/standard/styles.php | 3 +++ theme/standardblue/styles.php | 3 +++ theme/standardgreen/styles.php | 3 +++ theme/standardlogo/styles.php | 3 +++ theme/standardred/styles.php | 3 +++ theme/standardwhite/styles.php | 3 +++ 11 files changed, 25 insertions(+), 3 deletions(-) diff --git a/files/index.php b/files/index.php index 11fc1d8af6..aa5d8fc7d1 100644 --- a/files/index.php +++ b/files/index.php @@ -654,7 +654,7 @@ function displaydir ($wdir) { echo ""; echo ""; - if (($USER->fileop == "move") && $USER->filesource <> $wdir) { + if (!empty($USER->fileop) and ($USER->fileop == "move") and ($USER->filesource <> $wdir)) { echo "
"; echo " "; echo " "; diff --git a/files/mimetypes.php b/files/mimetypes.php index f4091332d7..7ecfc86997 100644 --- a/files/mimetypes.php +++ b/files/mimetypes.php @@ -27,7 +27,7 @@ function mimeinfo($element, $filename) { $result = $mimeinfo[strtolower($match[1])][$element]; } - if ($result) { + if (!empty($result)) { return $result; } else { return $mimeinfo["xxx"][$element]; // By default diff --git a/mod/choice/index.php b/mod/choice/index.php index bd901b1aaa..6e043dc742 100644 --- a/mod/choice/index.php +++ b/mod/choice/index.php @@ -15,6 +15,8 @@ if ($course->category) { $navigation = "id\">$course->shortname ->"; + } else { + $navigation = ""; } $strchoice = get_string("modulename", "choice"); diff --git a/mod/choice/view.php b/mod/choice/view.php index ed8e75075c..dc255b8afa 100644 --- a/mod/choice/view.php +++ b/mod/choice/view.php @@ -57,6 +57,8 @@ if ($course->category) { $navigation = "id\">$course->shortname ->"; + } else { + $navigation = ""; } print_header("$course->shortname: $choice->name", "$course->fullname", "$navigation id>$strchoices -> $choice->name", "", "", true, diff --git a/mod/quiz/lib.php b/mod/quiz/lib.php index 8830a5606e..4cec88a611 100644 --- a/mod/quiz/lib.php +++ b/mod/quiz/lib.php @@ -310,7 +310,7 @@ function quiz_get_attempt_responses($attempt) { function quiz_print_comment($text) { global $THEME; - echo "cellheading2\">".text_to_html($text, true, false).""; + echo "".text_to_html($text, true, false).""; } function quiz_print_correctanswer($text) { diff --git a/theme/standard/styles.php b/theme/standard/styles.php index 2500203a2f..d6ade57eaf 100644 --- a/theme/standard/styles.php +++ b/theme/standard/styles.php @@ -187,3 +187,6 @@ form { .generalboxcontent { } +.feedbacktext { + color: cellheading2?>; +} diff --git a/theme/standardblue/styles.php b/theme/standardblue/styles.php index 2500203a2f..d6ade57eaf 100644 --- a/theme/standardblue/styles.php +++ b/theme/standardblue/styles.php @@ -187,3 +187,6 @@ form { .generalboxcontent { } +.feedbacktext { + color: cellheading2?>; +} diff --git a/theme/standardgreen/styles.php b/theme/standardgreen/styles.php index 2500203a2f..d6ade57eaf 100644 --- a/theme/standardgreen/styles.php +++ b/theme/standardgreen/styles.php @@ -187,3 +187,6 @@ form { .generalboxcontent { } +.feedbacktext { + color: cellheading2?>; +} diff --git a/theme/standardlogo/styles.php b/theme/standardlogo/styles.php index 2500203a2f..d6ade57eaf 100644 --- a/theme/standardlogo/styles.php +++ b/theme/standardlogo/styles.php @@ -187,3 +187,6 @@ form { .generalboxcontent { } +.feedbacktext { + color: cellheading2?>; +} diff --git a/theme/standardred/styles.php b/theme/standardred/styles.php index 2500203a2f..d6ade57eaf 100644 --- a/theme/standardred/styles.php +++ b/theme/standardred/styles.php @@ -187,3 +187,6 @@ form { .generalboxcontent { } +.feedbacktext { + color: cellheading2?>; +} diff --git a/theme/standardwhite/styles.php b/theme/standardwhite/styles.php index 2500203a2f..d6ade57eaf 100644 --- a/theme/standardwhite/styles.php +++ b/theme/standardwhite/styles.php @@ -187,3 +187,6 @@ form { .generalboxcontent { } +.feedbacktext { + color: cellheading2?>; +} -- 2.39.5