foreach ($currentUser->getModules() as $module) { if ($moduleTabPage = $module->getTabPageSmartyTpl('course_settings')) { $moduleTabPages[] = $moduleTabPage; $options[$moduleTabPage['tab_page']] = array('image' => $moduleTabPage['image'], 'title' => $moduleTabPage['title'], 'link' => basename($_SERVER['PHP_SELF']) . '?' . $baseUrl . '&op=' . $moduleTabPage['tab_page'], 'selected' => $_GET['op'] != $moduleTabPage['tab_page'] ? false : true, 'absoluteImagePath' => 1); } if ($_GET['op'] == $moduleTabPage['tab_page']) { $smarty->assign("T_MODULE_TABPAGE", $moduleTabPage); } } $smarty->assign("T_MODULE_COURSE_SETTINGS_TABPAGES", $moduleTabPages); $smarty->assign("T_TABLE_OPTIONS", $options); $smarty->assign("T_COURSE_OPTIONS", array(array('text' => _EDITCOURSE, 'image' => "16x16/edit.png", 'href' => basename($_SERVER['PHP_SELF']) . "?ctg=courses&edit_course=" . $_GET['course']))); if ($_GET['op'] == 'course_info') { $form = new HTML_QuickForm("empty_form", "post", null, null, null, true); $courseInformation = unserialize($currentCourse->course['info']); $information = new LearningObjectInformation($courseInformation); if (!isset($currentUser->coreAccess['course_settings']) || $currentUser->coreAccess['course_settings'] == 'change') { $smarty->assign("T_COURSE_INFO_HTML", $information->toHTML($form, false)); } else { $smarty->assign("T_COURSE_INFO_HTML", $information->toHTML($form, false, false)); } $courseMetadata = unserialize($currentCourse->course['metadata']); $metadata = new DublinCoreMetadata($courseMetadata); if (!isset($currentUser->coreAccess['course_settings']) || $currentUser->coreAccess['course_settings'] == 'change') { $smarty->assign("T_COURSE_METADATA_HTML", $metadata->toHTML($form)); } else { $smarty->assign("T_COURSE_METADATA_HTML", $metadata->toHTML($form, true, false)); } if (isset($_POST['postAjaxRequest'])) { if (in_array($_POST['dc'], array_keys($information->metadataAttributes))) { if ($_POST['value']) {
eF_redirect("" . basename($_SERVER['PHP_SELF']) . "?ctg=control_panel&message=" . urlencode(_UNAUTHORIZEDACCESS) . "&message_type=failure"); } if (!isset($GLOBALS['currentLesson'])) { if (isset($_GET['lesson_info'])) { $currentLesson = new EfrontLesson($_GET['lesson_info']); $currentContent = new EfrontContentTree($currentLesson); $smarty->assign("T_CURRENT_LESSON", $currentLesson); } else { eF_redirect("" . basename($_SERVER['PHP_SELF']) . "?ctg=control_panel&message=" . rawurlencode(_INVALIDID) . "&message_type=failure"); } } if ($_GET['edit_info'] && $_change_ && !$_student_) { $form = new HTML_QuickForm("empty_form", "post", null, null, null, true); try { $lessonInformation = unserialize($currentLesson->lesson['info']); $information = new LearningObjectInformation($lessonInformation); if (!isset($currentUser->coreAccess['content']) || $currentUser->coreAccess['content'] == 'change') { $smarty->assign("T_LESSON_INFO_HTML", $information->toHTML($form, false)); } else { $smarty->assign("T_LESSON_INFO_HTML", $information->toHTML($form, false, false)); } $lessonMetadata = unserialize($currentLesson->lesson['metadata']); $metadata = new DublinCoreMetadata($lessonMetadata); if (!isset($currentUser->coreAccess['content']) || $currentUser->coreAccess['content'] == 'change') { $smarty->assign("T_LESSON_METADATA_HTML", $metadata->toHTML($form)); } else { $smarty->assign("T_LESSON_METADATA_HTML", $metadata->toHTML($form, true, false)); } } catch (Exception $e) { $smarty->assign("T_EXCEPTION_TRACE", $e->getTraceAsString()); $message = _SOMEPROBLEMEMERGED . ': ' . $e->getMessage() . ' (' . $e->getCode() . ') <a href = "javascript:void(0)" onclick = "eF_js_showDivPopup(event, \'' . _ERRORDETAILS . '\', 2, \'error_details\')">' . _MOREINFO . '</a>';