public static function getInstance() { if (self::$instance === NULL) { self::$instance = new self(); } return self::$instance; }
function getFullName($examObject, $examTerm, $matriculationNumber) { $examOffice = exam_office_file_handling::getInstance(); if (!$examOffice->isMatriculationNumber($matriculationNumber)) { //case no matriculation number echo "0"; } else { //valid matriculation number $ldapManager = exam_organization_ldap_manager::getInstance(); $fullName = $ldapManager->getFullName($matriculationNumber); echo $fullName; } exit(0); }
<?php /* * show and import participants * * @author Marcel Jakoblew */ //database intializtion $eoDatabase = exam_organization_database::getInstance(); $eoDatabase->connect((string) $course->get_name()); $eoDatabase->calculateExamResults($course); //$participants = $eoDatabase->getParticipantsForTerm($examTerm); //better done below $current_user = lms_steam::get_current_user(); $examOffice = exam_office_file_handling::getInstance(); $showedParsedTable = false; //create portal if (!isset($portal)) { $portal = lms_portal::get_instance(); $portal->initialize(GUEST_ALLOWED); } else { $portal->set_guest_allowed(GUEST_ALLOWED); } $html_handler = new koala_html_course($course); $html_handler->set_context("exam_organization"); //set context for context menu $content = new HTML_TEMPLATE_IT(); $content->loadTemplateFile(PATH_EXTENSIONS . PATH_TEMPLATES_EXAM_ORGANIZATION . "exam_organization_show_and_import_participants.template.html"); $container = $course->get_workroom(); $is_admin = $course->is_admin($current_user); //post data //save to database - case list loaded