@@ -22,9 +22,9 @@ |
||
22 | 22 | * @param string $description |
23 | 23 | * @param int $display_order |
24 | 24 | */ |
25 | - public function __construct($id,$name,$description,$display_order) |
|
25 | + public function __construct($id, $name, $description, $display_order) |
|
26 | 26 | { |
27 | - parent::__construct($id,RESOURCE_GLOSSARY); |
|
27 | + parent::__construct($id, RESOURCE_GLOSSARY); |
|
28 | 28 | $this->glossary_id = $id; |
29 | 29 | $this->name = $name; |
30 | 30 | $this->description = $description; |
@@ -25,6 +25,6 @@ |
||
25 | 25 | public function show() |
26 | 26 | { |
27 | 27 | parent::show(); |
28 | - echo $this->obj->title . ' (' . $this->obj->poster_name . ', ' . $this->obj->post_date . ')'; |
|
28 | + echo $this->obj->title.' ('.$this->obj->poster_name.', '.$this->obj->post_date.')'; |
|
29 | 29 | } |
30 | 30 | } |
@@ -66,19 +66,19 @@ |
||
66 | 66 | $attachment_comment = null, |
67 | 67 | $all_day = 0 |
68 | 68 | ) { |
69 | - parent::__construct($id, RESOURCE_EVENT); |
|
69 | + parent::__construct($id, RESOURCE_EVENT); |
|
70 | 70 | |
71 | - $this->title = $title; |
|
72 | - $this->content = $content; |
|
73 | - $this->start_date = $start_date; |
|
74 | - $this->end_date = $end_date; |
|
75 | - $this->all_day = $all_day; |
|
71 | + $this->title = $title; |
|
72 | + $this->content = $content; |
|
73 | + $this->start_date = $start_date; |
|
74 | + $this->end_date = $end_date; |
|
75 | + $this->all_day = $all_day; |
|
76 | 76 | |
77 | - $this->attachment_path = $attachment_path; |
|
78 | - $this->attachment_filename = $attachment_filename; |
|
79 | - $this->attachment_size = $attachment_size; |
|
80 | - $this->attachment_comment = $attachment_comment; |
|
81 | - } |
|
77 | + $this->attachment_path = $attachment_path; |
|
78 | + $this->attachment_filename = $attachment_filename; |
|
79 | + $this->attachment_size = $attachment_size; |
|
80 | + $this->attachment_comment = $attachment_comment; |
|
81 | + } |
|
82 | 82 | |
83 | 83 | /** |
84 | 84 | * Show this Event |
@@ -18,7 +18,7 @@ |
||
18 | 18 | * @param int $id |
19 | 19 | * @param string $title |
20 | 20 | */ |
21 | - public function __construct($id,$title) |
|
21 | + public function __construct($id, $title) |
|
22 | 22 | { |
23 | 23 | parent::__construct($id, RESOURCE_SESSION_COURSE); |
24 | 24 | $this->title = $title; |
@@ -84,120 +84,120 @@ |
||
84 | 84 | */ |
85 | 85 | public $author; |
86 | 86 | |
87 | - /** |
|
88 | - * Author's image |
|
89 | - */ |
|
90 | - public $preview_image; |
|
87 | + /** |
|
88 | + * Author's image |
|
89 | + */ |
|
90 | + public $preview_image; |
|
91 | 91 | |
92 | - /** |
|
93 | - * Create a new learnpath |
|
94 | - * @param integer ID |
|
95 | - * @param integer Type (1,2,3,...) |
|
96 | - * @param string $name |
|
97 | - * @param string $path |
|
98 | - * @param string $ref |
|
99 | - * @param string $description |
|
100 | - * @param string $content_local |
|
101 | - * @param string $default_encoding |
|
102 | - * @param string $default_view_mode |
|
103 | - * @param bool $prevent_reinit |
|
104 | - * @param bool $force_commit |
|
105 | - * @param string $content_maker |
|
106 | - * @param integer $display_order |
|
107 | - * @param string $js_lib |
|
108 | - * @param string $content_license |
|
109 | - * @param integer $debug |
|
110 | - * @param string $visibility |
|
111 | - * @param array $items |
|
112 | - */ |
|
113 | - public function __construct( |
|
114 | - $id, |
|
115 | - $type, |
|
116 | - $name, |
|
117 | - $path, |
|
118 | - $ref, |
|
119 | - $description, |
|
120 | - $content_local, |
|
121 | - $default_encoding, |
|
122 | - $default_view_mode, |
|
123 | - $prevent_reinit, |
|
124 | - $force_commit, |
|
125 | - $content_maker, |
|
126 | - $display_order, |
|
127 | - $js_lib, |
|
128 | - $content_license, |
|
129 | - $debug, |
|
130 | - $visibility, |
|
131 | - $author, |
|
132 | - $preview_image, |
|
133 | - $use_max_score, |
|
134 | - $autolaunch, |
|
135 | - $created_on, |
|
136 | - $modified_on, |
|
137 | - $publicated_on, |
|
138 | - $expired_on, |
|
139 | - $session_id, |
|
140 | - $items |
|
141 | - ) { |
|
142 | - parent::__construct($id, RESOURCE_LEARNPATH); |
|
143 | - $this->lp_type = $type; |
|
144 | - $this->name = $name; |
|
145 | - $this->path = $path; |
|
146 | - $this->ref = $ref; |
|
147 | - $this->description = $description; |
|
148 | - $this->content_local = $content_local; |
|
149 | - $this->default_encoding = $default_encoding; |
|
150 | - $this->default_view_mod = $default_view_mode; |
|
151 | - $this->prevent_reinit = $prevent_reinit; |
|
152 | - $this->force_commit = $force_commit; |
|
153 | - $this->content_maker = $content_maker; |
|
154 | - $this->display_order = $display_order; |
|
155 | - $this->js_lib = $js_lib; |
|
156 | - $this->content_license = $content_license; |
|
157 | - $this->debug = $debug; |
|
158 | - $this->visibility=$visibility; |
|
92 | + /** |
|
93 | + * Create a new learnpath |
|
94 | + * @param integer ID |
|
95 | + * @param integer Type (1,2,3,...) |
|
96 | + * @param string $name |
|
97 | + * @param string $path |
|
98 | + * @param string $ref |
|
99 | + * @param string $description |
|
100 | + * @param string $content_local |
|
101 | + * @param string $default_encoding |
|
102 | + * @param string $default_view_mode |
|
103 | + * @param bool $prevent_reinit |
|
104 | + * @param bool $force_commit |
|
105 | + * @param string $content_maker |
|
106 | + * @param integer $display_order |
|
107 | + * @param string $js_lib |
|
108 | + * @param string $content_license |
|
109 | + * @param integer $debug |
|
110 | + * @param string $visibility |
|
111 | + * @param array $items |
|
112 | + */ |
|
113 | + public function __construct( |
|
114 | + $id, |
|
115 | + $type, |
|
116 | + $name, |
|
117 | + $path, |
|
118 | + $ref, |
|
119 | + $description, |
|
120 | + $content_local, |
|
121 | + $default_encoding, |
|
122 | + $default_view_mode, |
|
123 | + $prevent_reinit, |
|
124 | + $force_commit, |
|
125 | + $content_maker, |
|
126 | + $display_order, |
|
127 | + $js_lib, |
|
128 | + $content_license, |
|
129 | + $debug, |
|
130 | + $visibility, |
|
131 | + $author, |
|
132 | + $preview_image, |
|
133 | + $use_max_score, |
|
134 | + $autolaunch, |
|
135 | + $created_on, |
|
136 | + $modified_on, |
|
137 | + $publicated_on, |
|
138 | + $expired_on, |
|
139 | + $session_id, |
|
140 | + $items |
|
141 | + ) { |
|
142 | + parent::__construct($id, RESOURCE_LEARNPATH); |
|
143 | + $this->lp_type = $type; |
|
144 | + $this->name = $name; |
|
145 | + $this->path = $path; |
|
146 | + $this->ref = $ref; |
|
147 | + $this->description = $description; |
|
148 | + $this->content_local = $content_local; |
|
149 | + $this->default_encoding = $default_encoding; |
|
150 | + $this->default_view_mod = $default_view_mode; |
|
151 | + $this->prevent_reinit = $prevent_reinit; |
|
152 | + $this->force_commit = $force_commit; |
|
153 | + $this->content_maker = $content_maker; |
|
154 | + $this->display_order = $display_order; |
|
155 | + $this->js_lib = $js_lib; |
|
156 | + $this->content_license = $content_license; |
|
157 | + $this->debug = $debug; |
|
158 | + $this->visibility=$visibility; |
|
159 | 159 | |
160 | - $this->use_max_score=$use_max_score; |
|
161 | - $this->autolaunch=$autolaunch; |
|
162 | - $this->created_on=$created_on; |
|
163 | - $this->modified_on=$modified_on; |
|
164 | - $this->publicated_on=$publicated_on; |
|
165 | - $this->expired_on=$expired_on; |
|
166 | - $this->session_id=$session_id; |
|
160 | + $this->use_max_score=$use_max_score; |
|
161 | + $this->autolaunch=$autolaunch; |
|
162 | + $this->created_on=$created_on; |
|
163 | + $this->modified_on=$modified_on; |
|
164 | + $this->publicated_on=$publicated_on; |
|
165 | + $this->expired_on=$expired_on; |
|
166 | + $this->session_id=$session_id; |
|
167 | 167 | |
168 | - $this->author= $author; |
|
169 | - $this->preview_image= $preview_image; |
|
168 | + $this->author= $author; |
|
169 | + $this->preview_image= $preview_image; |
|
170 | 170 | |
171 | - $this->items = $items; |
|
172 | - } |
|
173 | - /** |
|
174 | - * Get the items |
|
175 | - */ |
|
176 | - function get_items() |
|
177 | - { |
|
178 | - return $this->items; |
|
179 | - } |
|
171 | + $this->items = $items; |
|
172 | + } |
|
173 | + /** |
|
174 | + * Get the items |
|
175 | + */ |
|
176 | + function get_items() |
|
177 | + { |
|
178 | + return $this->items; |
|
179 | + } |
|
180 | 180 | |
181 | - /** |
|
182 | - * Check if a given resource is used as an item in this chapter |
|
183 | - */ |
|
184 | - function has_item($resource) |
|
185 | - { |
|
186 | - foreach ($this->items as $item) { |
|
187 | - if ($item['id'] == $resource->get_id() && |
|
188 | - isset($item['type']) && $item['type'] == $resource->get_type() |
|
189 | - ) { |
|
190 | - return true; |
|
191 | - } |
|
192 | - } |
|
193 | - return false; |
|
194 | - } |
|
181 | + /** |
|
182 | + * Check if a given resource is used as an item in this chapter |
|
183 | + */ |
|
184 | + function has_item($resource) |
|
185 | + { |
|
186 | + foreach ($this->items as $item) { |
|
187 | + if ($item['id'] == $resource->get_id() && |
|
188 | + isset($item['type']) && $item['type'] == $resource->get_type() |
|
189 | + ) { |
|
190 | + return true; |
|
191 | + } |
|
192 | + } |
|
193 | + return false; |
|
194 | + } |
|
195 | 195 | |
196 | - /** |
|
197 | - * Show this learnpath |
|
198 | - */ |
|
199 | - function show() { |
|
200 | - parent::show(); |
|
201 | - echo $this->name; |
|
202 | - } |
|
196 | + /** |
|
197 | + * Show this learnpath |
|
198 | + */ |
|
199 | + function show() { |
|
200 | + parent::show(); |
|
201 | + echo $this->name; |
|
202 | + } |
|
203 | 203 | } |
@@ -153,18 +153,18 @@ |
||
153 | 153 | $this->js_lib = $js_lib; |
154 | 154 | $this->content_license = $content_license; |
155 | 155 | $this->debug = $debug; |
156 | - $this->visibility=$visibility; |
|
156 | + $this->visibility = $visibility; |
|
157 | 157 | |
158 | - $this->use_max_score=$use_max_score; |
|
159 | - $this->autolaunch=$autolaunch; |
|
160 | - $this->created_on=$created_on; |
|
161 | - $this->modified_on=$modified_on; |
|
162 | - $this->publicated_on=$publicated_on; |
|
163 | - $this->expired_on=$expired_on; |
|
164 | - $this->session_id=$session_id; |
|
158 | + $this->use_max_score = $use_max_score; |
|
159 | + $this->autolaunch = $autolaunch; |
|
160 | + $this->created_on = $created_on; |
|
161 | + $this->modified_on = $modified_on; |
|
162 | + $this->publicated_on = $publicated_on; |
|
163 | + $this->expired_on = $expired_on; |
|
164 | + $this->session_id = $session_id; |
|
165 | 165 | |
166 | - $this->author= $author; |
|
167 | - $this->preview_image= $preview_image; |
|
166 | + $this->author = $author; |
|
167 | + $this->preview_image = $preview_image; |
|
168 | 168 | |
169 | 169 | $this->items = $items; |
170 | 170 | } |
@@ -46,7 +46,7 @@ |
||
46 | 46 | $category_id, |
47 | 47 | $on_homepage |
48 | 48 | ) { |
49 | - parent::__construct($id,RESOURCE_LINK); |
|
49 | + parent::__construct($id, RESOURCE_LINK); |
|
50 | 50 | $this->title = $title; |
51 | 51 | $this->url = $url; |
52 | 52 | $this->description = $description; |
@@ -28,7 +28,7 @@ discard block |
||
28 | 28 | public function __construct($id, $path, $comment, $title, $file_type, $size) |
29 | 29 | { |
30 | 30 | parent::__construct($id, RESOURCE_DOCUMENT); |
31 | - $this->path = 'document' . $path; |
|
31 | + $this->path = 'document'.$path; |
|
32 | 32 | $this->comment = $comment; |
33 | 33 | $this->title = $title; |
34 | 34 | $this->file_type = $file_type; |
@@ -44,7 +44,7 @@ discard block |
||
44 | 44 | echo preg_replace('@^document@', '', $this->path); |
45 | 45 | if (!empty($this->title)) { |
46 | 46 | if (strpos($this->path, $this->title) === false) { |
47 | - echo " - " . $this->title; |
|
47 | + echo " - ".$this->title; |
|
48 | 48 | } |
49 | 49 | } |
50 | 50 | } |
@@ -59,13 +59,13 @@ |
||
59 | 59 | $size, |
60 | 60 | $comment |
61 | 61 | ) { |
62 | - parent::__construct($id,RESOURCE_ANNOUNCEMENT); |
|
62 | + parent::__construct($id, RESOURCE_ANNOUNCEMENT); |
|
63 | 63 | |
64 | - $this->content = $content; |
|
65 | - $this->title = $title; |
|
66 | - $this->date = $date; |
|
67 | - $this->display_order = $display_order; |
|
68 | - $this->email_sent = $email_sent; |
|
64 | + $this->content = $content; |
|
65 | + $this->title = $title; |
|
66 | + $this->date = $date; |
|
67 | + $this->display_order = $display_order; |
|
68 | + $this->email_sent = $email_sent; |
|
69 | 69 | |
70 | 70 | $this->attachment_path = $path; |
71 | 71 | $this->attachment_filename = $filename; |
@@ -47,7 +47,7 @@ discard block |
||
47 | 47 | $progress, |
48 | 48 | $version |
49 | 49 | ) { |
50 | - parent::__construct($id,RESOURCE_WIKI); |
|
50 | + parent::__construct($id, RESOURCE_WIKI); |
|
51 | 51 | $this->id = $id; |
52 | 52 | $this->page_id = $page_id; |
53 | 53 | $this->reflink = $reflink; |
@@ -63,6 +63,6 @@ discard block |
||
63 | 63 | public function show() |
64 | 64 | { |
65 | 65 | parent::show(); |
66 | - echo $this->reflink.' ('. (empty($this->group_id) ? get_lang('Everyone') : get_lang('Group') . ' ' . $this->group_id) .') ' . '<i>(' . $this->dtime . ')</i>'; |
|
66 | + echo $this->reflink.' ('.(empty($this->group_id) ? get_lang('Everyone') : get_lang('Group').' '.$this->group_id).') '.'<i>('.$this->dtime.')</i>'; |
|
67 | 67 | } |
68 | 68 | } |