function get_question_script_exam_html($pathprefix, $eid)
 {
     $content = new HTML_TEMPLATE_IT();
     $content->loadTemplateFile(PATH_TEMPLATES_UNITS_ELEARNING . "elearning_question_multiplechoice.template.html");
     $content->setCurrentBlock("BLOCK_CHECKBOX");
     $content->setVariable("IMAGE_CHECKBOX_SELECTED_ENABLED", IMAGE_CHECKBOX_SELECTED_ENABLED);
     $content->setVariable("IMAGE_CHECKBOX_SELECTED_DISENABLED", IMAGE_CHECKBOX_SELECTED_DISABLED);
     $content->setVariable("IMAGE_CHECKBOX_UNSELECTED_ENABLED", IMAGE_CHECKBOX_UNSELECTED_ENABLED);
     $content->setVariable("IMAGE_CHECKBOX_UNSELECTED_DISENABLED", IMAGE_CHECKBOX_UNSELECTED_DISABLED);
     $content->setVariable("IMAGE_CHECKBOX_LOADER", IMAGE_CHECKBOX_LOADER);
     $content->parseCurrentBlock();
     $content->setCurrentBlock("BLOCK_EXAM_QUESTION_JAVASCRIPT");
     $content->setVariable("PATHPREFIX", $pathprefix);
     $content->setVariable("EID", $eid);
     $content->parseCurrentBlock();
     return $content->get();
 }
 public function set_content()
 {
     //			ini_set("post_max_size", "50M");
     //			ini_set("upload_max_filesize", "50M");
     //			ini_set("memory_limit", "50M" );
     $user = lms_steam::get_current_user();
     if ($this->path == "upload/") {
         /*
          * Artefacts Upload Content
          */
         if ($_SERVER["REQUEST_METHOD"] == "POST") {
             $values = isset($_POST["values"]) ? $_POST["values"] : array();
             $problems = "";
             $hints = "";
             if (empty($_FILES) || !empty($_FILES["material"]["error"]) && $_FILES["material"]["error"] > 0) {
                 if (!empty($_FILES) && empty($_FILES["material"]["name"])) {
                     $problems = gettext("No file chosen.") . " ";
                 } else {
                     $problems = gettext("Could not upload document.") . " ";
                 }
                 $_SESSION["confirmation"] = str_replace("%DOCUMENT", h($filename), $problems);
             }
             if (empty($problems)) {
                 $content = file_get_contents($_FILES["material"]["tmp_name"]);
                 $filename = str_replace(array("\\", "'"), array("", ""), $_FILES["material"]["name"]);
                 $artefacts_container = $user->get_workroom()->get_object_by_name("portfolio")->get_object_by_name("artefacts");
                 $new_container = steam_factory::create_container($GLOBALS["STEAM"]->get_id(), $filename, $artefacts_container);
                 $new_material = steam_factory::create_document($GLOBALS["STEAM"]->get_id(), $filename, $content, $_FILES["material"]["type"], FALSE);
                 print $values["dsc"] . "hhhh";
                 $new_material->set_attribute("DESCRIPTION", $values["dsc"]);
                 $new_container->set_attribute("DESCRIPTION", $values["dsc"]);
                 $new_material->move($new_container);
                 $_SESSION["confirmation"] = str_replace("%DOCUMENT", h($filename), gettext("'%DOCUMENT' has been uploaded."));
                 //					header( "Location: " . PATH_SERVER . "/portfolio/artefacts/" );
                 exit;
             }
         } else {
             /*
              * Artefacts Upload Form
              */
             $template = new HTML_TEMPLATE_IT();
             $template->loadTemplateFile(PORTFOLIO_PATH_TEMPLATES . "artefacts_upload.template.html");
             $template->setVariable("LABEL_UPLOAD", gettext("Upload"));
             $template->setVariable("LABEL_FILE", gettext("Local file"));
             $template->setVariable("LABEL_DSC", gettext("Description"));
             $template->setVariable("FORM_ACTION", PATH_SERVER . "/portfolio/artefacts/upload/");
             $this->template->setVariable("HTML_CODE_LEFT", $template->get());
         }
     } else {
         /*
          * Artefacts List
          */
         $template = new HTML_TEMPLATE_IT();
         $template->loadTemplateFile(PORTFOLIO_PATH_TEMPLATES . "artefacts.template.html");
         $user = lms_steam::get_current_user();
         /*
          * ALLE Artefakte holen
          */
         $workroom = $user->get_workroom();
         $portfolio_container = $workroom->get_object_by_name("portfolio");
         $artefacts_container = $portfolio_container->get_object_by_name("artefacts");
         $all_container = $artefacts_container->get_inventory();
         foreach ($all_container as $artefact_container) {
             //				$artefact_container->get_inventory();
             $id = $artefact_container->get_object_by_name($artefact_container->get_name())->get_id();
             $template->setCurrentBlock("BLOCK_ARTEFACT_ROW");
             $template->setVariable("ARTEFACT_PATH", PATH_SERVER . "/download/" . $id . "/" . $artefact_container->get_name());
             $template->setVariable("ARTEFACT_NAME", $artefact_container->get_name());
             $template->setVariable("ARTEFACT_SIZE", $artefact_container->get_name());
             $template->setVariable("ARTEFACT_DESCRIPTION", $artefact_container->get_attribute("DESCRIPTION") === 0 ? "" : $artefact_container->get_attribute("DESCRIPTION"));
             $template->parseCurrentBlock("BLOCK_ARTEFACT_ROW");
         }
         /*
          * Artefakte eines Portfolios holen
          */
         //$artefacts =) $this->portfolio->get_artefactes();
         //			if (count($artefacts) > 0) {
         //				foreach ($artefacts as $artefact) {
         //					$template->setCurrentBlock("BLOCK_ARTEFACT_ROW");
         //					$template->setVariable("ARTEFACT_NAME", "HUND");
         //					$template->parseCurrentBlock("BLOCK_ARTEFACT_ROW");
         //				}
         //			} else {
         //				//N$template->setVariable(_ARTEFACTS_TEXT
         //			}
         $this->template->setVariable("HTML_CODE_LEFT", $template->get());
     }
 }
 public function set_content()
 {
     $template = new HTML_TEMPLATE_IT();
     $template->loadTemplateFile(PORTFOLIO_PATH_TEMPLATES . "manage.template.html");
     // Set content on right side
     $template->setCurrentBlock("BLOCK_DESKTOP_LEFT");
     $template->setCurrentBlock("BLOCK_NEXTSTEPS");
     $template->setVariable("LABEL_NEXTSTEPS", "Nächste Schritte");
     $template->setCurrentBlock("BLOCK_NEXTSTEP");
     $template->setVariable("CONTENT_NEXTSTEPS", "Nummer 1");
     $template->parseCurrentBlock();
     $template->setVariable("CONTENT_NEXTSTEPS", "Nummer 2");
     $template->parseCurrentBlock();
     $template->setVariable("CONTENT_NEXTSTEPS", "Nummer 3");
     $template->parseCurrentBlock();
     $template->parseCurrentBlock();
     $template->setCurrentBlock("BLOCK_VISIBLE_PORTFOLIOS");
     $template->setVariable("LABEL_VISIBLE", "Sichtbare Portfolios");
     $template->setCurrentBlock("BLOCK_VISIBLE_BOX");
     $template->setVariable("CONTENT_VISIBLE", "Nummer 1");
     $template->parseCurrentBlock();
     $template->setVariable("CONTENT_VISIBLE", "Nummer 2");
     $template->parseCurrentBlock();
     $template->setVariable("CONTENT_VISIBLE", "Nummer 3");
     $template->parseCurrentBlock();
     $template->parseCurrentBlock();
     // Set content on left side
     $template->setCurrentBlock("BLOCK_DESKTOP_RIGHT");
     $template->setCurrentBlock("BLOCK_COMMENTS");
     $template->setVariable("LABEL_COMMENTS", "Kommentare");
     $template->setCurrentBlock("BLOCK_COMMENTS_BOX");
     $template->setVariable("CONTENT_COMMENTS", "Nummer 1");
     $template->parseCurrentBlock();
     $template->setVariable("CONTENT_COMMENTS", "Nummer 2");
     $template->parseCurrentBlock();
     $template->setVariable("CONTENT_COMMENTS", "Nummer 3");
     $template->parseCurrentBlock();
     $template->parseCurrentBlock();
     $this->template->setVariable("HTML_CODE_LEFT", $template->get());
 }
Example #4
0
 $content->setVariable("LABEL_EXAM_1_REGISTRATION_STATUS", gettext("Status:"));
 $content->setVariable("VALUE_EXAM_1_REGISTRATION_STATUS", gettext("You are registered for exam") . " 1.");
 if ($exam1VisibleDate) {
     $examDateDay = $course->get_attribute("EXAM1_exam_date_day");
     $examDateMonth = $course->get_attribute("EXAM1_exam_date_month");
     $examDateYear = $course->get_attribute("EXAM1_exam_date_year");
     $examTimeStartHour = $course->get_attribute("EXAM1_exam_time_start_hour");
     $examTimeStartMinute = $course->get_attribute("EXAM1_exam_time_start_minute");
     $examTimeEndHour = $course->get_attribute("EXAM1_exam_time_end_hour");
     $examTimeEndMinute = $course->get_attribute("EXAM1_exam_time_end_minute");
     $content->setCurrentBlock("DATE_TIME_EXAM1");
     $content->setVariable("LABEL_EXAM_1_DATE", gettext("Date:"));
     $content->setVariable("LABEL_EXAM_1_TIME", gettext("Time:"));
     $content->setVariable("VALUE_EXAM_1_DATE", sprintf("%02d.%02d.%04d", $examDateDay, $examDateMonth, $examDateYear));
     $content->setVariable("VALUE_EXAM_1_TIME", "{$examTimeStartHour}:{$examTimeStartMinute} " . gettext("til") . " {$examTimeEndHour}:{$examTimeEndMinute} " . gettext("o'clock"));
     $content->parseCurrentBlock();
 }
 $koalaUserRoomAndPlace = $eoDatabase->getRoomAndPlace(1, $koalaUserLogin);
 $room = $koalaUserRoomAndPlace["room"];
 $place = $koalaUserRoomAndPlace["place"];
 if ($room == "not set") {
     $room = gettext("not set");
 }
 if ($place == "not set") {
     $place = gettext("not set");
 }
 if ($exam1VisiblePlaces) {
     $content->setCurrentBlock("ROOM_PLACE_EXAM1");
     $content->setVariable("LABEL_EXAM_1_ROOM", gettext("Room:"));
     $content->setVariable("LABEL_EXAM_1_PLACE", gettext("Place:"));
     $content->setVariable("VALUE_EXAM_1_ROOM", $room);