From 99235a67cd8386a39faccfb5b496bfd411df9fff Mon Sep 17 00:00:00 2001 From: defacer Date: Thu, 16 Sep 2004 10:55:17 +0000 Subject: [PATCH] Merging changes from MOODLE_14_STABLE --- blocks/course_summary/block_course_summary.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/blocks/course_summary/block_course_summary.php b/blocks/course_summary/block_course_summary.php index ff911cf1db..e81980008b 100644 --- a/blocks/course_summary/block_course_summary.php +++ b/blocks/course_summary/block_course_summary.php @@ -2,7 +2,7 @@ class CourseBlock_course_summary extends MoodleBlock { function CourseBlock_course_summary ($course) { - if (empty($course->category)) { // Site level + if(!empty($course) && $course->id == SITEID) { // Site level $this->title = get_string('frontpagedescription'); } else { $this->title = get_string('blockname','block_course_summary'); @@ -26,13 +26,13 @@ class CourseBlock_course_summary extends MoodleBlock { $this->content = New stdClass; $options->noclean = true; // Don't clean Javascripts etc $this->content->text = format_text($this->course->summary, FORMAT_HTML, $options); - if (isediting($this->course->id)) { - if (empty($this->course->category)) { + if(isediting($this->course->id)) { + if($this->course->id == SITEID) { $editpage = $CFG->wwwroot.'/admin/site.php'; } else { $editpage = $CFG->wwwroot.'/course/edit.php?id='.$this->course->id; } - $this->content->text .= "
pixpath/t/edit.gif\" />
"; + $this->content->text .= '
'; } $this->content->footer = ''; -- 2.39.5