3 class block_course_summary
extends block_base
{
5 $this->title
= get_string('pagedescription', 'block_course_summary');
6 $this->version
= 2004052600;
9 function specialization() {
11 if($this->instance
->pagetype
== PAGE_COURSE_VIEW
&& $COURSE->id
!= SITEID
) {
12 $this->title
= get_string('coursesummary', 'block_course_summary');
16 function get_content() {
19 if($this->content
!== NULL) {
20 return $this->content
;
23 if (empty($this->instance
)) {
27 $this->content
= New stdClass
;
28 $options->noclean
= true; // Don't clean Javascripts etc
29 $this->content
->text
= format_text($COURSE->summary
, FORMAT_HTML
, $options);
30 if(isediting($COURSE->id
)) {
31 if($COURSE->id
== SITEID
) {
32 $editpage = $CFG->wwwroot
.'/'.$CFG->admin
.'/settings.php?section=frontpagesettings';
34 $editpage = $CFG->wwwroot
.'/course/edit.php?id='.$COURSE->id
;
36 $this->content
->text
.= "<div class=\"editbutton\"><a href=\"$editpage\"><img src=\"$CFG->pixpath/t/edit.gif\" alt=\"".get_string('edit')."\" /></a></div>";
38 $this->content
->footer
= '';
40 return $this->content
;
43 function hide_header() {
47 function preferred_width() {