Completed
Push — 1.11.x ( ca7787...41c0f2 )
by José
31:51
created
src/Chamilo/CourseBundle/Component/CourseCopy/Resources/Announcement.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -59,13 +59,13 @@
 block discarded – undo
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;
Please login to merge, or discard this patch.
src/Chamilo/CourseBundle/Component/CourseCopy/Resources/Wiki.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -47,7 +47,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 }
Please login to merge, or discard this patch.
src/Chamilo/CourseBundle/Component/CourseCopy/Resources/ForumTopic.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -47,6 +47,6 @@
 block discarded – undo
47 47
             $user_info = api_get_user_info($this->obj->thread_poster_id);
48 48
             $extra = $user_info['complete_name'].', '.$extra;
49 49
         }
50
-        echo $this->obj->thread_title . ' (' . $extra . ')';
50
+        echo $this->obj->thread_title.' ('.$extra.')';
51 51
     }
52 52
 }
Please login to merge, or discard this patch.
src/Chamilo/CourseBundle/Component/CourseCopy/Resources/SurveyQuestion.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -85,7 +85,7 @@
 block discarded – undo
85 85
      * @param string $option_text
86 86
      * @param int	 $sort
87 87
      */
88
-    public function add_answer($option_text,$sort)
88
+    public function add_answer($option_text, $sort)
89 89
     {
90 90
         $answer = array();
91 91
         $answer['option_text'] = $option_text;
Please login to merge, or discard this patch.
src/Chamilo/CourseBundle/Component/CourseCopy/Resources/ScormDocument.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -21,7 +21,7 @@  discard block
 block discarded – undo
21 21
      */
22 22
     public function __construct($id, $path, $title)
23 23
     {
24
-        parent::__construct($id,RESOURCE_SCORM);
24
+        parent::__construct($id, RESOURCE_SCORM);
25 25
         $this->path = 'scorm'.$path;
26 26
         $this->title = $title;
27 27
     }
@@ -36,7 +36,7 @@  discard block
 block discarded – undo
36 36
         echo $path;
37 37
         if (!empty($this->title)) {
38 38
             if (strpos($path, $this->title) === false) {
39
-                echo " - " . $this->title;
39
+                echo " - ".$this->title;
40 40
             }
41 41
         }
42 42
     }
Please login to merge, or discard this patch.
Chamilo/CourseBundle/Component/CourseCopy/Resources/DummyCourseCreator.php 1 patch
Spacing   +55 added lines, -55 removed lines patch added patch discarded remove patch
@@ -31,7 +31,7 @@  discard block
 block discarded – undo
31 31
         $this->default_property['to_user_id'] = null;
32 32
         $this->default_property['visibility'] = '1';
33 33
         $this->default_property['start_visible'] = null;
34
-        $this->default_property['end_visible'] =  null;
34
+        $this->default_property['end_visible'] = null;
35 35
 
36 36
         $course = api_get_course_info($course_code);
37 37
         $this->course = new Course();
@@ -58,13 +58,13 @@  discard block
 block discarded – undo
58 58
         $course = api_get_course_info();
59 59
         $course_doc_path = $this->course->backup_path.'/document/';
60 60
         $number_of_documents = rand(10, 30);
61
-        $extensions = array ('html', 'doc');
61
+        $extensions = array('html', 'doc');
62 62
         $directories = array();
63 63
         $property = $this->default_property;
64 64
         $property['lastedit_type'] = 'DocumentAdded';
65 65
         $property['tool'] = TOOL_DOCUMENT;
66 66
         $doc_id = 0;
67
-        for ($doc_id = 1; $doc_id < $number_of_documents; $doc_id ++)
67
+        for ($doc_id = 1; $doc_id < $number_of_documents; $doc_id++)
68 68
         {
69 69
             $path = '';
70 70
             $doc_type = rand(0, count($extensions) - 1);
@@ -72,7 +72,7 @@  discard block
 block discarded – undo
72 72
             $filename = $this->get_dummy_content('title').'_'.$doc_id.'.'.$extension;
73 73
             $content = $this->get_dummy_content('text');
74 74
             $dirs = rand(0, 3);
75
-            for ($i = 0; $i < $dirs; $i ++)
75
+            for ($i = 0; $i < $dirs; $i++)
76 76
             {
77 77
                 $path .= 'directory/';
78 78
                 $directories[$path] = 1;
@@ -87,14 +87,14 @@  discard block
 block discarded – undo
87 87
             fwrite($fp, $content);
88 88
             fclose($fp);
89 89
             $size = filesize($file);
90
-            $document = new Document($doc_id, '/'.$path.$filename,$this->get_dummy_content('description'),$this->get_dummy_content('title'), 'file', $size);
90
+            $document = new Document($doc_id, '/'.$path.$filename, $this->get_dummy_content('description'), $this->get_dummy_content('title'), 'file', $size);
91 91
             $document->item_properties[] = $property;
92 92
             $this->course->add_resource($document);
93 93
         }
94
-        foreach($directories as $path => $flag)
94
+        foreach ($directories as $path => $flag)
95 95
         {
96
-            $path = substr($path,0,strlen($path)-1);
97
-            $document = new Document($doc_id++,'/'.$path, $this->get_dummy_content('description'),$this->get_dummy_content('title'),'folder',0);
96
+            $path = substr($path, 0, strlen($path) - 1);
97
+            $document = new Document($doc_id++, '/'.$path, $this->get_dummy_content('description'), $this->get_dummy_content('title'), 'folder', 0);
98 98
             $property['lastedit_type'] = 'FolderCreated';
99 99
             $document->item_properties[] = $property;
100 100
             $this->course->add_resource($document);
@@ -109,11 +109,11 @@  discard block
 block discarded – undo
109 109
         $property['lastedit_type'] = 'AnnouncementAdded';
110 110
         $property['tool'] = TOOL_ANNOUNCEMENT;
111 111
         $number_of_announcements = rand(10, 30);
112
-        for ($i = 0; $i < $number_of_announcements; $i ++)
112
+        for ($i = 0; $i < $number_of_announcements; $i++)
113 113
         {
114 114
             $time = mktime(rand(1, 24), rand(1, 60), 0, rand(1, 12), rand(1, 28), intval(date('Y')));
115 115
             $date = date('Y-m-d', $time);
116
-            $announcement = new Announcement($i,$this->get_dummy_content('title'),$this->get_dummy_content('text'), $date,0);
116
+            $announcement = new Announcement($i, $this->get_dummy_content('title'), $this->get_dummy_content('text'), $date, 0);
117 117
             $announcement->item_properties[] = $property;
118 118
             $this->course->add_resource($announcement);
119 119
         }
@@ -127,23 +127,23 @@  discard block
 block discarded – undo
127 127
         $property = $this->default_property;
128 128
         $property['lastedit_type'] = 'AgendaAdded';
129 129
         $property['tool'] = TOOL_CALENDAR_EVENT;
130
-        for ($i = 0; $i < $number_of_events; $i ++)
130
+        for ($i = 0; $i < $number_of_events; $i++)
131 131
         {
132
-            $hour = rand(1,24);
133
-            $minute = rand(1,60);
134
-            $second = rand(1,60);
135
-            $day = rand(1,28);
136
-            $month = rand(1,12);
132
+            $hour = rand(1, 24);
133
+            $minute = rand(1, 60);
134
+            $second = rand(1, 60);
135
+            $day = rand(1, 28);
136
+            $month = rand(1, 12);
137 137
             $year = intval(date('Y'));
138
-            $time = mktime($hour,$minute,$second,$month,$day,$year);
138
+            $time = mktime($hour, $minute, $second, $month, $day, $year);
139 139
             $start_date = date('Y-m-d H:m:s', $time);
140
-            $hour = rand($hour,24);
141
-            $minute = rand($minute,60);
142
-            $second = rand($second,60);
143
-            $day = rand($day,28);
144
-            $month = rand($month,12);
140
+            $hour = rand($hour, 24);
141
+            $minute = rand($minute, 60);
142
+            $second = rand($second, 60);
143
+            $day = rand($day, 28);
144
+            $month = rand($month, 12);
145 145
             $year = intval(date('Y'));
146
-            $time = mktime($hour,$minute,$second,$month,$day,$year);
146
+            $time = mktime($hour, $minute, $second, $month, $day, $year);
147 147
             $end_date = date('Y-m-d H:m:s', $time);
148 148
             $event = new CalendarEvent(
149 149
                 $i,
@@ -163,20 +163,20 @@  discard block
 block discarded – undo
163 163
     {
164 164
         // create categorys
165 165
         $number_of_categories = rand(5, 10);
166
-        for ($i = 0; $i < $number_of_categories; $i ++)
166
+        for ($i = 0; $i < $number_of_categories; $i++)
167 167
         {
168
-            $linkcat = new LinkCategory($i, $this->get_dummy_content('title'), $this->get_dummy_content('description'),$i);
168
+            $linkcat = new LinkCategory($i, $this->get_dummy_content('title'), $this->get_dummy_content('description'), $i);
169 169
             $this->course->add_resource($linkcat);
170 170
         }
171 171
         // create links
172 172
         $number_of_links = rand(5, 50);
173
-        $on_homepage = rand(0,20) == 0 ? 1 : 0;
173
+        $on_homepage = rand(0, 20) == 0 ? 1 : 0;
174 174
         $property = $this->default_property;
175 175
         $property['lastedit_type'] = 'LinkAdded';
176 176
         $property['tool'] = TOOL_LINK;
177
-        for ($i = 0; $i < $number_of_links; $i ++)
177
+        for ($i = 0; $i < $number_of_links; $i++)
178 178
         {
179
-            $link = new Link($i, $this->get_dummy_content('title'), 'http://www.google.com/search?q='.$this->get_dummy_content('title'), $this->get_dummy_content('description'), rand(0, $number_of_categories -1),$on_homepage);
179
+            $link = new Link($i, $this->get_dummy_content('title'), 'http://www.google.com/search?q='.$this->get_dummy_content('title'), $this->get_dummy_content('description'), rand(0, $number_of_categories - 1), $on_homepage);
180 180
             $link->item_properties[] = $property;
181 181
             $this->course->add_resource($link);
182 182
         }
@@ -190,18 +190,18 @@  discard block
 block discarded – undo
190 190
         $number_of_forums = rand(5, 50);
191 191
         $number_of_topics = rand(30, 100);
192 192
         $number_of_posts = rand(100, 1000);
193
-        $last_forum_post = array ();
194
-        $last_topic_post = array ();
193
+        $last_forum_post = array();
194
+        $last_topic_post = array();
195 195
         // create categorys
196 196
         $order = 1;
197
-        for ($i = 1; $i <= $number_of_categories; $i ++)
197
+        for ($i = 1; $i <= $number_of_categories; $i++)
198 198
         {
199 199
             $forumcat = new ForumCategory($i, $this->get_dummy_content('title'), $this->get_dummy_content('description'), $order, 0, 0);
200 200
             $this->course->add_resource($forumcat);
201 201
             $order++;
202 202
         }
203 203
         // create posts
204
-        for ($post_id = 1; $post_id <= $number_of_posts; $post_id ++)
204
+        for ($post_id = 1; $post_id <= $number_of_posts; $post_id++)
205 205
         {
206 206
             $topic_id = rand(1, $number_of_topics);
207 207
             $last_topic_post[$topic_id] = $post_id;
@@ -209,7 +209,7 @@  discard block
 block discarded – undo
209 209
             $this->course->add_resource($post);
210 210
         }
211 211
         // create topics
212
-        for ($topic_id = 1; $topic_id <= $number_of_topics; $topic_id ++)
212
+        for ($topic_id = 1; $topic_id <= $number_of_topics; $topic_id++)
213 213
         {
214 214
             $forum_id = rand(1, $number_of_forums);
215 215
             $last_forum_post[$forum_id] = $last_topic_post[$topic_id];
@@ -217,9 +217,9 @@  discard block
 block discarded – undo
217 217
             $this->course->add_resource($topic);
218 218
         }
219 219
         // create forums
220
-        for ($forum_id = 1; $forum_id <= $number_of_forums; $forum_id ++)
220
+        for ($forum_id = 1; $forum_id <= $number_of_forums; $forum_id++)
221 221
         {
222
-            $forum = new Forum($forum_id, $this->get_dummy_content('title'),$this->get_dummy_content('description'), rand(1, $number_of_categories), $last_forum_post[$forum_id]);
222
+            $forum = new Forum($forum_id, $this->get_dummy_content('title'), $this->get_dummy_content('description'), rand(1, $number_of_categories), $last_forum_post[$forum_id]);
223 223
             $this->course->add_resource($forum);
224 224
         }
225 225
     }
@@ -228,25 +228,25 @@  discard block
 block discarded – undo
228 228
      */
229 229
     function create_dummy_learnpaths()
230 230
     {
231
-        $number_of_learnpaths = rand(3,5);
231
+        $number_of_learnpaths = rand(3, 5);
232 232
         $global_item_id = 1;
233
-        for($i=1; $i<=$number_of_learnpaths;$i++)
233
+        for ($i = 1; $i <= $number_of_learnpaths; $i++)
234 234
         {
235 235
         $chapters = array();
236
-        $number_of_chapters = rand(1,6);
237
-        for($chapter_id = 1; $chapter_id <= $number_of_chapters; $chapter_id++)
236
+        $number_of_chapters = rand(1, 6);
237
+        for ($chapter_id = 1; $chapter_id <= $number_of_chapters; $chapter_id++)
238 238
         {
239 239
             $chapter['name'] = $this->get_dummy_content('title');
240 240
             $chapter['description'] = $this->get_dummy_content('description');
241 241
             $chapter['display_order'] = $chapter_id;
242 242
             $chapter['items'] = array();
243
-            $number_of_items = rand(5,20);
244
-            for( $item_id = 1; $item_id<$number_of_items; $item_id++)
243
+            $number_of_items = rand(5, 20);
244
+            for ($item_id = 1; $item_id < $number_of_items; $item_id++)
245 245
             {
246
-                $types = array(RESOURCE_ANNOUNCEMENT, RESOURCE_EVENT, RESOURCE_DOCUMENT,RESOURCE_LINK,RESOURCE_FORUM,RESOURCE_FORUMPOST,RESOURCE_FORUMTOPIC);
247
-                $type = $types[rand(0,count($types)-1)];
246
+                $types = array(RESOURCE_ANNOUNCEMENT, RESOURCE_EVENT, RESOURCE_DOCUMENT, RESOURCE_LINK, RESOURCE_FORUM, RESOURCE_FORUMPOST, RESOURCE_FORUMTOPIC);
247
+                $type = $types[rand(0, count($types) - 1)];
248 248
                 $resources = $this->course->resources[$type];
249
-                $resource = $resources[rand(0,count($resources)-1)];
249
+                $resource = $resources[rand(0, count($resources) - 1)];
250 250
                 $item = array();
251 251
                 $item['type'] = $resource->type;
252 252
                 $item['id'] = $resource->source_id;
@@ -254,17 +254,17 @@  discard block
 block discarded – undo
254 254
                 $item['title'] = $this->get_dummy_content('title');
255 255
                 $item['description'] = $this->get_dummy_content('description');
256 256
                 $item['ref_id'] = $global_item_id;
257
-                if( rand(0,5) == 1 && $item_id > 1)
257
+                if (rand(0, 5) == 1 && $item_id > 1)
258 258
                 {
259 259
                     $item['prereq_type'] = 'i';
260
-                    $item['prereq'] = rand($global_item_id - $item_id,$global_item_id-1);
260
+                    $item['prereq'] = rand($global_item_id - $item_id, $global_item_id - 1);
261 261
                 }
262 262
                 $chapter['items'][] = $item;
263 263
                 $global_item_id++;
264 264
             }
265 265
             $chapters[] = $chapter;
266 266
         }
267
-        $lp = new CourseCopyLearnpath($i,$this->get_dummy_content('title'),$this->get_dummy_content('description'),1,$chapters);
267
+        $lp = new CourseCopyLearnpath($i, $this->get_dummy_content('title'), $this->get_dummy_content('description'), 1, $chapters);
268 268
         $this->course->add_resource($lp);
269 269
         }
270 270
     }
@@ -278,20 +278,20 @@  discard block
 block discarded – undo
278 278
         Aenean ac wisi non enim aliquam scelerisque. Praesent eget mi. Vestibulum volutpat pulvinar justo. Phasellus sapien ante, pharetra id, bibendum sed, porta non, purus. Maecenas leo velit, luctus quis, porta non, feugiat sit amet, sapien. Proin vitae augue ut massa adipiscing placerat. Morbi ac risus. Proin dapibus eros egestas quam. Fusce fermentum lobortis elit. Duis lectus tellus, convallis nec, lobortis vel, accumsan ut, nunc. Nunc est. Donec ullamcorper laoreet quam.
279 279
         Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos hymenaeos. Suspendisse potenti. Mauris mi. Vivamus risus lacus, faucibus sit amet, sollicitudin a, blandit et, justo. In hendrerit. Sed imperdiet, eros at fringilla tempor, turpis augue semper enim, quis rhoncus nibh enim quis dui. Sed massa sapien, mattis et, laoreet sit amet, dignissim nec, urna. Integer laoreet quam quis lectus. Curabitur convallis gravida dui. Nam metus. Ut sit amet augue in nibh interdum scelerisque. Donec venenatis, lacus et pulvinar euismod, libero massa condimentum pede, commodo tristique nunc massa eu quam. Donec vulputate. Aenean in nibh. Phasellus porttitor. Donec molestie, sem ac porttitor vulputate, mauris dui egestas libero, ac lobortis dolor sem vel ligula. Nam vulputate pretium libero. Cras accumsan. Vivamus lacinia sapien sit amet elit.
280 280
         Duis bibendum elementum justo. Duis posuere. Fusce nulla odio, posuere eget, condimentum nec, venenatis eu, elit. In hac habitasse platea dictumst. Aenean ac sem in enim imperdiet feugiat. Integer tincidunt lectus at elit. Integer magna lacus, vehicula quis, eleifend eget, suscipit vitae, leo. Nunc porta augue nec enim. Curabitur vehicula volutpat enim. Aliquam consequat. Vestibulum rhoncus tellus vitae erat. Integer est. Quisque fermentum leo nec odio. Suspendisse lobortis sollicitudin augue. Nullam urna mi, suscipit eu, sagittis laoreet, ultrices ac, sem. Aliquam enim tortor, hendrerit non, cursus a, tristique sit amet, sapien. Suspendisse potenti. Aenean semper placerat neque.';
281
-        switch($type)
281
+        switch ($type)
282 282
         {
283 283
          case 'description':
284
-            $descriptions = explode(".",$dummy_text);
285
-            return $descriptions[rand(0,count($descriptions)-1)];
284
+            $descriptions = explode(".", $dummy_text);
285
+            return $descriptions[rand(0, count($descriptions) - 1)];
286 286
             break;
287 287
          case 'title':
288
-            $dummy_text = str_replace(array("\n",'.',',',"\t"),array(' ','','',' '),$dummy_text);
289
-            $titles = explode(" ",$dummy_text);
290
-            return trim($titles[rand(0,count($titles)-1)]);
288
+            $dummy_text = str_replace(array("\n", '.', ',', "\t"), array(' ', '', '', ' '), $dummy_text);
289
+            $titles = explode(" ", $dummy_text);
290
+            return trim($titles[rand(0, count($titles) - 1)]);
291 291
             break;
292 292
          case 'text':
293
-            $texts = explode("\n",$dummy_text);
294
-            return $texts[rand(0,count($texts)-1)];
293
+            $texts = explode("\n", $dummy_text);
294
+            return $texts[rand(0, count($texts) - 1)];
295 295
             break;
296 296
         }
297 297
     }
Please login to merge, or discard this patch.
src/Chamilo/CourseBundle/Component/CourseCopy/Resources/LinkCategory.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -29,9 +29,9 @@
 block discarded – undo
29 29
      * @param string $title
30 30
      * @param string $description
31 31
      */
32
-    public function __construct($id,$title,$description,$display_order)
32
+    public function __construct($id, $title, $description, $display_order)
33 33
     {
34
-        parent::__construct($id,RESOURCE_LINKCATEGORY);
34
+        parent::__construct($id, RESOURCE_LINKCATEGORY);
35 35
         $this->title = $title;
36 36
         $this->description = $description;
37 37
         $this->display_order = $display_order;
Please login to merge, or discard this patch.
main/coursecopy/copy_course_session_selected.php 1 patch
Spacing   +38 added lines, -38 removed lines patch added patch discarded remove patch
@@ -47,7 +47,7 @@  discard block
 block discarded – undo
47 47
 
48 48
 $this_section = SECTION_COURSES;
49 49
 $nameTools = get_lang('CopyCourse');
50
-$returnLink = api_get_path(WEB_CODE_PATH) . 'course_info/maintenance_coach.php?' . api_get_cidreq();
50
+$returnLink = api_get_path(WEB_CODE_PATH).'course_info/maintenance_coach.php?'.api_get_cidreq();
51 51
 $interbreadcrumb[] = array(
52 52
     'url' => $returnLink,
53 53
     'name' => get_lang('Maintenance')
@@ -73,29 +73,29 @@  discard block
 block discarded – undo
73 73
     $attrs = '';
74 74
     if (count($attr) > 0) {
75 75
         foreach ($attr as $key => $value) {
76
-            $attrs .= ' ' . $key . '="' . $value . '"';
76
+            $attrs .= ' '.$key.'="'.$value.'"';
77 77
         }
78 78
     }
79
-    $output = '<select name="' . $name . '" ' . $attrs . '>';
79
+    $output = '<select name="'.$name.'" '.$attrs.'>';
80 80
 
81 81
     if (count($sessions) == 0) {
82
-        $output .= '<option value = "0">' . get_lang(
82
+        $output .= '<option value = "0">'.get_lang(
83 83
                 'ThereIsNotStillASession'
84
-            ) . '</option>';
84
+            ).'</option>';
85 85
     } else {
86
-        $output .= '<option value = "0">' . get_lang(
86
+        $output .= '<option value = "0">'.get_lang(
87 87
                 'SelectASession'
88
-            ) . '</option>';
88
+            ).'</option>';
89 89
     }
90 90
 
91 91
     if (is_array($sessions)) {
92 92
         foreach ($sessions as $session) {
93 93
             $category_name = '';
94 94
             if (!empty($session['category_name'])) {
95
-                $category_name = ' (' . $session['category_name'] . ')';
95
+                $category_name = ' ('.$session['category_name'].')';
96 96
             }
97 97
 
98
-            $output .= '<option value="' . $session['id'] . '">' . $session['name'] . ' ' . $category_name . '</option>';
98
+            $output .= '<option value="'.$session['id'].'">'.$session['name'].' '.$category_name.'</option>';
99 99
         }
100 100
     }
101 101
     $output .= '</select>';
@@ -120,43 +120,43 @@  discard block
 block discarded – undo
120 120
     // Actions
121 121
     $html .= '<div class="actions">';
122 122
     // Link back to the documents overview
123
-    $html .= '<a href="' . $returnLink . '">' . Display::return_icon(
124
-            'back.png', get_lang('BackTo') . ' ' . get_lang('Maintenance'), '', ICON_SIZE_MEDIUM
125
-        ) . '</a>';
123
+    $html .= '<a href="'.$returnLink.'">'.Display::return_icon(
124
+            'back.png', get_lang('BackTo').' '.get_lang('Maintenance'), '', ICON_SIZE_MEDIUM
125
+        ).'</a>';
126 126
     $html .= '</div>';
127 127
 
128 128
     $html .= Display::return_message(
129 129
             get_lang('CopyCourseFromSessionToSessionExplanation')
130 130
     );
131 131
 
132
-    $html .= '<form name="formulaire" method="post" action="' . api_get_self(
133
-        ) . '?' . api_get_cidreq() . '" >';
132
+    $html .= '<form name="formulaire" method="post" action="'.api_get_self(
133
+        ).'?'.api_get_cidreq().'" >';
134 134
     $html .= '<table border="0" cellpadding="5" cellspacing="0" width="100%">';
135 135
 
136 136
     // Source
137
-    $html .= '<tr><td width="15%"><b>' . get_lang(
137
+    $html .= '<tr><td width="15%"><b>'.get_lang(
138 138
             'OriginCoursesFromSession'
139
-        ) . ':</b></td>';
140
-    $html .= '<td width="10%" align="left">' . api_get_session_name(
139
+        ).':</b></td>';
140
+    $html .= '<td width="10%" align="left">'.api_get_session_name(
141 141
             $sessionId
142
-        ) . '</td>';
142
+        ).'</td>';
143 143
     $html .= '<td width="50%">';
144
-    $html .= "{$courseInfo['title']} ({$courseInfo['code']})" . '</td></tr>';
144
+    $html .= "{$courseInfo['title']} ({$courseInfo['code']})".'</td></tr>';
145 145
 
146 146
     // Destination
147
-    $html .= '<tr><td width="15%"><b>' . get_lang(
147
+    $html .= '<tr><td width="15%"><b>'.get_lang(
148 148
             'DestinationCoursesFromSession'
149
-        ) . ':</b></td>';
149
+        ).':</b></td>';
150 150
     $html .= '<td width="10%" align="left"><div id="ajax_sessions_list_destination">';
151 151
     $html .= '<select name="sessions_list_destination" onchange="javascript: xajax_searchCourses(this.value,\'destination\');">';
152 152
     if (empty($sessions)) {
153
-        $html .= '<option value = "0">' . get_lang(
153
+        $html .= '<option value = "0">'.get_lang(
154 154
                 'ThereIsNotStillASession'
155
-            ) . '</option>';
155
+            ).'</option>';
156 156
     } else {
157
-        $html .= '<option value = "0">' . get_lang(
157
+        $html .= '<option value = "0">'.get_lang(
158 158
                 'SelectASession'
159
-            ) . '</option>';
159
+            ).'</option>';
160 160
         foreach ($sessions as $session) {
161 161
             if ($session['id'] == $sessionId) {
162 162
                 continue;
@@ -166,7 +166,7 @@  discard block
 block discarded – undo
166 166
                 continue;
167 167
             }
168 168
 
169
-            $html .= '<option value="' . $session['id'] . '">' . $session['name'] . '</option>';
169
+            $html .= '<option value="'.$session['id'].'">'.$session['name'].'</option>';
170 170
         }
171 171
     }
172 172
 
@@ -178,17 +178,17 @@  discard block
 block discarded – undo
178 178
     $html .= '</tr></table>';
179 179
 
180 180
     $html .= "<fieldset>";
181
-    $html .= '<legend>' . get_lang('TypeOfCopy') . ' <small>(' . get_lang('CopyOnlySessionItems') . ')</small></legend>';
181
+    $html .= '<legend>'.get_lang('TypeOfCopy').' <small>('.get_lang('CopyOnlySessionItems').')</small></legend>';
182 182
     $html .= '<label class="radio"><input type="radio" id="copy_option_1" name="copy_option" value="full_copy" checked="checked"/>';
183
-    $html .= get_lang('FullCopy') . '</label>';
183
+    $html .= get_lang('FullCopy').'</label>';
184 184
     $html .= '<label class="radio"><input type="radio" id="copy_option_2" name="copy_option" value="select_items"/>';
185
-    $html .= ' ' . get_lang('LetMeSelectItems') . '</label><br/>';
185
+    $html .= ' '.get_lang('LetMeSelectItems').'</label><br/>';
186 186
 
187 187
     $html .= "</fieldset>";
188 188
 
189
-    $html .= '<button class="save" type="submit" onclick="javascript:if(!confirm(' . "'" . addslashes(
189
+    $html .= '<button class="save" type="submit" onclick="javascript:if(!confirm('."'".addslashes(
190 190
             api_htmlentities(get_lang('ConfirmYourChoice'), ENT_QUOTES)
191
-        ) . "'" . ')) return false;">' . get_lang('CopyCourse') . '</button>';
191
+        )."'".')) return false;">'.get_lang('CopyCourse').'</button>';
192 192
     $html .= '</form>';
193 193
     echo $html;
194 194
 }
@@ -214,10 +214,10 @@  discard block
 block discarded – undo
214 214
 
215 215
             $courseTitle = str_replace("'", "\'", $course['title']);
216 216
 
217
-            $return .= '<option value="' . $course['code'] . '" title="' . @htmlspecialchars(
218
-                    $course['title'] . ' (' . $course['visual_code'] . ')', ENT_QUOTES, api_get_system_encoding()
219
-                ) . '">' .
220
-                $course['title'] . ' (' . $course['visual_code'] . ')</option>';
217
+            $return .= '<option value="'.$course['code'].'" title="'.@htmlspecialchars(
218
+                    $course['title'].' ('.$course['visual_code'].')', ENT_QUOTES, api_get_system_encoding()
219
+                ).'">'.
220
+                $course['title'].' ('.$course['visual_code'].')</option>';
221 221
         }
222 222
         $return .= '</select>';
223 223
         $_SESSION['course_list_destination'] = $course_list_destination;
@@ -235,7 +235,7 @@  discard block
 block discarded – undo
235 235
 /* HTML head extra */
236 236
 
237 237
 $htmlHeadXtra[] = $xajax->getJavascript(
238
-    api_get_path(WEB_LIBRARY_PATH) . 'xajax/'
238
+    api_get_path(WEB_LIBRARY_PATH).'xajax/'
239 239
 );
240 240
 $htmlHeadXtra[] = '<script>
241 241
 	function checkSelected(id_select,id_radio,id_title,id_destination) {
@@ -380,7 +380,7 @@  discard block
 block discarded – undo
380 380
 
381 381
         CourseSelectForm :: display_form($course, $hiddenFields, true);
382 382
 
383
-        echo '<div style="float:right"><a href="javascript:window.history.go(-1);">' .
383
+        echo '<div style="float:right"><a href="javascript:window.history.go(-1);">'.
384 384
             Display::return_icon(
385 385
                 'back.png',
386 386
                 get_lang('Back').' '.get_lang('To').' '.get_lang(
@@ -388,7 +388,7 @@  discard block
 block discarded – undo
388 388
                 ),
389 389
                 array('style' => 'vertical-align:middle')
390 390
             ).
391
-            get_lang('Back') . '</a></div>';
391
+            get_lang('Back').'</a></div>';
392 392
     } else {
393 393
         Display::display_error_message(
394 394
             get_lang('You must select a course from original session and select a destination session')
Please login to merge, or discard this patch.
main/survey/create_new_survey.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -100,7 +100,7 @@  discard block
 block discarded – undo
100 100
 $form = new FormValidator(
101 101
     'survey',
102 102
     'post',
103
-    api_get_self().'?action='.Security::remove_XSS($_GET['action']).'&survey_id='.$survey_id. '&' . api_get_cidreq()
103
+    api_get_self().'?action='.Security::remove_XSS($_GET['action']).'&survey_id='.$survey_id.'&'.api_get_cidreq()
104 104
 );
105 105
 
106 106
 $form->addElement('header', $tool_name);
@@ -216,7 +216,7 @@  discard block
 block discarded – undo
216 216
             foreach ($field_list as $key => & $field) {
217 217
                 if ($field['visibility'] == 1) {
218 218
                     $form->addElement('checkbox', 'profile_'.$key, ' ', '&nbsp;&nbsp;'.$field['name']);
219
-                    $input_name_list.= 'profile_'.$key.',';
219
+                    $input_name_list .= 'profile_'.$key.',';
220 220
                 }
221 221
             }
222 222
 
Please login to merge, or discard this patch.