Completed
Push — 1.10.x ( e39098...d9ba33 )
by Julito
34:46
created
main/work/downloadfolder.inc.php 2 patches
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -62,7 +62,7 @@
 block discarded – undo
62 62
 
63 63
 if (api_is_allowed_to_edit() || api_is_coach()) {
64 64
     //Search for all files that are not deleted => visibility != 2
65
-   $sql = "SELECT DISTINCT
65
+    $sql = "SELECT DISTINCT
66 66
                 url,
67 67
                 title,
68 68
                 description,
Please login to merge, or discard this patch.
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -9,7 +9,7 @@  discard block
 block discarded – undo
9 9
 
10 10
 $work_id = $_GET['id'];
11 11
 require_once '../inc/global.inc.php';
12
-$current_course_tool  = TOOL_STUDENTPUBLICATION;
12
+$current_course_tool = TOOL_STUDENTPUBLICATION;
13 13
 $_course = api_get_course_info();
14 14
 
15 15
 // Protection
@@ -178,10 +178,10 @@  discard block
 block discarded – undo
178 178
 if (!empty($files)) {
179 179
     $fileName = api_replace_dangerous_char($work_data['title']);
180 180
     // Logging
181
-    Event::event_download($fileName .'.zip (folder)');
181
+    Event::event_download($fileName.'.zip (folder)');
182 182
 
183 183
     //start download of created file
184
-    $name = $fileName .'.zip';
184
+    $name = $fileName.'.zip';
185 185
     if (Security::check_abs_path($temp_zip_file, api_get_path(SYS_ARCHIVE_PATH))) {
186 186
         DocumentManager::file_send_for_download($temp_zip_file, true, $name);
187 187
         @unlink($temp_zip_file);
Please login to merge, or discard this patch.
main/work/add_user.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -74,8 +74,8 @@  discard block
 block discarded – undo
74 74
         $usersAdded[] = $myUserId;
75 75
         $userInfo = api_get_user_info($myUserId);
76 76
         $url = api_get_path(WEB_CODE_PATH).'work/add_user.php?action=delete&id='.$workId.'&user_id='.$myUserId;
77
-        $link = Display::url('<em class="fa fa-trash"></em> ' . get_lang('Delete'), $url, array('class' => 'btn btn-danger btn-sm'));
78
-        echo '<li class="list-group-item">' . $userInfo['complete_name_with_username'] . '<div class="pull-right">' . $link . '</div></li>';
77
+        $link = Display::url('<em class="fa fa-trash"></em> '.get_lang('Delete'), $url, array('class' => 'btn btn-danger btn-sm'));
78
+        echo '<li class="list-group-item">'.$userInfo['complete_name_with_username'].'<div class="pull-right">'.$link.'</div></li>';
79 79
     }
80 80
     echo '</ul>';
81 81
 }
@@ -108,8 +108,8 @@  discard block
 block discarded – undo
108 108
     foreach ($userToAddList as $user) {
109 109
         $userName = api_get_person_name($user['firstname'], $user['lastname']).' ('.$user['username'].') ';
110 110
         $url = api_get_path(WEB_CODE_PATH).'work/add_user.php?action=add&id='.$workId.'&user_id='.$user['user_id'];
111
-        $link = Display::url('<em class="fa fa-plus"></em> ' . get_lang('Add'), $url, array('class' => 'btn btn-primary btn-sm'));
112
-        echo '<li class="list-group-item">' . $userName . '<div class="pull-right"> ' . $link . '</div></li>';
111
+        $link = Display::url('<em class="fa fa-plus"></em> '.get_lang('Add'), $url, array('class' => 'btn btn-primary btn-sm'));
112
+        echo '<li class="list-group-item">'.$userName.'<div class="pull-right"> '.$link.'</div></li>';
113 113
     }
114 114
     echo '</ul>';
115 115
 } else {
Please login to merge, or discard this patch.
main/work/upload_from_template.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -4,7 +4,7 @@
 block discarded – undo
4 4
 use ChamiloSession as Session;
5 5
 
6 6
 require_once '../inc/global.inc.php';
7
-$current_course_tool  = TOOL_STUDENTPUBLICATION;
7
+$current_course_tool = TOOL_STUDENTPUBLICATION;
8 8
 
9 9
 api_protect_course_script(true);
10 10
 
Please login to merge, or discard this patch.
main/coursecopy/create_backup.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -72,8 +72,8 @@  discard block
 block discarded – undo
72 72
 
73 73
     $zip_file = CourseArchiver::write_course($course);
74 74
     Display::display_confirmation_message(get_lang('BackupCreated'));
75
-    echo '<br /><a class="btn btn-primary btn-large" href="' . api_get_path(WEB_CODE_PATH) . 'course_info/download.php?archive=' . $zip_file . '&' . api_get_cidreq() . '">
76
-    ' . get_lang('Download') . '</a>';
75
+    echo '<br /><a class="btn btn-primary btn-large" href="'.api_get_path(WEB_CODE_PATH).'course_info/download.php?archive='.$zip_file.'&'.api_get_cidreq().'">
76
+    ' . get_lang('Download').'</a>';
77 77
 
78 78
 } elseif (Security::check_token('post') && (
79 79
         isset($_POST['backup_option']) &&
@@ -95,7 +95,7 @@  discard block
 block discarded – undo
95 95
     if (!$course->has_resources()) {
96 96
         echo get_lang('NoResourcesToBackup');
97 97
     } else {
98
-        $form = new FormValidator('create_backup_form', 'post', api_get_self() . '?' . api_get_cidreq());
98
+        $form = new FormValidator('create_backup_form', 'post', api_get_self().'?'.api_get_cidreq());
99 99
         $form->addElement('header', get_lang('SelectOptionForBackup'));
100 100
         $form->addElement('radio', 'backup_option', '', get_lang('CreateFullBackup'), 'full_backup');
101 101
         $form->addElement('radio', 'backup_option', '', get_lang('LetMeSelectItems'), 'select_items');
Please login to merge, or discard this patch.
main/coursecopy/copy_course.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -7,7 +7,7 @@  discard block
 block discarded – undo
7 7
 
8 8
 // Setting the global file that gets the general configuration, the databases, the languages, ...
9 9
 require_once '../inc/global.inc.php';
10
-$current_course_tool  = TOOL_COURSE_MAINTENANCE;
10
+$current_course_tool = TOOL_COURSE_MAINTENANCE;
11 11
 api_protect_course_script(true);
12 12
 
13 13
 // Including additional libraries
@@ -120,7 +120,7 @@  discard block
 block discarded – undo
120 120
         $form->addGroup($group, '', get_lang('SameFilename'));
121 121
         $form->add_progress_bar();
122 122
         $form->addButtonSave(get_lang('CopyCourse'));
123
-        $form->setDefaults(array('copy_option' =>'select_items','same_file_name_option' => FILE_OVERWRITE));
123
+        $form->setDefaults(array('copy_option' =>'select_items', 'same_file_name_option' => FILE_OVERWRITE));
124 124
 
125 125
         // Add Security token
126 126
         $token = Security::get_token();
Please login to merge, or discard this patch.
main/coursecopy/classes/CourseCopyLearnpath.class.php 2 patches
Indentation   +182 added lines, -182 removed lines patch added patch discarded remove patch
@@ -8,194 +8,194 @@
 block discarded – undo
8 8
  */
9 9
 class CourseCopyLearnpath extends Coursecopy\Resource
10 10
 {
11
-	/**
12
-	 * Type of learnpath (can be dokeos (1), scorm (2), aicc (3))
13
-	 */
14
-	public $lp_type;
15
-	/**
16
-	 * The name
17
-	 */
18
-	public $name;
19
-	/**
20
-	 * The reference
21
-	 */
22
-	public $ref;
23
-	/**
24
-	 * The description
25
-	 */
26
-	public $description;
27
-	/**
28
-	 * Path to the learning path files
29
-	 */
30
-	public $path;
31
-	/**
32
-	 * Whether additional commits should be forced or not
33
-	 */
34
-	public $force_commit;
35
-	/**
36
-	 * View mode by default ('embedded' or 'fullscreen')
37
-	 */
38
-	public $default_view_mod;
39
-	/**
40
-	 * Default character encoding
41
-	 */
42
-	public $default_encoding;
43
-	/**
44
-	 * Display order
45
-	 */
46
-	public $display_order;
47
-	/**
48
-	 * Content editor/publisher
49
-	 */
50
-	public $content_maker;
51
-	/**
52
-	 * Location of the content (local or remote)
53
-	 */
54
-	public $content_local;
55
-	/**
56
-	 * License of the content
57
-	 */
58
-	public $content_license;
59
-	/**
60
-	 * Whether to prevent reinitialisation or not
61
-	 */
62
-	public $prevent_reinit;
63
-	/**
64
-	 * JavaScript library used
65
-	 */
66
-	public $js_lib;
67
-	/**
68
-	 * Debug level for this lp
69
-	 */
70
-	public $debug;
71
-	/**
72
-	 * The items
73
-	 */
74
-	public $items;
75
-	/**
76
-	 * The learnpath visibility on the homepage
77
-	 */
78
-	public $visibility;
11
+    /**
12
+     * Type of learnpath (can be dokeos (1), scorm (2), aicc (3))
13
+     */
14
+    public $lp_type;
15
+    /**
16
+     * The name
17
+     */
18
+    public $name;
19
+    /**
20
+     * The reference
21
+     */
22
+    public $ref;
23
+    /**
24
+     * The description
25
+     */
26
+    public $description;
27
+    /**
28
+     * Path to the learning path files
29
+     */
30
+    public $path;
31
+    /**
32
+     * Whether additional commits should be forced or not
33
+     */
34
+    public $force_commit;
35
+    /**
36
+     * View mode by default ('embedded' or 'fullscreen')
37
+     */
38
+    public $default_view_mod;
39
+    /**
40
+     * Default character encoding
41
+     */
42
+    public $default_encoding;
43
+    /**
44
+     * Display order
45
+     */
46
+    public $display_order;
47
+    /**
48
+     * Content editor/publisher
49
+     */
50
+    public $content_maker;
51
+    /**
52
+     * Location of the content (local or remote)
53
+     */
54
+    public $content_local;
55
+    /**
56
+     * License of the content
57
+     */
58
+    public $content_license;
59
+    /**
60
+     * Whether to prevent reinitialisation or not
61
+     */
62
+    public $prevent_reinit;
63
+    /**
64
+     * JavaScript library used
65
+     */
66
+    public $js_lib;
67
+    /**
68
+     * Debug level for this lp
69
+     */
70
+    public $debug;
71
+    /**
72
+     * The items
73
+     */
74
+    public $items;
75
+    /**
76
+     * The learnpath visibility on the homepage
77
+     */
78
+    public $visibility;
79 79
 
80
-	/**
81
-	 * Author info
82
-	 */
83
-	public $author;
80
+    /**
81
+     * Author info
82
+     */
83
+    public $author;
84 84
 
85
-	/**
86
-	 * Author's image
87
-	 */
88
-	public $preview_image;
85
+    /**
86
+     * Author's image
87
+     */
88
+    public $preview_image;
89 89
 
90
-	/**
91
-	 * Create a new learnpath
92
-	 * @param integer ID
93
-	 * @param integer Type (1,2,3,...)
94
-	 * @param string $name
95
-	 * @param string $path
96
-	 * @param string $ref
97
-	 * @param string $description
98
-	 * @param string $content_local
99
-	 * @param string $default_encoding
100
-	 * @param string $default_view_mode
101
-	 * @param bool   $prevent_reinit
102
-	 * @param bool   $force_commit
103
-	 * @param string $content_maker
104
-	 * @param integer $display_order
105
-	 * @param string $js_lib
106
-	 * @param string $content_license
107
-	 * @param integer $debug
108
-	 * @param string $visibility
109
-	 * @param array  $items
110
-	 */
111
-	public function __construct(
112
-		$id,
113
-		$type,
114
-		$name,
115
-		$path,
116
-		$ref,
117
-		$description,
118
-		$content_local,
119
-		$default_encoding,
120
-		$default_view_mode,
121
-		$prevent_reinit,
122
-		$force_commit,
123
-		$content_maker,
124
-		$display_order,
125
-		$js_lib,
126
-		$content_license,
127
-		$debug,
128
-		$visibility,
129
-		$author,
130
-		$preview_image,
131
-		$use_max_score,
132
-		$autolaunch,
133
-		$created_on,
134
-		$modified_on,
135
-		$publicated_on,
136
-		$expired_on,
137
-		$session_id,
138
-		$items
139
-	) {
140
-		parent::__construct($id, RESOURCE_LEARNPATH);
141
-		$this->lp_type = $type;
142
-		$this->name = $name;
143
-		$this->path = $path;
144
-		$this->ref = $ref;
145
-		$this->description = $description;
146
-		$this->content_local = $content_local;
147
-		$this->default_encoding = $default_encoding;
148
-		$this->default_view_mod = $default_view_mode;
149
-		$this->prevent_reinit = $prevent_reinit;
150
-		$this->force_commit = $force_commit;
151
-		$this->content_maker = $content_maker;
152
-		$this->display_order = $display_order;
153
-		$this->js_lib = $js_lib;
154
-		$this->content_license = $content_license;
155
-		$this->debug = $debug;
156
-		$this->visibility=$visibility;
90
+    /**
91
+     * Create a new learnpath
92
+     * @param integer ID
93
+     * @param integer Type (1,2,3,...)
94
+     * @param string $name
95
+     * @param string $path
96
+     * @param string $ref
97
+     * @param string $description
98
+     * @param string $content_local
99
+     * @param string $default_encoding
100
+     * @param string $default_view_mode
101
+     * @param bool   $prevent_reinit
102
+     * @param bool   $force_commit
103
+     * @param string $content_maker
104
+     * @param integer $display_order
105
+     * @param string $js_lib
106
+     * @param string $content_license
107
+     * @param integer $debug
108
+     * @param string $visibility
109
+     * @param array  $items
110
+     */
111
+    public function __construct(
112
+        $id,
113
+        $type,
114
+        $name,
115
+        $path,
116
+        $ref,
117
+        $description,
118
+        $content_local,
119
+        $default_encoding,
120
+        $default_view_mode,
121
+        $prevent_reinit,
122
+        $force_commit,
123
+        $content_maker,
124
+        $display_order,
125
+        $js_lib,
126
+        $content_license,
127
+        $debug,
128
+        $visibility,
129
+        $author,
130
+        $preview_image,
131
+        $use_max_score,
132
+        $autolaunch,
133
+        $created_on,
134
+        $modified_on,
135
+        $publicated_on,
136
+        $expired_on,
137
+        $session_id,
138
+        $items
139
+    ) {
140
+        parent::__construct($id, RESOURCE_LEARNPATH);
141
+        $this->lp_type = $type;
142
+        $this->name = $name;
143
+        $this->path = $path;
144
+        $this->ref = $ref;
145
+        $this->description = $description;
146
+        $this->content_local = $content_local;
147
+        $this->default_encoding = $default_encoding;
148
+        $this->default_view_mod = $default_view_mode;
149
+        $this->prevent_reinit = $prevent_reinit;
150
+        $this->force_commit = $force_commit;
151
+        $this->content_maker = $content_maker;
152
+        $this->display_order = $display_order;
153
+        $this->js_lib = $js_lib;
154
+        $this->content_license = $content_license;
155
+        $this->debug = $debug;
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
-		$this->items = $items;
170
-	}
171
-	/**
172
-	 * Get the items
173
-	 */
174
-	function get_items()
175
-	{
176
-		return $this->items;
177
-	}
169
+        $this->items = $items;
170
+    }
171
+    /**
172
+     * Get the items
173
+     */
174
+    function get_items()
175
+    {
176
+        return $this->items;
177
+    }
178 178
 
179
-	/**
180
-	 * Check if a given resource is used as an item in this chapter
181
-	 */
182
-	function has_item($resource)
183
-	{
184
-		foreach ($this->items as $item) {
185
-			if ($item['id'] == $resource->get_id() &&
186
-				isset($item['type']) && $item['type'] == $resource->get_type()
187
-			) {
188
-				return true;
189
-			}
190
-		}
191
-		return false;
192
-	}
179
+    /**
180
+     * Check if a given resource is used as an item in this chapter
181
+     */
182
+    function has_item($resource)
183
+    {
184
+        foreach ($this->items as $item) {
185
+            if ($item['id'] == $resource->get_id() &&
186
+                isset($item['type']) && $item['type'] == $resource->get_type()
187
+            ) {
188
+                return true;
189
+            }
190
+        }
191
+        return false;
192
+    }
193 193
 
194
-	/**
195
-	 * Show this learnpath
196
-	 */
197
-	function show() {
198
-		parent::show();
199
-		echo $this->name;
200
-	}
194
+    /**
195
+     * Show this learnpath
196
+     */
197
+    function show() {
198
+        parent::show();
199
+        echo $this->name;
200
+    }
201 201
 }
Please login to merge, or discard this patch.
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -153,18 +153,18 @@
 block discarded – undo
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
 	}
Please login to merge, or discard this patch.
main/coursecopy/classes/CourseBuilder.class.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -595,7 +595,7 @@  discard block
 block discarded – undo
595 595
         $table_doc = Database:: get_course_table(TABLE_DOCUMENT);
596 596
 
597 597
         if (!empty($courseId) && !empty($session_id)) {
598
-            $session_id  = intval($session_id);
598
+            $session_id = intval($session_id);
599 599
             if ($with_base_content) {
600 600
                 $session_condition = api_get_session_condition(
601 601
                     $session_id,
@@ -804,7 +804,7 @@  discard block
 block discarded – undo
804 804
                 'title' => get_lang('OrphanQuestions', ''),
805 805
                 'type' => 2
806 806
             );
807
-            $newQuiz = new Quiz((object)$obj);
807
+            $newQuiz = new Quiz((object) $obj);
808 808
             if (!empty($orphanQuestionIds)) {
809 809
                 foreach ($orphanQuestionIds as $index => $orphanId) {
810 810
                     $order = $index + 1;
Please login to merge, or discard this patch.
main/coursecopy/classes/Event.class.php 1 patch
Indentation   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -66,19 +66,19 @@
 block discarded – undo
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
Please login to merge, or discard this patch.
main/coursecopy/classes/ForumPost.class.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -25,6 +25,6 @@
 block discarded – undo
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
 }
Please login to merge, or discard this patch.