@@ -12,7 +12,7 @@ |
||
12 | 12 | require_once __DIR__.'/../inc/global.inc.php'; |
13 | 13 | require_once 'work.lib.php'; |
14 | 14 | |
15 | -$current_course_tool = TOOL_STUDENTPUBLICATION; |
|
15 | +$current_course_tool = TOOL_STUDENTPUBLICATION; |
|
16 | 16 | $this_section = SECTION_COURSES; |
17 | 17 | |
18 | 18 | // Course protection |
@@ -9,7 +9,7 @@ discard block |
||
9 | 9 | |
10 | 10 | $work_id = $_GET['id']; |
11 | 11 | require_once __DIR__.'/../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 |
@@ -187,10 +187,10 @@ discard block |
||
187 | 187 | if (!empty($files)) { |
188 | 188 | $fileName = api_replace_dangerous_char($work_data['title']); |
189 | 189 | // Logging |
190 | - Event::event_download($fileName .'.zip (folder)'); |
|
190 | + Event::event_download($fileName.'.zip (folder)'); |
|
191 | 191 | |
192 | 192 | //start download of created file |
193 | - $name = $fileName .'.zip'; |
|
193 | + $name = $fileName.'.zip'; |
|
194 | 194 | |
195 | 195 | if (Security::check_abs_path($temp_zip_file, api_get_path(SYS_ARCHIVE_PATH))) { |
196 | 196 | DocumentManager::file_send_for_download($temp_zip_file, true, $name); |
@@ -3,7 +3,7 @@ discard block |
||
3 | 3 | |
4 | 4 | require_once __DIR__.'/../inc/global.inc.php'; |
5 | 5 | |
6 | -$current_course_tool = TOOL_STUDENTPUBLICATION; |
|
6 | +$current_course_tool = TOOL_STUDENTPUBLICATION; |
|
7 | 7 | |
8 | 8 | api_protect_course_script(true); |
9 | 9 | |
@@ -78,7 +78,7 @@ discard block |
||
78 | 78 | |
79 | 79 | echo '<div class="actions">'; |
80 | 80 | echo '<a href="'.api_get_path(WEB_CODE_PATH).'work/work.php?'.api_get_cidreq().'>'. |
81 | - Display::return_icon('back.png', get_lang('BackToWorksList'),'',ICON_SIZE_MEDIUM).'</a>'; |
|
81 | + Display::return_icon('back.png', get_lang('BackToWorksList'), '', ICON_SIZE_MEDIUM).'</a>'; |
|
82 | 82 | echo '</div>'; |
83 | 83 | |
84 | 84 | if (!empty($my_folder_data['description'])) { |
@@ -4,7 +4,7 @@ |
||
4 | 4 | use ChamiloSession as Session; |
5 | 5 | |
6 | 6 | require_once __DIR__.'/../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 |
@@ -2,7 +2,7 @@ discard block |
||
2 | 2 | /* For licensing terms, see /license.txt */ |
3 | 3 | |
4 | 4 | require_once __DIR__.'/../inc/global.inc.php'; |
5 | -$current_course_tool = TOOL_STUDENTPUBLICATION; |
|
5 | +$current_course_tool = TOOL_STUDENTPUBLICATION; |
|
6 | 6 | |
7 | 7 | require_once 'work.lib.php'; |
8 | 8 | |
@@ -52,7 +52,7 @@ discard block |
||
52 | 52 | $userInfo = api_get_user_info($work['user_id']); |
53 | 53 | $interbreadcrumb[] = array('url' => $url_dir, 'name' => $my_folder_data['title']); |
54 | 54 | $interbreadcrumb[] = array('url' => '#', 'name' => $userInfo['complete_name']); |
55 | - $interbreadcrumb[] = array('url' => '#','name' => $work['title']); |
|
55 | + $interbreadcrumb[] = array('url' => '#', 'name' => $work['title']); |
|
56 | 56 | |
57 | 57 | if (($courseInfo['show_score'] == 0 && |
58 | 58 | $work['active'] == 1 && |
@@ -2,7 +2,7 @@ discard block |
||
2 | 2 | /* For licensing terms, see /license.txt */ |
3 | 3 | |
4 | 4 | require_once __DIR__.'/../inc/global.inc.php'; |
5 | -$current_course_tool = TOOL_STUDENTPUBLICATION; |
|
5 | +$current_course_tool = TOOL_STUDENTPUBLICATION; |
|
6 | 6 | |
7 | 7 | api_protect_course_script(true); |
8 | 8 | |
@@ -106,7 +106,7 @@ discard block |
||
106 | 106 | if (!empty($workId)) { |
107 | 107 | if (empty($_GET['list']) or Security::remove_XSS($_GET['list']) == 'with') { |
108 | 108 | $output .= '<a href="'.api_get_self().'?'.api_get_cidreq().'&id='.$workId.'&list=without">'. |
109 | - Display::return_icon('exercice_uncheck.png', get_lang('ViewUsersWithoutTask'),'',ICON_SIZE_MEDIUM)."</a>"; |
|
109 | + Display::return_icon('exercice_uncheck.png', get_lang('ViewUsersWithoutTask'), '', ICON_SIZE_MEDIUM)."</a>"; |
|
110 | 110 | } else { |
111 | 111 | if (!isset($_GET['action']) || (isset($_GET['action']) && $_GET['action'] != 'send_mail')) { |
112 | 112 | $output .= '<a href="'.api_get_self().'?'.api_get_cidreq().'&id='.$workId.'&list=without&action=send_mail&sec_token='.$token.'">'. |
@@ -6,7 +6,7 @@ discard block |
||
6 | 6 | **/ |
7 | 7 | |
8 | 8 | require_once __DIR__.'/../inc/global.inc.php'; |
9 | -$current_course_tool = TOOL_STUDENTPUBLICATION; |
|
9 | +$current_course_tool = TOOL_STUDENTPUBLICATION; |
|
10 | 10 | |
11 | 11 | api_protect_course_script(true); |
12 | 12 | |
@@ -36,7 +36,7 @@ discard block |
||
36 | 36 | $item_id = isset($_REQUEST['item_id']) ? intval($_REQUEST['item_id']) : null; |
37 | 37 | $origin = isset($_REQUEST['origin']) ? Security::remove_XSS($_REQUEST['origin']) : ''; |
38 | 38 | $course_dir = api_get_path(SYS_COURSE_PATH).$courseInfo['path']; |
39 | -$base_work_dir = $course_dir . '/work'; |
|
39 | +$base_work_dir = $course_dir.'/work'; |
|
40 | 40 | $action = isset($_REQUEST['action']) ? $_REQUEST['action'] : 'list'; |
41 | 41 | |
42 | 42 | //Download folder |
@@ -73,7 +73,7 @@ discard block |
||
73 | 73 | 'url' => api_get_path(WEB_CODE_PATH).'work/work.php?'.api_get_cidreq(), |
74 | 74 | 'name' => get_lang('StudentPublications'), |
75 | 75 | ); |
76 | - $url_dir = api_get_path(WEB_CODE_PATH).'work/work.php?&id=' . $work_id.'&'.api_get_cidreq(); |
|
76 | + $url_dir = api_get_path(WEB_CODE_PATH).'work/work.php?&id='.$work_id.'&'.api_get_cidreq(); |
|
77 | 77 | if (!empty($my_folder_data)) { |
78 | 78 | $interbreadcrumb[] = array('url' => $url_dir, 'name' => $my_folder_data['title']); |
79 | 79 | } |
@@ -116,7 +116,7 @@ discard block |
||
116 | 116 | $interbreadcrumb[] = array('url' => '#', 'name' => get_lang('EditToolOptions')); |
117 | 117 | } |
118 | 118 | if ($action == 'create_dir') { |
119 | - $interbreadcrumb[] = array('url' => '#','name' => get_lang('CreateAssignment')); |
|
119 | + $interbreadcrumb[] = array('url' => '#', 'name' => get_lang('CreateAssignment')); |
|
120 | 120 | } |
121 | 121 | } |
122 | 122 | } |
@@ -166,7 +166,7 @@ discard block |
||
166 | 166 | $form = new FormValidator( |
167 | 167 | 'form1', |
168 | 168 | 'post', |
169 | - api_get_path(WEB_CODE_PATH) . 'work/work.php?action=create_dir&' . api_get_cidreq() |
|
169 | + api_get_path(WEB_CODE_PATH).'work/work.php?action=create_dir&'.api_get_cidreq() |
|
170 | 170 | ); |
171 | 171 | $form->addElement('header', get_lang('CreateAssignment')); |
172 | 172 | $form->addElement('hidden', 'action', 'add'); |
@@ -202,7 +202,7 @@ discard block |
||
202 | 202 | $result = deleteDirWork($_REQUEST['id']); |
203 | 203 | if ($result) { |
204 | 204 | $message = Display::return_message( |
205 | - get_lang('DirDeleted') . ': ' . $work_to_delete['title'], |
|
205 | + get_lang('DirDeleted').': '.$work_to_delete['title'], |
|
206 | 206 | 'success' |
207 | 207 | ); |
208 | 208 | Display::addFlash($message); |
@@ -233,16 +233,16 @@ discard block |
||
233 | 233 | if ($move_to_path == -1) { |
234 | 234 | $move_to_path = '/'; |
235 | 235 | } elseif (substr($move_to_path, -1, 1) != '/') { |
236 | - $move_to_path = $move_to_path .'/'; |
|
236 | + $move_to_path = $move_to_path.'/'; |
|
237 | 237 | } |
238 | 238 | |
239 | 239 | // Security fix: make sure they can't move files that are not in the document table |
240 | 240 | if ($path = get_work_path($item_id)) { |
241 | - if (move($course_dir.'/'.$path, $base_work_dir . $move_to_path)) { |
|
241 | + if (move($course_dir.'/'.$path, $base_work_dir.$move_to_path)) { |
|
242 | 242 | // Update db |
243 | 243 | updateWorkUrl( |
244 | 244 | $item_id, |
245 | - 'work' . $move_to_path, |
|
245 | + 'work'.$move_to_path, |
|
246 | 246 | $_REQUEST['move_to_id'] |
247 | 247 | ); |
248 | 248 | |
@@ -341,7 +341,7 @@ discard block |
||
341 | 341 | $content .= '</div>'; |
342 | 342 | $content .= '</div>'; |
343 | 343 | $content .= '<div id="student-list-work" style="display: none" class="table-responsive">'; |
344 | - $content .= '<div class="toolbar"><a id="closed-view-list" href="#"><em class="fa fa-times-circle"></em> ' .get_lang('Close'). '</a></div>'; |
|
344 | + $content .= '<div class="toolbar"><a id="closed-view-list" href="#"><em class="fa fa-times-circle"></em> '.get_lang('Close').'</a></div>'; |
|
345 | 345 | $content .= showStudentList($work_id); |
346 | 346 | $content .= '</div>'; |
347 | 347 | } else { |
@@ -126,7 +126,7 @@ discard block |
||
126 | 126 | if (empty($matches[1][$i])) |
127 | 127 | continue; |
128 | 128 | |
129 | - $content = strstr($content,$matches[0][$i]); |
|
129 | + $content = strstr($content, $matches[0][$i]); |
|
130 | 130 | if ($i + 1 !== count($matches[0])) { |
131 | 131 | $dir_content = substr($content, 0, strpos($content, $matches[0][$i + 1])); |
132 | 132 | } else { |
@@ -148,7 +148,7 @@ discard block |
||
148 | 148 | |
149 | 149 | $document_id = add_document($_course, $this->created_dir.'/'.$html_file, 'file', filesize($this->base_work_dir.$this->created_dir.'/'.$html_file), $html_file); |
150 | 150 | |
151 | - if ($document_id){ |
|
151 | + if ($document_id) { |
|
152 | 152 | |
153 | 153 | // Put the document in item_property update. |
154 | 154 | api_item_property_update( |
@@ -254,7 +254,7 @@ discard block |
||
254 | 254 | foreach ($specific_fields as $specific_field) { |
255 | 255 | if (isset($_REQUEST[$specific_field['code']])) { |
256 | 256 | $sterms = trim($_REQUEST[$specific_field['code']]); |
257 | - $all_specific_terms .= ' '. $sterms; |
|
257 | + $all_specific_terms .= ' '.$sterms; |
|
258 | 258 | if (!empty($sterms)) { |
259 | 259 | $sterms = explode(',', $sterms); |
260 | 260 | foreach ($sterms as $sterm) { |
@@ -263,10 +263,10 @@ discard block |
||
263 | 263 | } |
264 | 264 | } |
265 | 265 | } |
266 | - $page_content = $all_specific_terms .' '. $page_content; |
|
266 | + $page_content = $all_specific_terms.' '.$page_content; |
|
267 | 267 | $ic_slide->addValue('content', $page_content); |
268 | 268 | // Add a comment to say terms separated by commas. |
269 | - $courseid=api_get_course_id(); |
|
269 | + $courseid = api_get_course_id(); |
|
270 | 270 | $ic_slide->addCourseId($courseid); |
271 | 271 | $ic_slide->addToolId(TOOL_LEARNPATH); |
272 | 272 | $lp_id = $this->lp_id; |
@@ -274,7 +274,7 @@ discard block |
||
274 | 274 | SE_COURSE_ID => $courseid, |
275 | 275 | SE_TOOL_ID => TOOL_LEARNPATH, |
276 | 276 | SE_DATA => array('lp_id' => $lp_id, 'lp_item'=> $previous, 'document_id' => $document_id), |
277 | - SE_USER => (int)api_get_user_id(), |
|
277 | + SE_USER => (int) api_get_user_id(), |
|
278 | 278 | ); |
279 | 279 | $ic_slide->xapian_data = serialize($xapian_data); |
280 | 280 | $di->addChunk($ic_slide); |
@@ -298,7 +298,7 @@ discard block |
||
298 | 298 | * Returns additional Java command parameters |
299 | 299 | * @return string The additional parameters to be used in the Java call |
300 | 300 | */ |
301 | - function add_command_parameters(){ |
|
301 | + function add_command_parameters() { |
|
302 | 302 | return ' -d woogie "'.$this->base_work_dir.'/'.$this->file_path.'" "'.$this->base_work_dir.$this->created_dir.'/'.$this->file_name.'.html"'; |
303 | 303 | } |
304 | 304 | |
@@ -310,7 +310,7 @@ discard block |
||
310 | 310 | */ |
311 | 311 | function format_page_content($header, $content) { |
312 | 312 | // Limit the width of the doc. |
313 | - list($max_width, $max_height) = explode('x',api_get_setting('service_ppt2lp','size')); |
|
313 | + list($max_width, $max_height) = explode('x', api_get_setting('service_ppt2lp', 'size')); |
|
314 | 314 | |
315 | 315 | $content = preg_replace("|<body[^>]*>|i", "\\0\r\n<div style=\"width:".$max_width."\">", $content, -1, $count); |
316 | 316 | if ($count < 1) { |
@@ -343,7 +343,7 @@ discard block |
||
343 | 343 | } |
344 | 344 | |
345 | 345 | } elseif ($img_width > $max_width - 10) { |
346 | - $picture_resized = str_ireplace('width='.$img_width, 'width="'.($max_width-10).'"', $images[0][$key]); |
|
346 | + $picture_resized = str_ireplace('width='.$img_width, 'width="'.($max_width - 10).'"', $images[0][$key]); |
|
347 | 347 | $content = str_replace($images[0][$key], $picture_resized, $content); |
348 | 348 | } |
349 | 349 | } |
@@ -393,7 +393,7 @@ discard block |
||
393 | 393 | $path = ''; |
394 | 394 | $type = 'dir'; |
395 | 395 | if (isset($this->resources[$item['identifierref']])) { |
396 | - $oRes =& $this->resources[$item['identifierref']]; |
|
396 | + $oRes = & $this->resources[$item['identifierref']]; |
|
397 | 397 | $path = @$oRes->get_path(); |
398 | 398 | if (!empty($path)) { |
399 | 399 | $temptype = $oRes->get_scorm_type(); |
@@ -444,7 +444,7 @@ discard block |
||
444 | 444 | $item['parameters'] = Database::escape_string($item['parameters']); |
445 | 445 | |
446 | 446 | $sql = "INSERT INTO $new_lp_item (c_id, lp_id,item_type,ref,title, path,min_score,max_score, $field_add parent_item_id,previous_item_id,next_item_id, prerequisite,display_order,launch_data, parameters) |
447 | - VALUES ($courseId, $lp_id, '$type', '$identifier', '$title', '$path' , 0, $max_score, $value_add $parent, $previous, 0, '$prereq', ".$item['rel_order'] .", '".$item['datafromlms']."', '".$item['parameters']."' )"; |
|
447 | + VALUES ($courseId, $lp_id, '$type', '$identifier', '$title', '$path' , 0, $max_score, $value_add $parent, $previous, 0, '$prereq', ".$item['rel_order'].", '".$item['datafromlms']."', '".$item['parameters']."' )"; |
|
448 | 448 | |
449 | 449 | Database::query($sql); |
450 | 450 | if ($this->debug > 1) { error_log('New LP - In import_manifest(), inserting item : '.$sql, 0); } |
@@ -478,7 +478,7 @@ discard block |
||
478 | 478 | foreach ($specific_fields as $specific_field) { |
479 | 479 | if (isset($_REQUEST[$specific_field['code']])) { |
480 | 480 | $sterms = trim($_REQUEST[$specific_field['code']]); |
481 | - $all_specific_terms .= ' '. $sterms; |
|
481 | + $all_specific_terms .= ' '.$sterms; |
|
482 | 482 | if (!empty($sterms)) { |
483 | 483 | $sterms = explode(',', $sterms); |
484 | 484 | foreach ($sterms as $sterm) { |
@@ -487,7 +487,7 @@ discard block |
||
487 | 487 | } |
488 | 488 | } |
489 | 489 | } |
490 | - $body_to_index = $all_specific_terms .' '. $title; |
|
490 | + $body_to_index = $all_specific_terms.' '.$title; |
|
491 | 491 | $ic_slide->addValue("content", $body_to_index); |
492 | 492 | // TODO: Add a comment to say terms separated by commas. |
493 | 493 | $courseid = api_get_course_id(); |
@@ -497,7 +497,7 @@ discard block |
||
497 | 497 | SE_COURSE_ID => $courseid, |
498 | 498 | SE_TOOL_ID => TOOL_LEARNPATH, |
499 | 499 | SE_DATA => array('lp_id' => $lp_id, 'lp_item'=> $previous, 'document_id' => ''), // TODO: Unify with other lp types. |
500 | - SE_USER => (int)api_get_user_id(), |
|
500 | + SE_USER => (int) api_get_user_id(), |
|
501 | 501 | ); |
502 | 502 | $ic_slide->xapian_data = serialize($xapian_data); |
503 | 503 | $di->addChunk($ic_slide); |
@@ -543,7 +543,7 @@ discard block |
||
543 | 543 | public function import_package($zip_file_info, $current_dir = '', $courseInfo = array()) |
544 | 544 | { |
545 | 545 | if ($this->debug > 0) { |
546 | - error_log('In scorm::import_package('.print_r($zip_file_info,true).',"'.$current_dir.'") method', 0); |
|
546 | + error_log('In scorm::import_package('.print_r($zip_file_info, true).',"'.$current_dir.'") method', 0); |
|
547 | 547 | } |
548 | 548 | |
549 | 549 | $courseInfo = empty($courseInfo) ? api_get_course_info() : $courseInfo; |
@@ -554,7 +554,7 @@ discard block |
||
554 | 554 | $zip_file_name = $zip_file_info['name']; |
555 | 555 | |
556 | 556 | if ($this->debug > 1) { |
557 | - error_log('New LP - import_package() - zip file path = ' . $zip_file_path . ', zip file name = ' . $zip_file_name, 0); |
|
557 | + error_log('New LP - import_package() - zip file path = '.$zip_file_path.', zip file name = '.$zip_file_name, 0); |
|
558 | 558 | } |
559 | 559 | |
560 | 560 | $course_rel_dir = api_get_course_path($courseInfo['code']).'/scorm'; // scorm dir web path starting from /courses |
@@ -562,7 +562,7 @@ discard block |
||
562 | 562 | $current_dir = api_replace_dangerous_char(trim($current_dir)); // Current dir we are in, inside scorm/ |
563 | 563 | |
564 | 564 | if ($this->debug > 1) { |
565 | - error_log( 'New LP - import_package() - current_dir = ' . $current_dir, 0); |
|
565 | + error_log('New LP - import_package() - current_dir = '.$current_dir, 0); |
|
566 | 566 | } |
567 | 567 | |
568 | 568 | // Get name of the zip file without the extension. |
@@ -570,7 +570,7 @@ discard block |
||
570 | 570 | $file_info = pathinfo($zip_file_name); |
571 | 571 | $filename = $file_info['basename']; |
572 | 572 | $extension = $file_info['extension']; |
573 | - $file_base_name = str_replace('.'.$extension,'',$filename); // Filename without its extension. |
|
573 | + $file_base_name = str_replace('.'.$extension, '', $filename); // Filename without its extension. |
|
574 | 574 | $this->zipname = $file_base_name; // Save for later in case we don't have a title. |
575 | 575 | |
576 | 576 | if ($this->debug > 1) { error_log("New LP - base file name is : ".$file_base_name, 0); } |
@@ -616,7 +616,7 @@ discard block |
||
616 | 616 | $slash_count = substr_count($shortest_path, '/'); |
617 | 617 | foreach ($manifest_list as $manifest_path) { |
618 | 618 | $tmp_slash_count = substr_count($manifest_path, '/'); |
619 | - if ($tmp_slash_count<$slash_count) { |
|
619 | + if ($tmp_slash_count < $slash_count) { |
|
620 | 620 | $shortest_path = $manifest_path; |
621 | 621 | $slash_count = $tmp_slash_count; |
622 | 622 | } |
@@ -625,7 +625,7 @@ discard block |
||
625 | 625 | $this->subdir .= '/'.dirname($shortest_path); // Do not concatenate because already done above. |
626 | 626 | $manifest = $shortest_path; |
627 | 627 | if ($this->debug > 1) { error_log('New LP - Package type is now '.$package_type, 0); } |
628 | - if ($package_type== '') { |
|
628 | + if ($package_type == '') { |
|
629 | 629 | // && defined('CHECK_FOR_SCORM') && CHECK_FOR_SCORM) |
630 | 630 | if ($this->debug > 1) { error_log('New LP - Package type is empty', 0); } |
631 | 631 | |
@@ -650,8 +650,8 @@ discard block |
||
650 | 650 | $new_dir = '/'.$new_dir; |
651 | 651 | } |
652 | 652 | |
653 | - if ($new_dir[strlen($new_dir)-1] == '/') { |
|
654 | - $new_dir = substr($new_dir,0,-1); |
|
653 | + if ($new_dir[strlen($new_dir) - 1] == '/') { |
|
654 | + $new_dir = substr($new_dir, 0, -1); |
|
655 | 655 | } |
656 | 656 | |
657 | 657 | /* Uncompressing phase */ |
@@ -692,7 +692,7 @@ discard block |
||
692 | 692 | if ($file != '.' && $file != '..') { |
693 | 693 | $filetype = 'file'; |
694 | 694 | |
695 | - if (is_dir($course_sys_dir . $new_dir . $file)) { |
|
695 | + if (is_dir($course_sys_dir.$new_dir.$file)) { |
|
696 | 696 | $filetype = 'folder'; |
697 | 697 | } |
698 | 698 | |
@@ -721,7 +721,7 @@ discard block |
||
721 | 721 | } |
722 | 722 | } |
723 | 723 | } |
724 | - @rename($course_sys_dir.$new_dir.$file,$course_sys_dir.$new_dir.$safe_file); |
|
724 | + @rename($course_sys_dir.$new_dir.$file, $course_sys_dir.$new_dir.$safe_file); |
|
725 | 725 | if ($this->debug >= 1) { error_log('New LP - Renaming '.$course_sys_dir.$new_dir.$file.' to '.$course_sys_dir.$new_dir.$safe_file, 0); } |
726 | 726 | } |
727 | 727 | } |
@@ -908,7 +908,7 @@ discard block |
||
908 | 908 | if ($this->debug > 0) { error_log('In scorm::get_res_path('.$id.') method', 0); } |
909 | 909 | $path = ''; |
910 | 910 | if (isset($this->resources[$id])) { |
911 | - $oRes =& $this->resources[$id]; |
|
911 | + $oRes = & $this->resources[$id]; |
|
912 | 912 | $path = @$oRes->get_path(); |
913 | 913 | } |
914 | 914 | return $path; |
@@ -924,7 +924,7 @@ discard block |
||
924 | 924 | if ($this->debug > 0) { error_log('In scorm::get_res_type('.$id.') method', 0); } |
925 | 925 | $type = ''; |
926 | 926 | if (isset($this->resources[$id])) { |
927 | - $oRes =& $this->resources[$id]; |
|
927 | + $oRes = & $this->resources[$id]; |
|
928 | 928 | $temptype = $oRes->get_scorm_type(); |
929 | 929 | if (!empty($temptype)) { |
930 | 930 | $type = $temptype; |
@@ -943,9 +943,9 @@ discard block |
||
943 | 943 | $title = ''; |
944 | 944 | if (isset($this->manifest['organizations']['default'])) { |
945 | 945 | $title = $this->organizations[$this->manifest['organizations']['default']]->get_name(); |
946 | - } elseif (count($this->organizations)==1) { |
|
946 | + } elseif (count($this->organizations) == 1) { |
|
947 | 947 | // This will only get one title but so we don't need to know the index. |
948 | - foreach($this->organizations as $id => $value) { |
|
948 | + foreach ($this->organizations as $id => $value) { |
|
949 | 949 | $title = $this->organizations[$id]->get_name(); |
950 | 950 | break; |
951 | 951 | } |