/**
  * @param array $row
  * @return array
  */
 protected function prepareRow(array &$row)
 {
     $unique_id = md5($row['usr_id'] . $row['ts']);
     $this->ctrl->setParameter($this->getParentObject(), 'tosv_id', $row['tosv_id']);
     $row['content_link'] = $this->ctrl->getLinkTarget($this->getParentObject(), 'getAcceptedContentAsynch', '', true, false);
     $this->ctrl->setParameter($this->getParentObject(), 'tosv_id', '');
     $row['img_down'] = ilGlyphGUI::get(ilGlyphGUI::SEARCH);
     $row['id'] = $unique_id;
     $modal = ilModalGUI::getInstance();
     $modal->setHeading($this->lng->txt('tos_agreement_document'));
     $modal->setId('tos_' . $unique_id);
     $modal->setBody('');
     $row['modal'] = $modal->getHTML();
 }
 /**
  * @param array $row
  * @return array
  */
 protected function prepareRow(array &$row)
 {
     if (is_string($row['agreement_document']) && strlen($row['agreement_document'])) {
         $unique_id = md5($row['language']);
         $this->ctrl->setParameter($this->getParentObject(), 'agreement_document', rawurlencode($row['agreement_document']));
         $row['content_link'] = $this->ctrl->getLinkTarget($this->getParentObject(), 'getAgreementTextByFilenameAsynch', '', true, false);
         $this->ctrl->setParameter($this->getParentObject(), 'agreement_document', '');
         $row['img_down'] = ilGlyphGUI::get(ilGlyphGUI::SEARCH);
         $row['id'] = $unique_id;
         $modal = ilModalGUI::getInstance();
         $modal->setHeading($this->lng->txt('tos_agreement_document'));
         $modal->setId('tos_' . $unique_id);
         $modal->setBody('');
         $row['modal'] = $modal->getHTML();
     } else {
         $row['missing_agreement_css_class'] = 'warning';
     }
 }
 /**
  * @param ilTemplate $tpl
  */
 public function insert(ilTemplate $tpl)
 {
     /**
      * @var $lng ilLanguage
      */
     global $lng;
     $local_tpl = new ilTemplate('tpl.prop_tos_signed_document.html', true, true, 'Services/TermsOfService');
     require_once 'Services/UIComponent/Modal/classes/class.ilModalGUI.php';
     $modal = ilModalGUI::getInstance();
     $modal->setHeading($lng->txt('tos_agreement_document'));
     $modal->setId('accepted_tos_' . $this->entity->getUserId());
     $modal->setBody($this->entity->getText());
     require_once 'Services/UIComponent/Glyph/classes/class.ilGlyphGUI.php';
     $local_tpl->setVariable('MODAL_TRIGGER_HTML', ilGlyphGUI::get(ilGlyphGUI::SEARCH));
     $local_tpl->setVariable('MODAL', $modal->getHTML());
     $local_tpl->setVariable('MODAL_ID', 'accepted_tos_' . $this->entity->getUserId());
     $tpl->setCurrentBlock('prop_generic');
     $tpl->setVariable('PROP_GENERIC', $local_tpl->get());
     $tpl->parseCurrentBlock();
 }
Пример #4
0
 /**
  * Get initialisation HTML to use interna link editing
  */
 function getInitHTML($a_url, $a_move_to_body = false)
 {
     global $tpl, $lng;
     $lng->loadLanguageModule("link");
     $tpl->addJavaScript("./Services/UIComponent/Explorer/js/ilExplorer.js");
     include_once "./Services/UIComponent/Explorer2/classes/class.ilExplorerBaseGUI.php";
     ilExplorerBaseGUI::init();
     include_once "./Services/YUI/classes/class.ilYuiUtil.php";
     ilYuiUtil::initConnection();
     $tpl->addJavascript("./Services/Link/js/ilIntLink.js");
     include_once "./Services/UIComponent/Modal/classes/class.ilModalGUI.php";
     $modal = ilModalGUI::getInstance();
     $modal->setHeading($lng->txt("link_link"));
     $modal->setId("ilIntLinkModal");
     $modal->setBody("<div id='ilIntLinkModalContent'></div>");
     $ltpl = new ilTemplate("tpl.int_link_panel.html", true, true, "Services/Link");
     $ltpl->setVariable("MODAL", $modal->getHTML());
     $ltpl->setVariable("IL_INT_LINK_URL", $a_url);
     return $ltpl->get();
 }
 /**
  * @param ilTemplate $template
  */
 public function insert(ilTemplate $template)
 {
     global $lng;
     require_once "./Services/UIComponent/Modal/classes/class.ilModalGUI.php";
     $modal = ilModalGUI::getInstance();
     $modal->setHeading($lng->txt(''));
     $modal->setId("ilGapModal");
     //$modal->setBackdrop(ilModalGUI::BACKDROP_OFF);
     $modal->setBody('');
     $custom_template = new ilTemplate('tpl.il_as_cloze_gap_builder.html', true, true, 'Modules/TestQuestionPool');
     $custom_template->setVariable("MY_MODAL", $modal->getHTML());
     $custom_template->setVariable('GAP_JSON', json_encode(array($this->getValue())));
     $custom_template->setVariable('GAP', $lng->txt('gap'));
     $custom_template->setVariable('GAP_COMBINATION_JSON', json_encode($this->getValueCombination()));
     $custom_template->setVariable('TEXT_GAP', $lng->txt('text_gap'));
     $custom_template->setVariable('SELECT_GAP', $lng->txt('select_gap'));
     $custom_template->setVariable('NUMERIC_GAP', $lng->txt('numeric_gap'));
     $custom_template->setVariable('GAP_SIZE', $lng->txt('cloze_fixed_textlength'));
     $custom_template->setVariable('GAP_SIZE_INFO', $lng->txt('cloze_gap_size_info'));
     $custom_template->setVariable('ANSWER_TEXT', $lng->txt('answer_text'));
     $custom_template->setVariable('POINTS', $lng->txt('points'));
     $custom_template->setVariable('VALUE', $lng->txt('value'));
     $custom_template->setVariable('UPPER_BOUND', $lng->txt('range_upper_limit'));
     $custom_template->setVariable('LOWER_BOUND', $lng->txt('range_lower_limit'));
     $custom_template->setVariable('ACTIONS', $lng->txt('actions'));
     $custom_template->setVariable('REMOVE_GAP', $lng->txt('remove_gap'));
     $custom_template->setVariable('SHUFFLE_ANSWERS', $lng->txt('shuffle_answers'));
     $custom_template->setVariable('POINTS_ERROR', $lng->txt('enter_enough_positive_points'));
     $custom_template->setVariable('MISSING_VALUE', $lng->txt('msg_input_is_required'));
     $custom_template->setVariable('NOT_A_FORMULA', $lng->txt('err_no_formula'));
     $custom_template->setVariable('NOT_A_NUMBER', $lng->txt('err_no_numeric_value'));
     $custom_template->setVariable('CLOSE', $lng->txt('close'));
     $custom_template->setVariable('DELETE_GAP', $lng->txt('are_you_sure'));
     $custom_template->setVariable('PLEASE_SELECT', $lng->txt('please_select'));
     $custom_template->setVariable('BEST_POSSIBLE_SOLUTION_HEADER', $lng->txt('tst_best_solution_is'));
     $custom_template->setVariable('BEST_POSSIBLE_SOLUTION', $lng->txt('value'));
     $custom_template->setVariable('MAX_POINTS', $lng->txt('max_points'));
     $custom_template->setVariable('OUT_OF_BOUND', $lng->txt('out_of_range'));
     $custom_template->setVariable('TYPE', $lng->txt('type'));
     $custom_template->setVariable('VALUES', $lng->txt('values'));
     $custom_template->setVariable('GAP_COMBINATION', $lng->txt('gap_combination'));
     $custom_template->setVariable('COPY', $lng->txt('copy_of'));
     $custom_template->setVariable('OK', $lng->txt('ok'));
     $custom_template->setVariable('CANCEL', $lng->txt('cancel'));
     $custom_template->setVariable('WHITESPACE_FRONT', $lng->txt('cloze_textgap_whitespace_before'));
     $custom_template->setVariable('WHITESPACE_BACK', $lng->txt('cloze_textgap_whitespace_after'));
     $custom_template->setVariable('WHITESPACE_MULTIPLE', $lng->txt('cloze_textgap_multiple_whitespace'));
     $template->setCurrentBlock('prop_generic');
     $template->setVariable('PROP_GENERIC', $custom_template->get());
     $template->parseCurrentBlock();
 }
Пример #6
0
 /**
  * Get preview modal html
  */
 static function getPreviewModalHTML($a_mpool_ref_id, $a_tpl)
 {
     global $tpl, $ilCtrl, $lng;
     require_once "./Services/MediaObjects/classes/class.ilObjMediaObjectGUI.php";
     ilObjMediaObjectGUI::includePresentationJS($a_tpl);
     $tpl->addJavaScript("./Modules/MediaPool/js/ilMediaPool.js");
     $ilCtrl->setParameterByClass("ilobjmediapoolgui", "mepitem_id", "");
     $ilCtrl->setParameterByClass("ilobjmediapoolgui", "ref_id", $a_mpool_ref_id);
     $tpl->addOnloadCode("il.MediaPool.setPreviewUrl('" . $ilCtrl->getLinkTargetByClass(array("ilmediapoolpresentationgui", "ilobjmediapoolgui"), "showPreview", "", false, false) . "');");
     $ilCtrl->setParameterByClass("ilobjmediapoolgui", "mepitem_id", $_GET["mepitem_id"]);
     $ilCtrl->setParameterByClass("ilobjmediapoolgui", "ref_id", $_GET["red_id"]);
     include_once "./Services/UIComponent/Modal/classes/class.ilModalGUI.php";
     $modal = ilModalGUI::getInstance();
     $modal->setHeading($lng->txt("preview"));
     $modal->setId("ilMepPreview");
     $modal->setType(ilModalGUI::TYPE_LARGE);
     $modal->setBody("<iframe id='ilMepPreviewContent'></iframe>");
     return $modal->getHTML();
 }