@@ -80,11 +80,11 @@ discard block |
||
| 80 | 80 | if (!empty($myistring)) { |
| 81 | 81 | $myistring = substr($myistring, 1); |
| 82 | 82 | } |
| 83 | - // Obtention des donnees d'objectifs |
|
| 83 | + // Obtention des donnees d'objectifs |
|
| 84 | 84 | |
| 85 | - $mycoursedb = Database::get_course_table(TABLE_LP_IV_OBJECTIVE); |
|
| 85 | + $mycoursedb = Database::get_course_table(TABLE_LP_IV_OBJECTIVE); |
|
| 86 | 86 | $course_id = api_get_course_int_id(); |
| 87 | - $mylp_iv_id = $mylpi->db_item_view_id; |
|
| 87 | + $mylp_iv_id = $mylpi->db_item_view_id; |
|
| 88 | 88 | |
| 89 | 89 | $phpobjectives = array(); |
| 90 | 90 | |
@@ -98,7 +98,7 @@ discard block |
||
| 98 | 98 | $phpobjectives[] = $row; |
| 99 | 99 | } |
| 100 | 100 | } |
| 101 | - $myobjectives = json_encode($phpobjectives); |
|
| 101 | + $myobjectives = json_encode($phpobjectives); |
|
| 102 | 102 | |
| 103 | 103 | $return .= |
| 104 | 104 | "olms.score=".$myscore.";" . |
@@ -36,7 +36,7 @@ |
||
| 36 | 36 | api_get_group_id() |
| 37 | 37 | ); |
| 38 | 38 | if (!api_is_allowed_to_edit(null, true) && intval($visibility) == 0 ) { |
| 39 | - api_not_allowed(); |
|
| 39 | + api_not_allowed(); |
|
| 40 | 40 | } |
| 41 | 41 | |
| 42 | 42 | if (empty($_SESSION['oLP'])) { |
@@ -38,14 +38,14 @@ discard block |
||
| 38 | 38 | //if ($first_item->type == XML_ELEMENT_NODE) this is already check prior to the call to this function. |
| 39 | 39 | $children = $element->childNodes; |
| 40 | 40 | foreach ($children as $child) { |
| 41 | - switch ($child->nodeType) { |
|
| 41 | + switch ($child->nodeType) { |
|
| 42 | 42 | case XML_ELEMENT_NODE: |
| 43 | 43 | switch ($child->tagName) { |
| 44 | 44 | case 'item': |
| 45 | 45 | $oItem = new scormItem('manifest', $child); |
| 46 | - if ($oItem->identifier != '') { |
|
| 46 | + if ($oItem->identifier != '') { |
|
| 47 | 47 | $this->items[$oItem->identifier] = $oItem; |
| 48 | - } |
|
| 48 | + } |
|
| 49 | 49 | break; |
| 50 | 50 | case 'metadata': |
| 51 | 51 | $this->metadata = new scormMetadata('manifest', $child); |
@@ -58,24 +58,24 @@ discard block |
||
| 58 | 58 | break; |
| 59 | 59 | } |
| 60 | 60 | break; |
| 61 | - case XML_TEXT_NODE: |
|
| 61 | + case XML_TEXT_NODE: |
|
| 62 | 62 | break; |
| 63 | - } |
|
| 63 | + } |
|
| 64 | 64 | } |
| 65 | 65 | |
| 66 | 66 | if ($element->hasAttributes()) { |
| 67 | - $attributes = $element->attributes; |
|
| 68 | - //$keep_href = ''; |
|
| 69 | - foreach ($attributes as $attrib) { |
|
| 70 | - switch ($attrib->name) { |
|
| 71 | - case 'identifier': |
|
| 67 | + $attributes = $element->attributes; |
|
| 68 | + //$keep_href = ''; |
|
| 69 | + foreach ($attributes as $attrib) { |
|
| 70 | + switch ($attrib->name) { |
|
| 71 | + case 'identifier': |
|
| 72 | 72 | $this->identifier = $attrib->value; |
| 73 | - break; |
|
| 74 | - case 'structure': |
|
| 73 | + break; |
|
| 74 | + case 'structure': |
|
| 75 | 75 | $this->structure = $attrib->value; |
| 76 | - break; |
|
| 77 | - } |
|
| 78 | - } |
|
| 76 | + break; |
|
| 77 | + } |
|
| 78 | + } |
|
| 79 | 79 | } |
| 80 | 80 | |
| 81 | 81 | return true; |
@@ -64,7 +64,7 @@ discard block |
||
| 64 | 64 | |
| 65 | 65 | // Using the resource linker as a tool for adding resources to the learning path. |
| 66 | 66 | if ($action == 'add' && $type == 'learnpathitem') { |
| 67 | - $htmlHeadXtra[] = "<script> window.location=\"../resourcelinker/resourcelinker.php?source_id=5&action=$action&learnpath_id=$learnpath_id&chapter_id=$chapter_id&originalresource=no\"; </script>"; |
|
| 67 | + $htmlHeadXtra[] = "<script> window.location=\"../resourcelinker/resourcelinker.php?source_id=5&action=$action&learnpath_id=$learnpath_id&chapter_id=$chapter_id&originalresource=no\"; </script>"; |
|
| 68 | 68 | } |
| 69 | 69 | if ((!$is_allowed_to_edit) || ($isStudentView)) { |
| 70 | 70 | error_log('New LP - User not authorized in lp_view_item.php'); |
@@ -98,7 +98,7 @@ discard block |
||
| 98 | 98 | // Theme calls |
| 99 | 99 | $show_learn_path = true; |
| 100 | 100 | if (isset($_SESSION['oLP']) && is_object($_SESSION['oLP'])) { |
| 101 | - $lp_theme_css = $_SESSION['oLP']->get_theme(); |
|
| 101 | + $lp_theme_css = $_SESSION['oLP']->get_theme(); |
|
| 102 | 102 | } |
| 103 | 103 | |
| 104 | 104 | if ($mode == 'fullpage') { |
@@ -39,60 +39,60 @@ |
||
| 39 | 39 | case 'manifest': // Do the same as the default. |
| 40 | 40 | $children = $element->childNodes; |
| 41 | 41 | foreach ($children as $child) { |
| 42 | - switch ($child->nodeType) { |
|
| 43 | - case XML_ELEMENT_NODE: |
|
| 42 | + switch ($child->nodeType) { |
|
| 43 | + case XML_ELEMENT_NODE: |
|
| 44 | 44 | // Could be 'lom', 'schema', 'schemaversion' or 'location'. |
| 45 | 45 | switch ($child->tagName) { |
| 46 | - case 'lom': |
|
| 46 | + case 'lom': |
|
| 47 | 47 | $childchildren = $child->childNodes; |
| 48 | - foreach ($childchildren as $childchild) { |
|
| 49 | - $this->lom = $childchild->nodeValue; |
|
| 50 | - } |
|
| 51 | - break; |
|
| 52 | - case 'schema': |
|
| 48 | + foreach ($childchildren as $childchild) { |
|
| 49 | + $this->lom = $childchild->nodeValue; |
|
| 50 | + } |
|
| 51 | + break; |
|
| 52 | + case 'schema': |
|
| 53 | 53 | $childchildren = $child->childNodes; |
| 54 | - foreach ($childchildren as $childchild) { |
|
| 55 | - // There is generally only one child here. |
|
| 56 | - $this->schema = $childchild->nodeValue; |
|
| 57 | - } |
|
| 58 | - break; |
|
| 59 | - case 'schemaversion': |
|
| 54 | + foreach ($childchildren as $childchild) { |
|
| 55 | + // There is generally only one child here. |
|
| 56 | + $this->schema = $childchild->nodeValue; |
|
| 57 | + } |
|
| 58 | + break; |
|
| 59 | + case 'schemaversion': |
|
| 60 | 60 | $childchildren = $child->childNodes; |
| 61 | - foreach ($childchildren as $childchild) { |
|
| 62 | - // There is generally only one child here. |
|
| 63 | - $this->schemaversion = $childchild->nodeValue; |
|
| 64 | - } |
|
| 65 | - break; |
|
| 66 | - case 'location': |
|
| 61 | + foreach ($childchildren as $childchild) { |
|
| 62 | + // There is generally only one child here. |
|
| 63 | + $this->schemaversion = $childchild->nodeValue; |
|
| 64 | + } |
|
| 65 | + break; |
|
| 66 | + case 'location': |
|
| 67 | 67 | $childchildren = $child->childNodes; |
| 68 | - foreach ($childchildren as $childchild) { |
|
| 69 | - // There is generally only one child here. |
|
| 70 | - $this->location = $childchild->nodeValue; |
|
| 71 | - } |
|
| 72 | - break; |
|
| 73 | - } |
|
| 74 | - break; |
|
| 75 | - case XML_TEXT_NODE: |
|
| 68 | + foreach ($childchildren as $childchild) { |
|
| 69 | + // There is generally only one child here. |
|
| 70 | + $this->location = $childchild->nodeValue; |
|
| 71 | + } |
|
| 72 | + break; |
|
| 73 | + } |
|
| 74 | + break; |
|
| 75 | + case XML_TEXT_NODE: |
|
| 76 | 76 | if (trim($child->textContent) != '') { |
| 77 | - if (count($children == 1)) { |
|
| 78 | - // If this is the only child at this level and it is a content... save differently. |
|
| 79 | - $this->text = $child->textContent; |
|
| 80 | - } else { |
|
| 81 | - $this->text[$element->tagName] = $child->textContent; |
|
| 82 | - } |
|
| 83 | - } |
|
| 84 | - break; |
|
| 85 | - } |
|
| 86 | - } |
|
| 87 | - $attributes = $element->attributes; |
|
| 88 | - //$keep_href = ''; |
|
| 89 | - if (is_array($attributes)) { |
|
| 90 | - foreach ($attributes as $attrib) { |
|
| 91 | - if (trim($attrib->value) != ''){ |
|
| 92 | - $this->attribs[$attrib->name] = $attrib->value; |
|
| 93 | - } |
|
| 94 | - } |
|
| 95 | - } |
|
| 77 | + if (count($children == 1)) { |
|
| 78 | + // If this is the only child at this level and it is a content... save differently. |
|
| 79 | + $this->text = $child->textContent; |
|
| 80 | + } else { |
|
| 81 | + $this->text[$element->tagName] = $child->textContent; |
|
| 82 | + } |
|
| 83 | + } |
|
| 84 | + break; |
|
| 85 | + } |
|
| 86 | + } |
|
| 87 | + $attributes = $element->attributes; |
|
| 88 | + //$keep_href = ''; |
|
| 89 | + if (is_array($attributes)) { |
|
| 90 | + foreach ($attributes as $attrib) { |
|
| 91 | + if (trim($attrib->value) != ''){ |
|
| 92 | + $this->attribs[$attrib->name] = $attrib->value; |
|
| 93 | + } |
|
| 94 | + } |
|
| 95 | + } |
|
| 96 | 96 | return true; |
| 97 | 97 | //break; |
| 98 | 98 | } |
@@ -538,17 +538,17 @@ discard block |
||
| 538 | 538 | if (isset($_REQUEST['activate_start_date_check']) && |
| 539 | 539 | $_REQUEST['activate_start_date_check'] == 1 |
| 540 | 540 | ) { |
| 541 | - $publicated_on = $_REQUEST['publicated_on']; |
|
| 541 | + $publicated_on = $_REQUEST['publicated_on']; |
|
| 542 | 542 | } else { |
| 543 | - $publicated_on = null; |
|
| 543 | + $publicated_on = null; |
|
| 544 | 544 | } |
| 545 | 545 | |
| 546 | 546 | if (isset($_REQUEST['activate_end_date_check']) && |
| 547 | 547 | $_REQUEST['activate_end_date_check'] == 1 |
| 548 | 548 | ) { |
| 549 | - $expired_on = $_REQUEST['expired_on']; |
|
| 549 | + $expired_on = $_REQUEST['expired_on']; |
|
| 550 | 550 | } else { |
| 551 | - $expired_on = null; |
|
| 551 | + $expired_on = null; |
|
| 552 | 552 | } |
| 553 | 553 | |
| 554 | 554 | $new_lp_id = learnpath::add_lp( |
@@ -937,9 +937,9 @@ discard block |
||
| 937 | 937 | $_SESSION['oLP']->setSubscribeUsers($_REQUEST['subscribe_users']); |
| 938 | 938 | |
| 939 | 939 | if (isset($_REQUEST['activate_start_date_check']) && $_REQUEST['activate_start_date_check'] == 1) { |
| 940 | - $publicated_on = $_REQUEST['publicated_on']; |
|
| 940 | + $publicated_on = $_REQUEST['publicated_on']; |
|
| 941 | 941 | } else { |
| 942 | - $publicated_on = null; |
|
| 942 | + $publicated_on = null; |
|
| 943 | 943 | } |
| 944 | 944 | |
| 945 | 945 | if (isset($_REQUEST['activate_end_date_check']) && $_REQUEST['activate_end_date_check'] == 1) { |
@@ -1151,7 +1151,7 @@ discard block |
||
| 1151 | 1151 | } elseif ($mode == 'embedded') { |
| 1152 | 1152 | $_SESSION['oLP']->mode = 'embedded'; |
| 1153 | 1153 | } elseif ($mode == 'embedframe') { |
| 1154 | - $_SESSION['oLP']->mode = 'embedframe'; |
|
| 1154 | + $_SESSION['oLP']->mode = 'embedframe'; |
|
| 1155 | 1155 | } elseif ($mode == 'impress') { |
| 1156 | 1156 | $_SESSION['oLP']->mode = 'impress'; |
| 1157 | 1157 | } |
@@ -1189,11 +1189,11 @@ discard block |
||
| 1189 | 1189 | require 'lp_list.php'; |
| 1190 | 1190 | break; |
| 1191 | 1191 | */ |
| 1192 | - case 'switch_attempt_mode': |
|
| 1193 | - if($debug>0) error_log('New LP - switch_reinit action triggered',0); |
|
| 1194 | - if(!$lp_found){ error_log('New LP - No learnpath given for switch',0); require 'lp_list.php'; } |
|
| 1195 | - $_SESSION['refresh'] = 1; |
|
| 1196 | - $_SESSION['oLP']->switch_attempt_mode(); |
|
| 1192 | + case 'switch_attempt_mode': |
|
| 1193 | + if($debug>0) error_log('New LP - switch_reinit action triggered',0); |
|
| 1194 | + if(!$lp_found){ error_log('New LP - No learnpath given for switch',0); require 'lp_list.php'; } |
|
| 1195 | + $_SESSION['refresh'] = 1; |
|
| 1196 | + $_SESSION['oLP']->switch_attempt_mode(); |
|
| 1197 | 1197 | require 'lp_list.php'; |
| 1198 | 1198 | break; |
| 1199 | 1199 | case 'switch_scorm_debug': |
@@ -286,14 +286,14 @@ discard block |
||
| 286 | 286 | $ext = strtolower($ext[sizeof($ext)-1]); |
| 287 | 287 | $myrow['path'] = rawurlencode($myrow['path']); |
| 288 | 288 | |
| 289 | - $array_ext=array('htm', 'html', 'gif', 'jpg', 'jpeg', 'png'); |
|
| 289 | + $array_ext=array('htm', 'html', 'gif', 'jpg', 'jpeg', 'png'); |
|
| 290 | 290 | |
| 291 | - if (api_browser_support('svg')){ |
|
| 292 | - $array_ext[]='svg'; |
|
| 293 | - } |
|
| 294 | - if (api_browser_support('ogg')){ |
|
| 295 | - $array_ext[]='ogg'; |
|
| 296 | - } |
|
| 291 | + if (api_browser_support('svg')){ |
|
| 292 | + $array_ext[]='svg'; |
|
| 293 | + } |
|
| 294 | + if (api_browser_support('ogg')){ |
|
| 295 | + $array_ext[]='ogg'; |
|
| 296 | + } |
|
| 297 | 297 | |
| 298 | 298 | $in_frames = in_array($ext, $array_ext); |
| 299 | 299 | |
@@ -392,7 +392,7 @@ discard block |
||
| 392 | 392 | $result = Database::query($sql); |
| 393 | 393 | $row = Database::fetch_array($result); |
| 394 | 394 | if ($row['title'] != '') { |
| 395 | - $myrow['content'] = $row['title']; |
|
| 395 | + $myrow['content'] = $row['title']; |
|
| 396 | 396 | } |
| 397 | 397 | $desc = $row['description']; |
| 398 | 398 | $ann_id = $row['item_id']; |
@@ -469,7 +469,7 @@ discard block |
||
| 469 | 469 | if ($icon == 'nolink') { return(shorten($myrow['title'], $length)); } |
| 470 | 470 | if ($icon == 'icon') { |
| 471 | 471 | if ($linktype == 'Link _self') { echo "<img src='../img/links.gif' align=\"absmiddle\" alt='links'>"; } |
| 472 | - else { echo "<img src='../img/link_blank.gif' align=\"absmiddle\" alt='blank links'>"; } |
|
| 472 | + else { echo "<img src='../img/link_blank.gif' align=\"absmiddle\" alt='blank links'>"; } |
|
| 473 | 473 | } |
| 474 | 474 | $thelink = $myrow['url']; |
| 475 | 475 | if ($builder != 'builder') { |
@@ -494,7 +494,7 @@ discard block |
||
| 494 | 494 | $myrow = Database::fetch_array($result); |
| 495 | 495 | |
| 496 | 496 | if ($builder == 'builder') { $origin = 'builder'; } |
| 497 | - // This is needed for the exercise_submit.php can delete the session info about tests. |
|
| 497 | + // This is needed for the exercise_submit.php can delete the session info about tests. |
|
| 498 | 498 | |
| 499 | 499 | $sql = "select * from $tbl_lp_item where id=$id_in_path"; |
| 500 | 500 | $result = Database::query($sql); |
@@ -546,7 +546,7 @@ discard block |
||
| 546 | 546 | $name = GetQuizName($path, $documentPath); |
| 547 | 547 | |
| 548 | 548 | if ($builder == 'builder') { $origin='builder'; } |
| 549 | - // This is needed for the exercise_submit.php can delete the session info about tests. |
|
| 549 | + // This is needed for the exercise_submit.php can delete the session info about tests. |
|
| 550 | 550 | |
| 551 | 551 | $sql = "select * from $tbl_lp_item where id=$id_in_path"; |
| 552 | 552 | $result = Database::query($sql); $row = Database::fetch_array($result); |
@@ -1106,7 +1106,7 @@ discard block |
||
| 1106 | 1106 | $myrow = Database::fetch_array($result); |
| 1107 | 1107 | |
| 1108 | 1108 | if ($builder == 'builder') { $origin = 'builder'; } |
| 1109 | - // This is needed for the exercise_submit.php can delete the session info about tests. |
|
| 1109 | + // This is needed for the exercise_submit.php can delete the session info about tests. |
|
| 1110 | 1110 | |
| 1111 | 1111 | $sql = "select * from $tbl_lp_item where c_id = $course_id AND id=$id_in_path"; |
| 1112 | 1112 | $result = Database::query($sql); $row = Database::fetch_array($result); |
@@ -1330,10 +1330,10 @@ discard block |
||
| 1330 | 1330 | */ |
| 1331 | 1331 | function delete_all_resources_type($type) |
| 1332 | 1332 | { |
| 1333 | - $course_id = api_get_course_int_id(); |
|
| 1334 | - $TABLERESOURCE = Database::get_course_table(TABLE_LINKED_RESOURCES); |
|
| 1335 | - $sql = "DELETE FROM $TABLERESOURCE WHERE c_id = $course_id AND source_type='$type'"; |
|
| 1336 | - Database::query($sql); |
|
| 1333 | + $course_id = api_get_course_int_id(); |
|
| 1334 | + $TABLERESOURCE = Database::get_course_table(TABLE_LINKED_RESOURCES); |
|
| 1335 | + $sql = "DELETE FROM $TABLERESOURCE WHERE c_id = $course_id AND source_type='$type'"; |
|
| 1336 | + Database::query($sql); |
|
| 1337 | 1337 | } |
| 1338 | 1338 | |
| 1339 | 1339 | /** |
@@ -58,11 +58,11 @@ |
||
| 58 | 58 | if (!empty($path_to_lzx)) { |
| 59 | 59 | $recorder_content = sprintf("<object type=\"application/x-shockwave-flash\" data=\"%s\" ". |
| 60 | 60 | "width='$width' height='$height'>". |
| 61 | - "<param name=\"movie\" value=\"%s\">". |
|
| 62 | - "<param name=\"quality\" value=\"high\">". |
|
| 63 | - "<param name=\"scale\" value=\"noscale\">". |
|
| 64 | - "<param name=\"salign\" value=\"LT\">". |
|
| 65 | - "<param name=\"menu\" value=\"false\"></object>", $path_to_lzx, $path_to_lzx); |
|
| 61 | + "<param name=\"movie\" value=\"%s\">". |
|
| 62 | + "<param name=\"quality\" value=\"high\">". |
|
| 63 | + "<param name=\"scale\" value=\"noscale\">". |
|
| 64 | + "<param name=\"salign\" value=\"LT\">". |
|
| 65 | + "<param name=\"menu\" value=\"false\"></object>", $path_to_lzx, $path_to_lzx); |
|
| 66 | 66 | if ($audio_recorder_studentview == 'false') { |
| 67 | 67 | echo '<script type="text/javascript"> |
| 68 | 68 | function show_audiorecorder() { |
@@ -35,7 +35,7 @@ |
||
| 35 | 35 | |
| 36 | 36 | // Using the resource linker as a tool for adding resources to the learning path. |
| 37 | 37 | if ($action=="add" and $type=="learnpathitem") { |
| 38 | - $htmlHeadXtra[] = "<script language='JavaScript' type='text/javascript'> window.location=\"../resourcelinker/resourcelinker.php?source_id=5&action=$action&learnpath_id=$learnpath_id&chapter_id=$chapter_id&originalresource=no\"; </script>"; |
|
| 38 | + $htmlHeadXtra[] = "<script language='JavaScript' type='text/javascript'> window.location=\"../resourcelinker/resourcelinker.php?source_id=5&action=$action&learnpath_id=$learnpath_id&chapter_id=$chapter_id&originalresource=no\"; </script>"; |
|
| 39 | 39 | } |
| 40 | 40 | if ((!$is_allowed_to_edit) || ($isStudentView)) { |
| 41 | 41 | error_log('New LP - User not authorized in lp_build.php'); |