24 require_once(
"./Modules/Scorm2004/classes/class.ilSCORM2004NodeGUI.php");
25 require_once(
"./Modules/Scorm2004/classes/class.ilSCORM2004Sco.php");
26 require_once(
"./Modules/Scorm2004/classes/seq_editor/class.ilSCORM2004Objective.php");
54 $ilCtrl->saveParameter($this,
"obj_id");
75 $tpl->getStandardTemplate();
77 $next_class = $ilCtrl->getNextClass($this);
78 $cmd = $ilCtrl->getCmd();
84 switch(
$_GET[
"notes_mode"])
87 $ilTabs->setTabActive(
"sahs_organization");
95 include_once
'Services/MetaData/classes/class.ilMDEditorGUI.php';
98 $this->node_object->getId(), $this->node_object->getType());
99 $md_gui->
addObserver($this->node_object,
'MDUpdateListener',
'General');
100 $ilCtrl->forwardCommand($md_gui);
103 case 'ilscorm2004pagegui':
104 include_once(
"./Modules/Scorm2004/classes/class.ilSCORM2004PageGUI.php");
108 $ilCtrl->forwardCommand($page_obj);
127 $ilTabs->setTabActive(
"sahs_learning_objectives");
128 include_once
"./Services/Table/classes/class.ilTableGUI.php";
131 $tpl->addBlockfile(
"ADM_CONTENT",
"adm_content",
"tpl.table.html");
134 $tpl->addBlockfile(
"TBL_CONTENT",
"tbl_content",
"tpl.scormeditor_sco_properties.html",
"Modules/Scorm2004");
137 $tbl->enable(
"action");
138 $tbl->disable(
"sort");
139 $tbl->setTitle(
"Learning Objectives for ".$this->node_object->getTitle());
140 $tbl->setHeaderNames(array(
"", $lng->txt(
"title"),
"Scope"));
141 $cols = array(
"",
"title",
"scope");
142 $tbl->setHeaderVars($cols, $header_params);
144 $tr_data = $this->node_object->getObjectives();
146 $tpl->setVariable(
"COLUMN_COUNTS", 3);
148 $tpl->setVariable(
"FORMACTION", $this->ctrl->getFormAction($this));
150 $tpl->setCurrentBlock(
"tbl_action_btn");
151 $tpl->setVariable(
"BTN_NAME",
"updateProperties");
152 $tpl->setVariable(
"BTN_VALUE", $lng->txt(
"save"));
153 $tpl->parseCurrentBlock();
156 foreach ($tr_data as
$data)
158 $tpl->setCurrentBlock(
"tbl_content");
159 $tpl->setVariable(
"TITLE", $data->getObjectiveID());
160 $tpl->setVariable(
"NODE_ID",
"obj_".$data->getId());
163 $mappings = $data->getMappings();
165 foreach($mappings as $map) {
166 $mapinfo .= $map->getTargetObjectiveID();
168 if ($mapinfo == null) {
171 $mapinfo =
"global to ".$mapinfo;
173 $tpl->setVariable(
"REFERENCE", $mapinfo);
175 $tpl->setVariable(
"CSS_ROW", $css_row);
176 $tpl->parseCurrentBlock();
192 foreach (
$_POST as $key=>$value) {
193 if(preg_match(
'/(obj_)(.+)/', $key,$match)){
194 $objective =
new ilScorm2004Objective($this->node_object->getId(),$match[2]);
200 $objective->updateObjective();
219 include_once
"./Services/Table/classes/class.ilTableGUI.php";
220 include_once
"./Modules/Scorm2004/classes/class.ilSCORM2004Page.php";
221 include_once(
"./Modules/TestQuestionPool/classes/class.assQuestion.php");
222 include_once(
"./Services/COPage/classes/class.ilPCQuestionGUI.php");
225 $tpl->addBlockfile(
"ADM_CONTENT",
"adm_content",
"tpl.table.html");
226 $tpl->addBlockfile(
"TBL_CONTENT",
"tbl_content",
"tpl.scormeditor_sco_question.html",
"Modules/Scorm2004");
229 $tbl->setTitle(
"Questions for ".$this->node_object->getTitle());
230 $tbl->setHeaderNames(array(
"Question",
"Page"));
231 $cols = array(
"question",
"page");
232 $tbl->setHeaderVars($cols, $header_params);
233 $tbl->setColumnWidth(array(
"50%",
"50%"));
234 $tbl->disable(
"sort");
235 $tbl->disable(
"footer");
237 $tree =
new ilTree($this->slm_object->getId());
238 $tree->
setTableNames(
'sahs_sc13_tree',
'sahs_sc13_tree_node');
239 $tree->setTreeTablePK(
"slm_id");
241 foreach($tree->getSubTree($tree->getNodeData($this->node_object->getId()),
true,
'page') as $page)
245 if (count($qids) > 0)
248 foreach ($qids as $qid)
250 $tpl->setCurrentBlock(
"tbl_content");
251 $tpl->setVariable(
"TXT_PAGE_TITLE", $page[
"title"]);
252 $ilCtrl->setParameterByClass(
"ilscorm2004pagenodegui",
"obj_id", $page[
"obj_id"]);
253 $tpl->setVariable(
"HREF_EDIT_PAGE", $ilCtrl->getLinkTargetByClass(
"ilscorm2004pagenodegui",
"edit"));
256 $tpl->setVariable(
"TXT_QUESTION", $qtitle);
257 $ilCtrl->setParameterByClass(
"ilscorm2004pagenodegui",
"obj_id", $page[
"obj_id"]);
261 $tpl->parseCurrentBlock();
270 $slm_tree =
new ilTree($this->node_object->getId(),$this->slm_object->getId());
272 $slm_tree->setTableNames(
'sahs_sc13_tree',
'sahs_sc13_tree_node');
284 $ilTabs->addTarget(
"sahs_organization",
285 $ilCtrl->getLinkTarget($this,
'showOrganization'),
286 "showOrganization", get_class($this));
290 $ilTabs->addTarget(
"sahs_learning_objectives",
291 $ilCtrl->getLinkTarget($this,
'showProperties'),
292 "showProperties", get_class($this));
295 $ilTabs->addTarget(
"sahs_questions",
296 $ilCtrl->getLinkTarget($this,
'sahs_questions'),
297 "sahs_questions", get_class($this));
300 $ilTabs->addTarget(
"cont_files",
301 $ilCtrl->getLinkTarget($this,
'sco_resources'),
302 "sco_resources", get_class($this));
305 $ilTabs->addTarget(
"meta_data",
306 $ilCtrl->getLinkTargetByClass(
"ilmdeditorgui",
''),
307 "",
"ilmdeditorgui");
310 $ilTabs->addTarget(
"export",
311 $ilCtrl->getLinkTarget($this,
"showExportList"),
"showExportList",
315 $ilTabs->addTarget(
"import",
316 $ilCtrl->getLinkTarget($this,
"import"),
"import",
320 $ilTabs->addNonTabbedLink(
"preview",
321 $lng->txt(
"cont_preview"),
322 $ilCtrl->getLinkTarget($this,
'sco_preview'),
"_blank");
326 $lng->txt(
"sahs_unit").
": ".$this->node_object->getTitle());
337 $this->slm_object->executeDragDrop(
$_POST[
"il_hform_source_id"],
$_POST[
"il_hform_target_id"],
339 $ilCtrl->redirect($this,
"showOrganization");
346 $tpl =
new ilTemplate(
"tpl.main.html",
true,
true);
348 include_once(
"./Services/Style/classes/class.ilObjStyleSheet.php");
350 $tpl->setBodyClass(
"");
351 $tpl->setCurrentBlock(
"ContentStyle");
352 $tpl->setVariable(
"LOCATION_CONTENT_STYLESHEET",
354 $tpl->parseCurrentBlock();
356 $tpl->addJavaScript(
"./Modules/Scorm2004/scripts/questions/jquery.js");
357 $tpl->addJavaScript(
"./Modules/Scorm2004/scripts/questions/jquery-ui-min.js");
358 $tpl->addJavaScript(
"./Modules/Scorm2004/scripts/questions/pure.js");
360 $tpl->addJavaScript(
"./Modules/Scorm2004/scripts/pager.js");
365 $tree =
new ilTree($this->slm_object->getId());
366 $tree->
setTableNames(
'sahs_sc13_tree',
'sahs_sc13_tree_node');
367 $tree->setTreeTablePK(
"slm_id");
368 include_once
"./Modules/Scorm2004/classes/class.ilSCORM2004PageGUI.php";
369 include_once
"./Services/MetaData/classes/class.ilMD.php";
371 $meta =
new ilMD($this->node_object->getSLMId(), $this->node_object->getId(), $this->node_object->getType());
372 $desc_ids = $meta->
getGeneral()->getDescriptionIds();
373 $sco_description = $meta->getGeneral()->getDescription($desc_ids[0])->getDescription();
386 $output =
'<!-- BEGIN ilLMNavigation -->
387 <div class="ilc_page_tnav_TopNavigation">
388 <!-- BEGIN ilLMNavigation_Prev -->
389 <div class="ilc_page_lnav_LeftNavigation">
390 <a class="ilc_page_lnavlink_LeftNavigationLink">
391 <img class="ilc_page_lnavimage_LeftNavigationImage" border="0" src="/templates/default/images/spacer.gif" alt="" title="" /> '.$lng->txt(
'scplayer_previous').
'</a>
393 <!-- END ilLMNavigation_Prev -->
394 <!-- BEGIN ilLMNavigation_Next -->
395 <div class="ilc_page_rnav_RightNavigation">
396 <a class="ilc_page_rnavlink_RightNavigationLink">'.$lng->txt(
'scplayer_next').
' <img class="ilc_page_rnavimage_RightNavigationImage" border="0" src="/templates/default/images/spacer.gif" alt="" title="" /></a>
398 <!-- END ilLMNavigation_Next -->
399 <div style="clear:both;"></div>
401 <!-- END ilLMNavigation -->';
403 $output .=
'<table class="ilc_page_cont_PageContainer" width="100%" cellspacing="0" cellpadding="0" style="display: table;"><tbody><tr><td><div class="ilc_page_Page"><div class="ilc_sco_title_Title">'.$this->node_object->getTitle().
'</div>';
406 if (trim($sco_description) !=
"")
408 $output .=
'<div class="ilc_sco_desct_DescriptionTop">'.$lng->txt(
"description").
'</div>';
409 $output .=
'<div class="ilc_sco_desc_Description">'.$sco_description.
'</div>';
413 $objs = $this->node_object->getObjectives();
414 if (count($objs) > 0)
416 $output .=
'<div class="ilc_sco_objt_ObjectiveTop">'.$lng->txt(
"sahs_objectives").
'</div>';
417 foreach ($objs as $objective)
419 $output .=
'<div class="ilc_sco_obj_Objective">'.nl2br($objective->getObjectiveID()).
'</div>';
423 $output .=
'</td></tr></table>';
427 $terms = $this->node_object->getGlossaryTermIds();
428 foreach($tree->getSubTree($tree->getNodeData($this->node_object->getId()),
true,
'page') as $page)
433 $page_obj->setStyleId($this->slm_object->getStyleSheetId());
434 if (count($terms) > 1)
436 $page_obj->setGlossaryOverviewInfo(
439 $output .= $page_obj->showPage(
"export");
441 $output .=
'<!-- BEGIN ilLMNavigation2 -->
442 <div class="ilc_page_bnav_BottomNavigation">
443 <!-- BEGIN ilLMNavigation_Prev -->
444 <div class="ilc_page_lnav_LeftNavigation">
445 <a class="ilc_page_lnavlink_LeftNavigationLink">
446 <img class="ilc_page_lnavimage_LeftNavigationImage" border="0" src="/templates/default/images/spacer.gif" alt="" title="" /> '.$lng->txt(
'scplayer_previous').
'</a>
448 <!-- END ilLMNavigation_Prev -->
449 <!-- BEGIN ilLMNavigation_Next -->
450 <div class="ilc_page_rnav_RightNavigation">
451 <a class="ilc_page_rnavlink_RightNavigationLink">'.$lng->txt(
'scplayer_next').
' <img class="ilc_page_rnavimage_RightNavigationImage" border="0" src="/templates/default/images/spacer.gif" alt="" title="" /></a>
453 <!-- END ilLMNavigation_Next -->
454 <div style="clear:both;"></div>
456 <!-- END ilLMNavigation2 -->';
462 require_once
'./Modules/Scorm2004/classes/class.ilQuestionExporter.php';
463 $output = preg_replace_callback(
"/(Question;)(il__qst_[0-9]+)/",array(get_class($this),
'insertQuestion'),$output);
464 $output = preg_replace(
"/{/",
"",$output);
465 $output = preg_replace(
"/}/",
"",$output);
466 $output =
"<script>var ScormApi=null;".ilQuestionExporter::questionsJS().
"</script>".$output;
468 $tpl->addOnloadCode(
'
469 ilias.questions.txt.wrong_answers = "'.$lng->txt(
"cont_wrong_answers").
'";
470 ilias.questions.txt.tries_remaining = "'.$lng->txt(
"cont_tries_remaining").
'";
471 ilias.questions.txt.please_try_again = "'.$lng->txt(
"cont_please_try_again").
'";
472 ilias.questions.txt.all_answers_correct = "'.$lng->txt(
"cont_all_answers_correct").
'";
473 ilias.questions.txt.nr_of_tries_exceeded = "'.$lng->txt(
"cont_nr_of_tries_exceeded").
'";
474 ilias.questions.txt.correct_answers_shown = "'.$lng->txt(
"cont_correct_answers_shown").
'";
478 $tpl->addJavaScript(
"./Modules/Scorm2004/scripts/questions/question_handling.js");
480 $output .=
'<script type="text/javascript" src="./Modules/Scorm2004/scripts/questions/question_handling.js"></script>';
482 $tpl->setVariable(
"CONTENT", $output);
488 return $q_exporter->exportQuestion($matches[2]);
497 switch (
$_POST[
'select_export'])
499 case "exportScorm12":
500 case "exportScorm2004_3rd":
501 case "exportScorm2004_4th":
504 $this->ctrl->redirect($this,
$_POST[
'select_export']);
507 $this->ctrl->redirect($this,
'showExportList');
520 $template =
new ilTemplate(
"tpl.scorm2004_export_buttons.html",
true,
true,
'Modules/Scorm2004');
523 "exportScorm2004_3rd" => $lng->txt(
"scorm_create_export_file_scrom2004"),
524 "exportScorm2004_4th" => $lng->txt(
"scorm_create_export_file_scrom2004_4th"),
525 "exportScorm12" => $lng->txt(
"scorm_create_export_file_scrom12"),
526 "exportPDF" => $lng->txt(
"scorm_create_export_file_pdf"),
527 "exportHTML" => $lng->txt(
"scorm_create_export_file_html")
529 foreach ($buttons as $value => $text)
531 $template->setCurrentBlock(
'option');
532 $template->setVariable(
'OPTION_VALUE', $value);
534 $template->parseCurrentBlock();
536 $template->setVariable(
'EXPORT_TITLE', $lng->txt(
'export'));
537 $template->setVariable(
'EXPORT_LABEL', $lng->txt(
'type'));
538 $template->setVariable(
'FORMACTION', $ilCtrl->getFormAction($this,
'selectExport'));
540 $export_files = $this->node_object->getExportFiles();
542 include_once
"./Modules/Scorm2004/classes/class.ilSCORM2004ExportTableGUI.php";
545 foreach ($export_files as $exp_file)
547 $filetype = $exp_file[
'type'];
551 $file_arr = explode(
"__", $exp_file[
"file"]);
554 $table_gui->setData(
$data);
555 $tpl->setVariable(
'ADM_CONTENT', $template->get() .
"\n" . $table_gui->getHTML());
563 $export->buildExportFile();
564 $this->ctrl->redirect($this,
"showExportList");
571 $export->buildExportFile();
572 $this->ctrl->redirect($this,
"showExportList");
578 $export->buildExportFile();
579 $this->ctrl->redirect($this,
"showExportList");
585 $export->buildExportFile();
586 $this->ctrl->redirect($this,
"showExportList");
592 $export->buildExportFile();
593 $this->ctrl->redirect($this,
"showExportList");
599 $export->buildExportFile();
600 $this->ctrl->redirect($this,
"showExportList");
605 if(!isset(
$_POST[
"file"]))
607 $this->ilias->raiseError($this->lng->txt(
"no_checkbox"),$this->ilias->error_obj->MESSAGE);
610 if (count(
$_POST[
"file"]) > 1)
612 $this->ilias->raiseError($this->lng->txt(
"cont_select_max_one_item"),$this->ilias->error_obj->MESSAGE);
614 $export =
new ilSCORM2004Export($this->node_object);
615 $export_dir = $export->getExportDirectoryForType(
$_POST[
'type'][
$_POST[
'file'][0]]);
626 if(!isset(
$_POST[
"file"]))
629 $this->ctrl->redirect($this,
"showExportList");
633 $export_files = $this->node_object->getExportFiles();
635 include_once
"./Modules/Scorm2004/classes/class.ilSCORM2004ExportTableGUI.php";
638 foreach ($export_files as $exp_file)
640 foreach (
$_POST[
'file'] as $delete_file)
642 if (strcmp($delete_file, $exp_file[
'file']) == 0)
647 $file_arr = explode(
"__", $exp_file[
"file"]);
652 $table_gui->setData(
$data);
653 $tpl->setVariable(
'ADM_CONTENT', $table_gui->getHTML());
661 session_unregister(
"ilExportFiles");
662 $this->ctrl->redirect($this,
"showExportList");
672 include_once
"./Services/Utilities/classes/class.ilUtil.php";
673 $export =
new ilSCORM2004Export($this->node_object);
676 $export_dir = $export->getExportDirectoryForType(
$_POST[
'type'][$idx]);
677 $exp_file = $export_dir.
"/".
$file;
678 if (@is_file($exp_file))
684 $this->ctrl->redirect($this,
"showExportList");
689 $export_files = array();
691 require_once
"./Modules/Scorm2004/classes/class.ilSCORM2004Page.php";
692 include_once
"./Services/MediaObjects/classes/class.ilObjMediaObject.php";
693 include_once
"./Modules/File/classes/class.ilObjFile.php";
694 $tree =
new ilTree($this->slm_object->getId());
695 $tree->
setTableNames(
'sahs_sc13_tree',
'sahs_sc13_tree_node');
696 $tree->setTreeTablePK(
"slm_id");
697 foreach($tree->getSubTree($tree->getNodeData($this->node_object->getId()),
true,
'page') as $page)
700 $page_obj->buildDom();
701 $mob_ids = $page_obj->collectMediaObjects(
false);
702 foreach($mob_ids as $mob_id)
707 $export_files[$i][
"date"] = $media_obj->getCreateDate();
709 $export_files[$i][
"file"] = $media_obj->getTitle();
710 $export_files[$i][
"type"] = $media_obj->getDescription();
712 $this->ctrl->setParameter($this,
"resource",
714 $export_files[$i][
"link"] = $this->ctrl->getLinkTarget($this,
"downloadResource");
718 $file_ids = $page_obj->collectFileItems();
719 foreach($file_ids as $file_id)
721 $file_obj =
new ilObjFile($file_id,
false);
722 $export_files[$i][
"date"] = $file_obj->getCreateDate();
723 $export_files[$i][
"size"] = $file_obj->getFileSize();
724 $export_files[$i][
"file"] = $file_obj->getFileName();
725 $export_files[$i][
"type"] = $file_obj->getFileType();
726 $export_files[$i][
"file_id"] = $file_id;
727 $this->ctrl->setParameter($this,
"file_id",$file_id);
728 $export_files[$i][
"link"] = $this->ctrl->getLinkTarget($this,
"downloadFile",
"");
734 return $export_files;
748 require_once(
"./Services/Table/classes/class.ilTableGUI.php");
752 $tpl->addBlockfile(
"ADM_CONTENT",
"adm_content",
"tpl.table.html");
755 $tpl->addBlockfile(
"TBL_CONTENT",
"tbl_content",
"tpl.download_file_row.html",
"Modules/LearningModule");
759 $tpl->setVariable(
"FORMACTION", $this->ctrl->getFormAction($this));
761 $tbl->setTitle($lng->txt(
"cont_files"));
763 $tbl->setHeaderNames(array($lng->txt(
"cont_format"),
764 $lng->txt(
"cont_file"),
765 $lng->txt(
"size"), $lng->txt(
"date"),
768 $cols = array(
"format",
"file",
"size",
"date",
"download");
769 $header_params = array(
"ref_id" =>
$_GET[
"ref_id"],
"obj_id" =>
$_GET[
"obj_id"],
770 "cmd" =>
"sco_resources",
"cmdClass" => strtolower(get_class($this)),
771 "cmdNode" =>
$_GET[
"cmdNode"],
"baseClass" =>
$_GET[
"baseClass"]);
772 $tbl->setHeaderVars($cols, $header_params);
773 $tbl->setColumnWidth(array(
"10%",
"30%",
"20%",
"20%",
"20%"));
774 $tbl->disable(
"sort");
776 $tbl->setOrderColumn(
$_GET[
"sort_by"]);
777 $tbl->setOrderDirection(
$_GET[
"sort_order"]);
778 $tbl->setLimit(
$_GET[
"limit"]);
779 $tbl->setOffset(
$_GET[
"offset"]);
780 $tbl->setMaxCount($this->maxcount);
783 $tbl->setMaxCount(count($export_files));
786 $tbl->setFooter(
"tblfooter",$lng->txt(
"previous"),$lng->txt(
"next"));
789 $tbl->setMaxCount(count($export_files));
790 $export_files = array_slice($export_files,
$_GET[
"offset"],
$_GET[
"limit"]);
793 if(count($export_files) > 0)
796 foreach($export_files as $exp_file)
798 if (!$exp_file[
"size"] > 0)
803 $tpl->setCurrentBlock(
"tbl_content");
804 $tpl->setVariable(
"TXT_FILENAME", $exp_file[
"file"]);
807 $tpl->setVariable(
"CSS_ROW", $css_row);
809 $tpl->setVariable(
"TXT_SIZE", $exp_file[
"size"]);
810 $tpl->setVariable(
"TXT_FORMAT", $exp_file[
"type"]);
812 $tpl->setVariable(
"TXT_DATE", $exp_file[
"date"]);
814 $tpl->setVariable(
"TXT_DOWNLOAD", $lng->txt(
"download"));
817 $ilCtrl->setParameter($this,
"resource", rawurlencode($exp_file[
"path"]));
818 $ilCtrl->setParameter($this,
"file_id", rawurlencode($exp_file[
"file_id"]));
819 $tpl->setVariable(
"LINK_DOWNLOAD",
820 $ilCtrl->getLinkTarget($this,
"downloadResource"));
822 $tpl->parseCurrentBlock();
827 $tpl->setCurrentBlock(
"notfound");
828 $tpl->setVariable(
"TXT_OBJECT_NOT_FOUND", $lng->txt(
"obj_not_found"));
829 $tpl->setVariable(
"NUM_COLS", 4);
830 $tpl->parseCurrentBlock();
832 $tpl->parseCurrentBlock();
839 if (
$_GET[
"file_id"] > 0)
845 foreach ($export_files as
$f)
847 if (is_object(
$file))
849 if ($f[
"file"] ==
$file->getFileName())
856 if ($f[
"path"] ==
$_GET[
"resource"])
858 if (is_file($f[
"path"]))
871 require_once(
"./Modules/File/classes/class.ilObjFile.php");
873 $fileObj->sendFile();
884 $tpl->addBlockFile(
"ADM_CONTENT",
"adm_content",
"tpl.scormeditor_sco_import.html",
"Modules/Scorm2004");
887 $tpl->setVariable(
"ALT_IMG", $lng->txt(
"obj_sahs"));
889 $tpl->setVariable(
"FORMACTION", $this->ctrl->getFormAction($this));
891 $tpl->setVariable(
"BTN_NAME",
"importSave");
896 $tpl->setVariable(
"TXT_UPLOAD", $lng->txt(
"upload"));
897 $tpl->setVariable(
"TXT_CANCEL", $lng->txt(
"cancel"));
898 $tpl->setVariable(
"TXT_IMPORT_SCO", $lng->txt(
"import_sco_object"));
899 $tpl->setVariable(
"TXT_SELECT_FILE", $lng->txt(
"select_file"));
900 $tpl->setVariable(
"TXT_VALIDATE_FILE", $lng->txt(
"cont_validate_file"));
903 $umf=get_cfg_var(
"upload_max_filesize");
905 $pms=get_cfg_var(
"post_max_size");
908 $multiplier_a=array(
"K"=>1024,
"M"=>1024*1024,
"G"=>1024*1024*1024);
910 $umf_parts=preg_split(
"/(\d+)([K|G|M])/", $umf, -1, PREG_SPLIT_DELIM_CAPTURE|PREG_SPLIT_NO_EMPTY);
911 $pms_parts=preg_split(
"/(\d+)([K|G|M])/", $pms, -1, PREG_SPLIT_DELIM_CAPTURE|PREG_SPLIT_NO_EMPTY);
913 if (count($umf_parts) == 2) { $umf = $umf_parts[0]*$multiplier_a[$umf_parts[1]]; }
914 if (count($pms_parts) == 2) { $pms = $pms_parts[0]*$multiplier_a[$pms_parts[1]]; }
917 $max_filesize=min($umf, $pms);
919 if (!$max_filesize) $max_filesize=max($umf, $pms);
922 $max_filesize=sprintf(
"%.1f MB",$max_filesize/1024/1024);
925 $tpl->setVariable(
"TXT_FILE_INFO", $lng->txt(
"file_notice").
" $max_filesize");
930 global $_FILES, $rbacsystem;
934 $source = $_FILES[
"scormfile"][
"tmp_name"];
935 if (($source ==
'none') || (!$source))
937 $ilias->raiseError(
"No file selected!",$ilias->error_obj->MESSAGE);
940 if (!$rbacsystem->checkAccess(
"create",
$_GET[
"ref_id"],
"sahs"))
942 $ilias->raiseError($lng->txt(
"no_create_permission"), $ilias->error_obj->WARNING);
945 switch ($__FILES[
"scormfile"][
"error"])
947 case UPLOAD_ERR_INI_SIZE:
948 $ilias->raiseError($lng->txt(
"err_max_file_size_exceeds"),$ilias->error_obj->MESSAGE);
951 case UPLOAD_ERR_FORM_SIZE:
952 $ilias->raiseError($lng->txt(
"err_max_file_size_exceeds"),$ilias->error_obj->MESSAGE);
955 case UPLOAD_ERR_PARTIAL:
956 $ilias->raiseError($lng->txt(
"err_partial_file_upload"),$ilias->error_obj->MESSAGE);
959 case UPLOAD_ERR_NO_FILE:
960 $ilias->raiseError($lng->txt(
"err_no_file_uploaded"),$ilias->error_obj->MESSAGE);
964 $file = pathinfo($_FILES[
"scormfile"][
"name"]);
965 $name = substr(
$file[
"basename"], 0, strlen(
$file[
"basename"]) - strlen(
$file[
"extension"]) - 1);
966 $file_path = $this->slm_object->getDataDirectory().
"/".$this->node_object->getId().
"/".$_FILES[
"scormfile"][
"name"];
972 include_once (
"./Modules/Scorm2004/classes/ilSCORM13Package.php");
974 $newPack->il_importSco($this->slm_object->getId(),$this->node_object->getId(),$this->slm_object->getDataDirectory().
"/".$this->node_object->getId());
976 $this->ctrl->redirect($this,
"showOrganization");
984 $this->ctrl->redirect($this,
"showOrganization");
1008 $tpl =
new ilTemplate(
"tpl.sco_glossary_overview.html",
true,
true,
"Modules/Scorm2004");
1010 $terms = $a_sco->getGlossaryTermIds();
1011 foreach ($terms as $k =>
$t)
1013 $tpl->setCurrentBlock(
"link");
1014 $tpl->setVariable(
"TXT_LINK",
$t);
1015 $tpl->setVariable(
"ID_LINK",
"glo_ov_t".$k);
1016 $tpl->parseCurrentBlock();
1020 $tpl->setVariable(
"TXT_SCO_GLOSSARY", $lng->txt(
"cont_sco_glossary"));
1021 $tpl->setVariable(
"TXT_CLOSE", $lng->txt(
"close"));
1023 if (count($terms) > 1)