3 class block_course_summary
extends block_base
{
5 $this->title
= get_string('pagedescription', 'block_course_summary');
6 $this->version
= 2007101509;
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 object();
28 $options = new object();
29 $options->noclean
= true; // Don't clean Javascripts etc
30 $this->content
->text
= format_text($COURSE->summary
, FORMAT_HTML
, $options);
31 if (isediting($COURSE->id
)) { // ?? courseid param not there??
32 if($COURSE->id
== SITEID
) {
33 $editpage = $CFG->wwwroot
.'/'.$CFG->admin
.'/settings.php?section=frontpagesettings';
35 $editpage = $CFG->wwwroot
.'/course/edit.php?id='.$COURSE->id
;
37 $this->content
->text
.= "<div class=\"editbutton\"><a href=\"$editpage\"><img src=\"$CFG->pixpath/t/edit.gif\" alt=\"".get_string('edit')."\" /></a></div>";
39 $this->content
->footer
= '';
41 return $this->content
;
44 function hide_header() {
48 function preferred_width() {