diff --git a/main/coursecopy/classes/Announcement.class.php b/main/coursecopy/classes/Announcement.class.php index aff329f442..67fab68a38 100755 --- a/main/coursecopy/classes/Announcement.class.php +++ b/main/coursecopy/classes/Announcement.class.php @@ -10,25 +10,25 @@ require_once 'Resource.class.php'; */ class Announcement extends Coursecopy\Resource { - /** - * The title of the announcement - */ + /** + * The title of the announcement + */ public $title; - /** - * The content of the announcement - */ + /** + * The content of the announcement + */ public $content; - /** - * The date on which this announcement was made - */ + /** + * The date on which this announcement was made + */ public $date; - /** - * The display order of this announcement - */ + /** + * The display order of this announcement + */ public $display_order; - /** - * Has the e-mail been sent? - */ + /** + * Has the e-mail been sent? + */ public $email_sent; public $attachment_path; @@ -39,36 +39,46 @@ class Announcement extends Coursecopy\Resource public $attachment_comment; - /** - * Create a new announcement - * @param int $id - * @param string $title - * @param string $content - * @param string $date - * @param int display_order - */ - function __construct($id, $title, $content, $date, $display_order, $email_sent, $path, $filename, $size, $comment) - { - parent::__construct($id,RESOURCE_ANNOUNCEMENT); + /** + * Create a new announcement + * @param int $id + * @param string $title + * @param string $content + * @param string $date + * @param int display_order + */ + public function __construct( + $id, + $title, + $content, + $date, + $display_order, + $email_sent, + $path, + $filename, + $size, + $comment + ) { + parent::__construct($id,RESOURCE_ANNOUNCEMENT); - $this->content = $content; - $this->title = $title; - $this->date = $date; - $this->display_order = $display_order; - $this->email_sent = $email_sent; + $this->content = $content; + $this->title = $title; + $this->date = $date; + $this->display_order = $display_order; + $this->email_sent = $email_sent; - $this->attachment_path = $path; - $this->attachment_filename = $filename; - $this->attachment_size = $size; - $this->attachment_comment = $comment; - } + $this->attachment_path = $path; + $this->attachment_filename = $filename; + $this->attachment_size = $size; + $this->attachment_comment = $comment; + } - /** - * Show this announcement - */ - function show() - { - parent::show(); - echo $this->date.': '.$this->title; - } + /** + * Show this announcement + */ + function show() + { + parent::show(); + echo $this->date.': '.$this->title; + } } diff --git a/main/coursecopy/classes/Attendance.class.php b/main/coursecopy/classes/Attendance.class.php index c4ee9584c5..51d33badc4 100755 --- a/main/coursecopy/classes/Attendance.class.php +++ b/main/coursecopy/classes/Attendance.class.php @@ -13,28 +13,28 @@ class Attendance extends Coursecopy\Resource public $params = array(); public $attendance_calendar = array(); - /** - * Create a new Thematic - * - * @param array parameters - */ + /** + * Create a new Thematic + * + * @param array parameters + */ public function __construct($params) { - parent::__construct($params['id'], RESOURCE_ATTENDANCE); - $this->params = $params; - } + parent::__construct($params['id'], RESOURCE_ATTENDANCE); + $this->params = $params; + } /** * @inheritdoc */ public function show() { - parent::show(); - echo $this->params['name']; - } + parent::show(); + echo $this->params['name']; + } public function add_attendance_calendar($data) { - $this->attendance_calendar[] = $data; - } + $this->attendance_calendar[] = $data; + } } diff --git a/main/coursecopy/classes/CourseDescription.class.php b/main/coursecopy/classes/CourseDescription.class.php index ca5e93d4aa..3d5a207192 100755 --- a/main/coursecopy/classes/CourseDescription.class.php +++ b/main/coursecopy/classes/CourseDescription.class.php @@ -1,6 +1,7 @@ title = $title; - $this->content = $content; - $this->description_type = $description_type; - } + /** + * Create a new course description + * @param int $id + * @param string $title + * @param string $content + */ + public function __construct($id, $title, $content, $description_type) + { + parent::__construct($id, RESOURCE_COURSEDESCRIPTION); + $this->title = $title; + $this->content = $content; + $this->description_type = $description_type; + } - /** - * Show this Event - */ - function show() - { - parent::show(); - echo $this->title; - } + /** + * Show this Event + */ + public function show() + { + parent::show(); + echo $this->title; + } } diff --git a/main/coursecopy/classes/CourseSelectForm.class.php b/main/coursecopy/classes/CourseSelectForm.class.php index f83d2a1795..a0827ff4bb 100755 --- a/main/coursecopy/classes/CourseSelectForm.class.php +++ b/main/coursecopy/classes/CourseSelectForm.class.php @@ -16,7 +16,7 @@ class CourseSelectForm * @param array $hidden_fields Hidden fields to add to the form. * @param boolean the document array will be serialize. This is used in the course_copy.php file */ - static function display_form($course, $hidden_fields = null, $avoid_serialize = false) + public static function display_form($course, $hidden_fields = null, $avoid_serialize = false) { global $charset; $resource_titles[RESOURCE_GRADEBOOK] = get_lang('Gradebook'); @@ -224,7 +224,6 @@ class CourseSelectForm foreach ($resources as $id => $resource) { if ($resource) { - // Event obj in 1.9.x in 1.10.x the class is CalendarEvent Coursecopy\Resource::setClassType($resource); echo '