function __construct($steam_object = FALSE)
 {
     self::$PATH = PATH_EXTENSIONS . "units_elearning/";
     self::$DISPLAY_NAME = gettext("elearning course material");
     self::$DISPLAY_DESCRIPTION = gettext("Here you can add elearning material");
     parent::__construct(PATH_EXTENSIONS . "units_elearning.xml", $steam_object);
     if (!defined("PATH_TEMPLATES_UNITS_ELEARNING")) {
         define("PATH_TEMPLATES_UNITS_ELEARNING", PATH_EXTENSIONS . "units_elearning/templates/");
     }
     $this->cache = get_cache_function("unit_elearning", 3600);
 }
예제 #2
0
파일: exam.class.php 프로젝트: rolwi/koala
 private function get_reporting_html()
 {
     global $STYLE;
     $html = "";
     $html .= $this->get_reset_script_html();
     $html .= $this->get_clear_script_html();
     $html .= $this->get_toggleexam_script_html();
     if ($this->elearning_course->get_exam_by_type("final_exam")->is_global_enabled()) {
         $t = "ausschalten";
     } else {
         $t = "einschalten";
     }
     $html .= "<table class=\"grid\" width=\"100%\" cellpadding=\"5\" cellspacing=\"0\">\n\t\t\t\t <tr>\n\t\t\t\t\t<th colspan=\"2\" class=\"group\">Einstellungen für die Prüfung</th>\n\t\t\t\t</tr>\n\t\t\t\t<tr>\n\t\t\t\t\t<td class=\"label\">Für Teilnehmer freischalten:</td>\n\t\t\t\t\t<td class=\"value\"><a href=\"javascript:toggleexam()\" id=\"toggleexam\">" . $t . "</a></td>\n\t\t\t\t</tr>";
     $html .= "<tr>\n\t\t\t\t\t<th colspan=\"2\" class=\"group\">Teilnehmer</th>\n\t\t\t\t</tr>\n\t\t\t\t<tr>";
     $learners = $this->owner->get_learners();
     if (count($learners) == 0) {
         $html .= "<td colspan=\"2\" class=\"value\">diese Schulung hat zur Zeit keine Teilnehmer</td>";
     } else {
         foreach ($learners as $learner) {
             $html .= "<tr><td class=\"label\">" . $learner->get_attribute("USER_FIRSTNAME") . " " . $learner->get_attribute("USER_FULLNAME") . "</td>";
             $html .= "<td class=\"value\" id=\"elearning_learner_" . $learner->get_name() . "\">";
             $el_learner = elearning_user::get_instance($learner->get_name(), elearning_mediathek::get_instance()->get_course()->get_id());
             $html .= $el_learner->get_status_HTML();
             if ($el_learner->has_exam_finished()) {
                 $html .= " (<a href=\"javascript:resetexam('elearning_learner_" . $learner->get_name() . "','" . $learner->get_name() . "','" . $this->elearning_course->get_id() . "','" . $this->exam->get_id() . "')\">freischalten</a>";
                 $html .= " | <a href=\"javascript:clearexam('elearning_learner_" . $learner->get_name() . "','" . $learner->get_name() . "','" . $this->elearning_course->get_id() . "','" . $this->exam->get_id() . "')\">alles zurücksetzen</a>)";
             }
             $html .= " (<a href=\"javascript:clearexam('elearning_learner_" . $learner->get_name() . "','" . $learner->get_name() . "','" . $this->elearning_course->get_id() . "','" . $this->exam->get_id() . "')\">alles zurücksetzen</a>)</td></tr>";
         }
     }
     $html .= "<tr>\n\t\t\t\t\t<th colspan=\"2\" class=\"group\">Betreuer</th>\n\t\t\t\t</tr>\n\t\t\t\t<tr>";
     $admins = $this->owner->get_admins();
     if (count($admins) == 0) {
         $html .= "<td colspan=\"2\" class=\"value\">diese Schulung hat zur Zeit keine Betreuer</td>";
     } else {
         foreach ($admins as $admin) {
             $html .= "<tr><td class=\"label\">" . $admin->get_attribute("USER_FIRSTNAME") . " " . $admin->get_attribute("USER_FULLNAME") . "</td>";
             $html .= "<td class=\"value\" id=\"elearning_admin_" . $admin->get_name() . "\">";
             $el_admin = elearning_user::get_instance($admin->get_name(), elearning_mediathek::get_instance()->get_course()->get_id());
             $html .= $el_admin->get_status_HTML();
             if ($el_admin->has_exam_finished()) {
                 $html .= "(<a href=\"javascript:resetexam('elearning_admin_" . $admin->get_name() . "','" . $admin->get_name() . "','" . $this->elearning_course->get_id() . "','" . $this->exam->get_id() . "')\">freischalten</a>";
                 $html .= " | <a href=\"javascript:clearexam('elearning_admin_" . $admin->get_name() . "','" . $admin->get_name() . "','" . $this->elearning_course->get_id() . "','" . $this->exam->get_id() . "')\">alles zurücksetzen</a>)";
             }
             $html .= " (<a href=\"javascript:clearexam('elearning_admin_" . $admin->get_name() . "','" . $admin->get_name() . "','" . $this->elearning_course->get_id() . "','" . $this->exam->get_id() . "')\">alles zurücksetzen</a>)</td></tr>";
             $html .= "</td></tr>";
         }
     }
     $html .= "</tr></table>";
     $html .= "Erweiterungsversion: " . units_elearning::get_version() . "<br>";
     $html .= "Kursversion: " . $this->elearning_course->get_version();
     return $html;
 }