From 1519aa2b71ba4200fe3b7194d2bab6a2a95ca9e4 Mon Sep 17 00:00:00 2001 From: moodler Date: Sun, 15 Apr 2007 07:26:23 +0000 Subject: [PATCH] Merged fixes for latest news from 1.8 MDL-9308 --- blocks/news_items/block_news_items.php | 2 +- course/format/scorm/format.php | 1 - course/format/topics/format.php | 2 -- course/format/weeks/format.php | 5 ----- course/format/weekscss/format.php | 6 ------ 5 files changed, 1 insertion(+), 15 deletions(-) diff --git a/blocks/news_items/block_news_items.php b/blocks/news_items/block_news_items.php index a95612bbb8..8f46dfadeb 100644 --- a/blocks/news_items/block_news_items.php +++ b/blocks/news_items/block_news_items.php @@ -25,7 +25,7 @@ class block_news_items extends block_base { if ($COURSE->newsitems) { // Create a nice listing of recent postings require_once($CFG->dirroot.'/mod/forum/lib.php'); // We'll need this - + $text = ''; if (!$forum = forum_get_course_forum($COURSE->id, 'news')) { diff --git a/course/format/scorm/format.php b/course/format/scorm/format.php index 5827f1bb8c..7c924a4eb5 100644 --- a/course/format/scorm/format.php +++ b/course/format/scorm/format.php @@ -2,7 +2,6 @@ // format.php - course format featuring single activity // included from view.php - require_once("$CFG->dirroot/mod/forum/lib.php"); $module = $course->format; require_once($CFG->dirroot.'/mod/'.$module.'/locallib.php'); diff --git a/course/format/topics/format.php b/course/format/topics/format.php index 6b5bb3174d..5076827596 100644 --- a/course/format/topics/format.php +++ b/course/format/topics/format.php @@ -7,10 +7,8 @@ // Included from "view.php" - require_once($CFG->dirroot.'/mod/forum/lib.php'); require_once($CFG->libdir.'/ajax/ajaxlib.php'); - $topic = optional_param('topic', -1, PARAM_INT); // Bounds for block widths diff --git a/course/format/weeks/format.php b/course/format/weeks/format.php index 0f21c85af2..3f3cf960c8 100644 --- a/course/format/weeks/format.php +++ b/course/format/weeks/format.php @@ -2,7 +2,6 @@ // Display the whole course as "weeks" made of of modules // Included from "view.php" - require_once("$CFG->dirroot/mod/forum/lib.php"); require_once($CFG->libdir.'/ajax/ajaxlib.php'); $week = optional_param('week', -1, PARAM_INT); @@ -34,10 +33,6 @@ } } - if ($course->newsitems) { - $news = forum_get_course_forum($course->id, 'news'); - } - $streditsummary = get_string('editsummary'); $stradd = get_string('add'); $stractivities = get_string('activities'); diff --git a/course/format/weekscss/format.php b/course/format/weekscss/format.php index dfab956121..fec9bc6e67 100644 --- a/course/format/weekscss/format.php +++ b/course/format/weekscss/format.php @@ -25,8 +25,6 @@ */ //TODO (nfreear): Accessibility: evaluation, lang/en_utf8/moodle.php: $string['formatweekscss'] - require_once("$CFG->dirroot/mod/forum/lib.php"); - $week = optional_param('week', -1, PARAM_INT); if ($week != -1) { @@ -39,10 +37,6 @@ } } - if ($course->newsitems) { - $news = forum_get_course_forum($course->id, 'news'); - } - $streditsummary = get_string('editsummary'); $stradd = get_string('add'); $stractivities = get_string('activities'); -- 2.39.5