if (!is_array($studentCertificates) || empty($studentCertificates)) { continue; } foreach ($studentCertificates as $certificate) { $certificateStudent['certificates'][] = array('createdAt' => api_convert_and_format_date($certificate['created_at']), 'id' => $certificate['id']); } if (count($certificateStudent['certificates']) > 0) { $certificateStudents[] = $certificateStudent; } } } } } /* View */ $template = new Template(get_lang('GradebookListOfStudentsCertificates')); if (Session::has('reportErrorMessage')) { $template->assign('errorMessage', Session::read('reportErrorMessage')); } $searchBySessionCourseDateForm = new FormValidator('certificate_report_form', 'post', api_get_path(WEB_CODE_PATH) . 'gradebook/certificate_report.php'); $searchBySessionCourseDateForm->addSelect('session', get_lang('Sessions'), $sessions, ['id' => 'session']); $searchBySessionCourseDateForm->addSelect('course', get_lang('Courses'), $courses, ['id' => 'course']); $searchBySessionCourseDateForm->addGroup([$searchBySessionCourseDateForm->createElement('select', 'month', null, $months, ['id' => 'month']), $searchBySessionCourseDateForm->createElement('text', 'year', null, ['id' => 'year', 'placeholder' => get_lang('Year')])], null, get_lang('Date')); $searchBySessionCourseDateForm->addButtonSearch(); $searchBySessionCourseDateForm->setDefaults(['session' => $selectedSession, 'course' => $selectedCourse, 'month' => $selectedMonth, 'year' => $selectedYear]); if (api_is_student_boss()) { foreach ($userList as $studentId) { $students[$studentId] = api_get_user_info($studentId)['complete_name_with_username']; } $searchByStudentForm = new FormValidator('certificate_report_form', 'post', api_get_path(WEB_CODE_PATH) . 'gradebook/certificate_report.php'); $searchByStudentForm->addSelect('student', get_lang('Students'), $students, ['id' => 'student']); $searchByStudentForm->addButtonSearch();
$skill->setStatus(0); $skill->setUpdatedAt($updatedAt); $entityManager->persist($skill); } $entityManager->flush(); Display::addFlash(Display::return_message(sprintf(get_lang('SkillXDisabled'), $skill->getName()), 'success')); } header('Location: ' . api_get_self()); exit; break; case 'list': //no break //no break default: $interbreadcrumb[] = array("url" => 'index.php', "name" => get_lang('PlatformAdmin')); $message = Session::has('message') ? Session::read('message') : null; $toolbar = Display::toolbarButton(get_lang('CreateSkill'), api_get_path(WEB_CODE_PATH) . 'admin/skill_create.php', 'plus', 'success', ['title' => get_lang('CreateSkill')]); $toolbar .= Display::toolbarButton(get_lang('SkillsWheel'), api_get_path(WEB_CODE_PATH) . 'admin/skills_wheel.php', 'bullseye', 'primary', ['title' => get_lang('CreateSkill')]); $toolbar .= Display::toolbarButton(get_lang('BadgesManagement'), api_get_path(WEB_CODE_PATH) . 'admin/skill_badge_list.php', 'shield', 'warning', ['title' => get_lang('BadgesManagement')]); /* View */ $skill = new Skill(); $skillList = $skill->get_all(); $tpl = new Template(get_lang('ManageSkills')); $tpl->assign('message', $message); $tpl->assign('skills', $skillList); $content = $tpl->fetch('default/skill/list.tpl'); $tpl->assign('actions', $toolbar); $tpl->assign('content', $content); $tpl->display_one_col_template(); Session::erase('message'); break;
//require_once '../inc/global.inc.php'; api_protect_course_script(false); require_once api_get_path(LIBRARY_PATH) . 'geometry.lib.php'; Display::display_reduced_header(); echo '<div id="delineation-container">'; $message = null; $dbg_local = 0; $gradebook = null; $final_overlap = null; $final_missing = null; $final_excess = null; $threadhold1 = null; $threadhold2 = null; $threadhold3 = null; $exerciseResult = []; if (Session::has('exerciseResult')) { $exerciseResult = Session::read('exerciseResult'); } $exerciseResultCoordinates = isset($_REQUEST['exerciseResultCoordinates']) ? $_REQUEST['exerciseResultCoordinates'] : null; if (empty($origin)) { $origin = Security::remove_XSS($_REQUEST['origin']); } // if origin is learnpath $learnpath_id = 0; if (isset($_REQUEST['learnpath_id'])) { $learnpath_id = intval($_REQUEST['learnpath_id']); } $learnpath_item_id = 0; if (isset($_REQUEST['learnpath_item_id'])) { $learnpath_item_id = intval($_REQUEST['learnpath_item_id']); }
$values = $form->exportValues(); //api_delete_category_settings_by_subkey($pluginName); $accessUrlId = api_get_current_access_url_id(); api_delete_settings_params(array('category = ? AND access_url = ? AND subkey = ? AND type = ? and variable <> ?' => array('Plugins', $accessUrlId, $pluginName, 'setting', "status"))); foreach ($values as $key => $value) { api_add_setting($value, Database::escape_string($pluginName . '_' . $key), $pluginName, 'setting', 'Plugins', $pluginName, null, null, null, api_get_current_access_url_id(), 1); } if (isset($values['show_main_menu_tab'])) { $objPlugin = $pluginInfo['plugin_class']::create(); $objPlugin->manageTab($values['show_main_menu_tab']); } $message = Display::return_message(get_lang('Updated'), 'success'); Session::write('message', $message); header("Location: {$currentUrl}"); exit; } else { foreach ($form->_errors as $error) { $message .= Display::return_message($error, 'error'); } } } if (Session::has('message')) { $message = Session::read('message'); } $interbreadcrumb[] = array('url' => api_get_path(WEB_CODE_PATH) . 'admin/index.php', 'name' => get_lang('PlatformAdmin')); $interbreadcrumb[] = array('url' => api_get_path(WEB_CODE_PATH) . 'admin/settings.php?category=Plugins', 'name' => get_lang('Plugins')); $tpl = new Template($pluginName, true, true, false, true, false); $tpl->assign('message', $message); $tpl->assign('content', $content); $tpl->display_one_col_template(); Session::erase('message');
$hotSpot['coord'] = $hotspot['hotspot_coordinates']; $data['hotspots'][] = $hotSpot; } $attemptList = Event::getAllExerciseEventByExeId($exerciseId); if (!empty($attemptList)) { $questionAttempt = $attemptList[$questionId][0]; if (!empty($questionAttempt->getAnswer())) { $coordinates = explode('|', $questionAttempt->getAnswer()); foreach ($coordinates as $coordinate) { $data['answers'][] = Geometry::decodePoint($coordinate); } } } $data['nmbrTries'] = $nmbrTries; $data['done'] = 'done'; if (Session::has('hotspot_ordered')) { $tempHotspots = []; $hotspotOrdered = Session::read('hotspot_ordered'); foreach ($hotspotOrdered as $hotspotOrder) { foreach ($data['hotspots'] as $hotspot) { if ($hotspot['id'] != $hotspotOrder) { continue; } $tempHotspots[] = $hotspot; } } $data['hotspots'] = $tempHotspots; Session::erase('hotspot_ordered'); } header('Content-Type: application/json'); echo json_encode($data);
<?php /* For licensing terms, see /license.txt */ /** * Show information about Mozilla OpenBadges * @author Angel Fernando Quiroz Campos <*****@*****.**> * @package chamilo.admin.openbadges */ use ChamiloSession as Session; $cidReset = true; require_once '../inc/global.inc.php'; if (!api_is_platform_admin() || api_get_setting('allow_skills_tool') !== 'true') { api_not_allowed(true); } $this_section = SECTION_PLATFORM_ADMIN; $errorMessage = null; if (Session::has('errorMessage')) { $errorMessage = Session::read('errorMessage'); } $objSkill = new Skill(); $skills = $objSkill->get_all(); $interbreadcrumb = array(array('url' => api_get_path(WEB_CODE_PATH) . 'admin/index.php', 'name' => get_lang('Administration')), array('url' => api_get_path(WEB_CODE_PATH) . 'admin/skill_badge.php', 'name' => get_lang('Badges'))); $toolbar = Display::toolbarButton(get_lang('ManageSkills'), api_get_path(WEB_CODE_PATH) . 'admin/skill_list.php', 'list', 'primary', ['title' => get_lang('ManageSkills')]); $tpl = new Template(get_lang('Skills')); $tpl->assign('errorMessage', $errorMessage); $tpl->assign('skills', $skills); $contentTemplate = $tpl->fetch('default/skill/badge_list.tpl'); $tpl->assign('actions', $toolbar); $tpl->assign('content', $contentTemplate); $tpl->display_one_col_template(); Session::erase('errorMessage');