ILIAS  release_8 Revision v8.23
ilAssQuestionPageGUI Class Reference

This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Learning e.V. More...

+ Inheritance diagram for ilAssQuestionPageGUI:
+ Collaboration diagram for ilAssQuestionPageGUI:

Public Member Functions

 __construct ($a_id=0, $a_old_nr=0)
 Constructor. More...
 
 getOriginalPresentationTitle ()
 
 setOriginalPresentationTitle ($originalPresentationTitle)
 
 showPage ()
 
 finishEditing ()
 
 postOutputProcessing (string $a_output)
 
 setQuestionInfoHTML ($a_html)
 Set the HTML of a question info block below the title (number, status, ...) More...
 
 setQuestionActionsHTML ($a_html)
 Set the HTML of a question actions block below the title. More...
 
 insertPageToc (string $a_output)
 Replace page toc placeholder with question info and actions. More...
 
- Public Member Functions inherited from ilPageObjectGUI
 __construct (string $a_parent_type, int $a_id, int $a_old_nr=0, bool $a_prevent_get_id=false, string $a_lang="", string $concrete_lang="")
 
 setTemplate (ilGlobalTemplateInterface $main_tpl)
 
 afterConstructor ()
 
 setAdvMdRecordObject (int $a_adv_ref_id, string $a_adv_type, string $a_adv_subtype="-")
 Set object, that defines the adv md records being used. More...
 
 getAdvMdRecordObject ()
 Get adv md record type. More...
 
 setParentType (string $a_val)
 
 getParentType ()
 
 setId (int $a_val)
 
 getId ()
 
 setOldNr (int $a_val)
 Set old nr (historic page) More...
 
 getOldNr ()
 
 setLanguage (string $a_val)
 
 getLanguage ()
 
 setEnablePCType (string $a_pc_type, bool $a_val)
 
 getEnablePCType (string $a_pc_type)
 
 setPageConfig (ilPageConfig $a_val)
 
 getPageConfig ()
 
 setPageObject (ilPageObject $a_pg_obj)
 
 getPageObject ()
 
 setOutputMode (string $a_mode=self::PRESENTATION)
 
 getOutputMode ()
 
 setTemplateOutput (bool $a_output=true)
 
 outputToTemplate ()
 
 setPresentationTitle (string $a_title="")
 
 getPresentationTitle ()
 
 setHeader (string $a_title="")
 
 getHeader ()
 
 setLinkParams (string $l_params="")
 
 getLinkParams ()
 
 setLinkFrame (string $l_frame="")
 
 getLinkFrame ()
 
 setPageLinker (\ILIAS\COPage\PageLinker $page_linker)
 
 getLinkXML ()
 
 setQuestionHTML (array $question_html)
 
 getQuestionHTML ()
 
 setTemplateTargetVar (string $a_variable)
 
 getTemplateTargetVar ()
 
 getTemplateOutputVar ()
 
 setSourcecodeDownloadScript (string $script_name)
 
 getSourcecodeDownloadScript ()
 
 setTabs (ilTabsGUI $a_tabs)
 
 setPageBackTitle (string $a_title)
 
 setFileDownloadLink (string $a_download_link)
 
 getFileDownloadLink ()
 
 setFullscreenLink (string $a_fullscreen_link)
 
 getFullscreenLink ()
 
 setIntLinkReturn (string $a_return)
 
 enableChangeComments (bool $a_enabled)
 
 isEnabledChangeComments ()
 
 enableNotes (bool $a_enabled, int $a_parent_id)
 
 isEnabledNotes ()
 
 setOfflineDirectory (string $offdir)
 
 getOfflineDirectory ()
 
 setViewPageLink (string $a_link, string $a_target="")
 set link for "view page" button More...
 
 getViewPageLink ()
 
 getViewPageTarget ()
 
 getViewPageText ()
 
 setActivationListener (object $a_obj, string $a_meth)
 
 setEnabledNews (bool $a_enabled, int $a_news_obj_id=0, string $a_news_obj_type="")
 
 getEnabledNews ()
 
 setTabHook (object $a_object, string $a_function)
 
 setEditPreview (bool $a_editpreview)
 Set Display first Edit tab, then Preview tab, instead of Page and Edit. More...
 
 getEditPreview ()
 
 setEnabledTabs (bool $a_enabledtabs)
 
 getEnabledTabs ()
 
 setEnabledPageFocus (bool $a_enabledpagefocus)
 
 setOpenPlaceHolder (string $a_val)
 
 getOpenPlaceHolder ()
 
 getEnabledPageFocus ()
 
 setPrependingHtml (string $a_prependinghtml)
 
 getPrependingHtml ()
 
 setEnableEditing (bool $a_enableediting)
 
 getEnableEditing ()
 
 setRawPageContent (bool $a_rawpagecontent)
 Set Get raw page content only. More...
 
 getRawPageContent ()
 
 setStyleId (int $a_styleid)
 
 getStyleId ()
 
 setCompareMode (bool $a_val)
 
 getCompareMode ()
 
 setAbstractOnly (bool $a_val, string $pcid="")
 Get only abstract (first text paragraph) More...
 
 getAbstractOnly ()
 
 setRenderPageContainer (bool $a_val)
 
 getRenderPageContainer ()
 
 getDisabledText ()
 
 getEnabledHref ()
 
 setEnabledHref (bool $enable)
 
 activateMetaDataEditor (ilObject $a_rep_obj, string $a_type, int $a_sub_obj_id, object $a_observer_obj=null, string $a_observer_func="")
 Activate meda data editor. More...
 
 determineFileDownloadLink ()
 
 determineFullscreenLink ()
 
 determineSourcecodeDownloadScript ()
 
 getComponentPluginsXML ()
 Put information about activated plugins into XML. More...
 
 executeCommand ()
 execute command More...
 
 setQEditTabs (string $a_active)
 Set question editing tabs. More...
 
 onFeedbackEditingForwarding ()
 
 deactivatePage ()
 
 activatePage ()
 
 showPage ()
 display content of page More...
 
 replaceCurlyBrackets (string $output)
 
 getActivationCaptions ()
 Get captions for activation action menu entries. More...
 
 setEditMode ()
 Set edit mode. More...
 
 setDefaultLinkXml ()
 
 setLinkXml (string $xml)
 
 getProfileBackUrl ()
 
 setProfileBackUrl (string $url)
 
 downloadFile ()
 
 displayMediaFullscreen ()
 
 displayMedia (bool $a_fullscreen=false)
 
 download_paragraph ()
 download source code paragraph More...
 
 insertPageToc (string $a_output)
 
 insertResources (string $a_output)
 
 insertAdvTrigger (string $a_output)
 Insert adv content trigger. More...
 
 postOutputProcessing (string $a_output)
 Finalizing output processing. More...
 
 previewHistory ()
 Preview history. More...
 
 preview ()
 
 edit ()
 
 getBlockingInfoMessage ()
 
 insertJSAtPlaceholder ()
 
 presentation (string $a_mode=self::PRESENTATION)
 
 getHTML ()
 
 showMediaFullscreen (int $a_style_id=0)
 show fullscreen view of media object More...
 
 displayValidationError ($a_error)
 display validation error More...
 
 history ()
 Get history table as HTML. More...
 
 rollbackConfirmation ()
 Rollback confirmation. More...
 
 rollback ()
 Rollback to a previous version. More...
 
 setScreenIdComponent ()
 
 getTabs (string $a_activate="")
 
 compareVersion ()
 Compares two revisions of the page. More...
 
 replaceDiffTags (string $a_html)
 
 editActivation ()
 Edit activation (only, if scheduled page activation is activated in administration) More...
 
 initActivationForm ()
 Init activation form. More...
 
 getActivationFormValues ()
 Get values for activation form. More...
 
 saveActivation ()
 Save Activation. More...
 
 getNotesHTML (object $a_content_object=null, bool $a_enable_private_notes=true, bool $a_enable_public_notes=false, bool $a_enable_notes_deletion=false, callable $a_callback=null, bool $export=false)
 Get html for public and/or private notes. More...
 
 processAnswer ()
 Process answer. More...
 
 initialOpenedContent ()
 Initially opened content. More...
 
 initOpenedContentForm ()
 
 saveInitialOpenedContent ()
 
 switchToLanguage ()
 Switch to language. More...
 
 confirmPageTranslationCreation ()
 Confirm page translation creation. More...
 
 editMasterLanguage ()
 Edit master language. More...
 
 createPageTranslation ()
 Create page translation. More...
 
 releasePageLock ()
 Release page lock. More...
 
 finishEditing ()
 
 getPagePermaLink ()
 
 getAdditionalPageActions ()
 Get additional page actions. More...
 

Data Fields

const TEMP_PRESENTATION_TITLE_PLACEHOLDER = '___TEMP_PRESENTATION_TITLE_PLACEHOLDER___'
 
- Data Fields inherited from ilPageObjectGUI
const PRESENTATION = "presentation"
 
const EDIT = "edit"
 
const PREVIEW = "preview"
 
const OFFLINE = "offline"
 
const PRINTING = "print"
 
string $page_back_title = ""
 
ilPageObject $obj
 
string $presentation_title = ""
 
string $target_script = ""
 
string $return_location = ""
 
string $target_var = ""
 
string $template_output_var = ""
 
bool $output2template = false
 
string $link_params = ""
 
string $sourcecode_download_script = ""
 
bool $change_comments = false
 
bool $activation = false
 
bool $activated = true
 
bool $editpreview = false
 
bool $use_meta_data = false
 
ilObject $meta_data_rep_obj = null
 
int $meta_data_sub_obj_id = 0
 
string $meta_data_type = ""
 
object $meta_data_observer_obj = null
 
string $meta_data_observer_func = ""
 
bool $link_xml_set = false
 
bool $enableediting = true
 
bool $rawpagecontent = false
 
bool $enabledcontentincludes = false
 
bool $compare_mode = false
 
ilPageConfig $page_config = null
 
bool $tabs_enabled = true
 
bool $render_page_container = false
 
string $pl_start = "{{{{{"
 
string $pl_end = "}}}}}"
 

Protected Member Functions

 isPageContainerToBeRendered ()
 
- Protected Member Functions inherited from ilPageObjectGUI
 initPageObject ()
 Init page object. More...
 
 showEditToolbar ()
 Show edit toolbar. More...
 
 setEditorToolContext ()
 Set editor tool context. More...
 
 initEditing ()
 
 showEditLockInfo ()
 
 setBackToEditTabs ()
 
 isPageContainerToBeRendered ()
 
 addResourcesToTemplate (ilGlobalTemplateInterface $tpl)
 Add resources to template. More...
 

Private Attributes

 $originalPresentationTitle = ''
 
 $questionInfoHTML = ''
 
 $questionActionsHTML = ''
 

Additional Inherited Members

- Static Public Member Functions inherited from ilPageObjectGUI
static getTinyMenu (string $a_par_type, bool $a_int_links=false, bool $a_wiki_links=false, bool $a_keywords=false, $a_style_id=0, $a_paragraph_styles=true, $a_save_return=true, $a_anchors=false, $a_save_new=true, $a_user_links=false, \ILIAS\COPage\Editor\Server\UIWrapper $ui_wrapper=null)
 Get Tiny Menu. More...
 
- Protected Attributes inherited from ilPageObjectGUI
int $requested_ref_id
 
int $requested_pg_id
 
string $requested_file_id
 
string $requested_transl
 
int $requested_old_nr
 
EditGUIRequest $request
 
EditSessionRepository $edit_repo
 
string $exp_target_script = ""
 
string $exp_id = ""
 
string $exp_frame = ""
 
string $act_meth = ""
 
object $act_obj
 
int $notes_parent_id = 0
 
ilPropertyFormGUI $form
 
int $styleid = 0
 
bool $enabledpagefocus
 
string $link_xml
 
int $old_nr = 0
 
int $id
 
string $language
 
ilGlobalTemplateInterface $tpl
 
ilLanguage $lng
 
ilCtrl $ctrl
 
ilTabsGUI $tabs_gui
 
ilAccessHandler $access
 
ilLogger $log
 
ilObjUser $user
 
ilHelpGUI $help
 
string $output_mode = ""
 
string $parent_type = ""
 
string $file_download_link = ''
 
string $fullscreen_link = ''
 
string $link_frame = ''
 
ILIAS GlobalScreen ScreenContext ContextServices $tool_context
 
ILIAS DI UIServices $ui
 
ILIAS COPage PageLinker $page_linker
 
string $abstract_pcid = ""
 
ilToolbarGUI $toolbar
 
string $open_place_holder = ""
 
int $requested_user_id = 0
 
int $requested_q_id = 0
 
int $requested_history_mode = 0
 
bool $enabled_news = false
 
int $news_obj_id = 0
 
string $news_obj_type = ""
 
array $tab_hook = null
 
string $view_page_link = ""
 
string $view_page_target = ""
 
string $offline_directory = ""
 
bool $notes_enabled = false
 
string $prependinghtml = ""
 
string $header = ""
 
string $int_link_return = ""
 
bool $enabled_href = true
 
int $adv_ref_id = null
 
string $adv_type = null
 
string $adv_subtype = null
 
string $concrete_lang = ""
 
string $profile_back_url = ""
 
ilComponentFactory $component_factory
 

Detailed Description

This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Learning e.V.

ILIAS is licensed with the GPL-3.0, see https://www.gnu.org/licenses/gpl-3.0.en.html You should have received a copy of said license along with the source code, too.

If this is not the case or you just want to try ILIAS, you'll find us at: https://www.ilias.de https://github.com/ILIAS-eLearning Question page GUI class

Author
Alex Killing alex..nosp@m.kill.nosp@m.ing@g.nosp@m.mx.d.nosp@m.e

ilAssQuestionPageGUI: ilPageEditorGUI, ilEditClipboardGUI, ilMDEditorGUI ilAssQuestionPageGUI: ilPublicUserProfileGUI, ilNoteGUI ilAssQuestionPageGUI: ilPropertyFormGUI, ilInternalLinkGUI

Definition at line 33 of file class.ilAssQuestionPageGUI.php.

Constructor & Destructor Documentation

◆ __construct()

ilAssQuestionPageGUI::__construct (   $a_id = 0,
  $a_old_nr = 0 
)

Constructor.

Parameters
int$a_id
int$a_old_nr

Definition at line 48 of file class.ilAssQuestionPageGUI.php.

References $DIC, ILIAS\GlobalScreen\Provider\__construct(), ILIAS\Repository\ctrl(), ilPageObjectGUI\setEnabledPageFocus(), and ilPageObjectGUI\setFileDownloadLink().

49  {
50  global $DIC;
51  $cmd_class = '';
52  if ($DIC->http()->wrapper()->query()->has('cmdClass')) {
53  $cmd_class = $DIC->http()->wrapper()->query()->retrieve(
54  'cmdClass',
55  $DIC->refinery()->kindlyTo()->string()
56  );
57  }
58 
59  parent::__construct('qpl', $a_id, $a_old_nr);
60  $this->setEnabledPageFocus(false);
61  if (strtolower($cmd_class) === 'ilassquestionpreviewgui') {
62  $this->setFileDownloadLink($this->ctrl->getLinkTargetByClass(ilObjQuestionPoolGUI::class, 'downloadFile'));
63  } else {
64  $this->setFileDownloadLink($this->ctrl->getLinkTargetByClass(ilObjTestGUI::class, 'downloadFile'));
65  }
66  }
setEnabledPageFocus(bool $a_enabledpagefocus)
global $DIC
Definition: feed.php:28
setFileDownloadLink(string $a_download_link)
__construct(Container $dic, ilPlugin $plugin)
+ Here is the call graph for this function:

Member Function Documentation

◆ finishEditing()

ilAssQuestionPageGUI::finishEditing ( )

Definition at line 98 of file class.ilAssQuestionPageGUI.php.

References ilAssQuestionPreviewGUI\CMD_SHOW, and ILIAS\Repository\ctrl().

98  : void
99  {
100  $this->ctrl->redirectByClass('ilAssQuestionPreviewGUI', ilAssQuestionPreviewGUI::CMD_SHOW);
101  }
+ Here is the call graph for this function:

◆ getOriginalPresentationTitle()

ilAssQuestionPageGUI::getOriginalPresentationTitle ( )

Definition at line 68 of file class.ilAssQuestionPageGUI.php.

References $originalPresentationTitle.

Referenced by postOutputProcessing().

68  : string
69  {
71  }
+ Here is the caller graph for this function:

◆ insertPageToc()

ilAssQuestionPageGUI::insertPageToc ( string  $a_output)

Replace page toc placeholder with question info and actions.

Todo:
: support question info and actions in the page XSL directly the current workaround avoids changing the COPage service

Definition at line 141 of file class.ilAssQuestionPageGUI.php.

References ilPageObjectGUI\$tpl, ilGlobalTemplateInterface\get(), and ilGlobalTemplateInterface\setVariable().

141  : string
142  {
143  if (!empty($this->questionInfoHTML) || !empty($this->questionActionsHTML)) {
144  $tpl = new ilTemplate('tpl.tst_question_subtitle_blocks.html', true, true, 'Modules/TestQuestionPool');
145  $tpl->setVariable('QUESTION_INFO', $this->questionInfoHTML);
146  $tpl->setVariable('QUESTION_ACTIONS', $this->questionActionsHTML);
147  $a_output = str_replace("{{{{{PageTOC}}}}}", $tpl->get(), $a_output);
148  } else {
149  $a_output = str_replace("{{{{{PageTOC}}}}}", '', $a_output);
150  }
151  return $a_output;
152  }
get(string $part=self::DEFAULT_BLOCK)
Renders the given block and returns the html string.
setVariable(string $variable, $value='')
Sets the given variable to the given value.
ilGlobalTemplateInterface $tpl
+ Here is the call graph for this function:

◆ isPageContainerToBeRendered()

ilAssQuestionPageGUI::isPageContainerToBeRendered ( )
protected

Definition at line 78 of file class.ilAssQuestionPageGUI.php.

References ilPageObjectGUI\getRenderPageContainer().

78  : bool
79  {
80  return $this->getRenderPageContainer();
81  }
+ Here is the call graph for this function:

◆ postOutputProcessing()

ilAssQuestionPageGUI::postOutputProcessing ( string  $a_output)

Definition at line 103 of file class.ilAssQuestionPageGUI.php.

References getOriginalPresentationTitle().

103  : string
104  {
105  $a_output = str_replace(
106  self::TEMP_PRESENTATION_TITLE_PLACEHOLDER,
108  $a_output
109  );
110 
111  $a_output = preg_replace("/src=\"\\.\\//ims", "src=\"" . ILIAS_HTTP_PATH . "/", $a_output);
112 
113  return $a_output;
114  }
+ Here is the call graph for this function:

◆ setOriginalPresentationTitle()

ilAssQuestionPageGUI::setOriginalPresentationTitle (   $originalPresentationTitle)

Definition at line 73 of file class.ilAssQuestionPageGUI.php.

References $originalPresentationTitle.

Referenced by showPage().

73  : void
74  {
75  $this->originalPresentationTitle = $originalPresentationTitle;
76  }
+ Here is the caller graph for this function:

◆ setQuestionActionsHTML()

ilAssQuestionPageGUI::setQuestionActionsHTML (   $a_html)

Set the HTML of a question actions block below the title.

Parameters
string$a_html

Definition at line 131 of file class.ilAssQuestionPageGUI.php.

131  : void
132  {
133  $this->questionActionsHTML = $a_html;
134  }

◆ setQuestionInfoHTML()

ilAssQuestionPageGUI::setQuestionInfoHTML (   $a_html)

Set the HTML of a question info block below the title (number, status, ...)

Parameters
string$a_html

Definition at line 122 of file class.ilAssQuestionPageGUI.php.

122  : void
123  {
124  $this->questionInfoHTML = $a_html;
125  }

◆ showPage()

ilAssQuestionPageGUI::showPage ( )

Definition at line 83 of file class.ilAssQuestionPageGUI.php.

References $config, ilPageObjectGUI\getPageConfig(), ilPageObjectGUI\getPresentationTitle(), setOriginalPresentationTitle(), ilPageObjectGUI\setPageConfig(), and ilPageObjectGUI\setPresentationTitle().

Referenced by ilTestExpressPageObjectGUI\executeCommand().

83  : string
84  {
85  if ($this->getPresentationTitle() !== null) {
87  $this->setPresentationTitle(self::TEMP_PRESENTATION_TITLE_PLACEHOLDER);
88  }
89 
90  // fau: testNav - enable page toc as placeholder for info and actions block (see self::insertPageToc)
91  $config = $this->getPageConfig();
92  $config->setEnablePageToc('y');
93  $this->setPageConfig($config);
94  // fau.
95  return parent::showPage();
96  }
if(!array_key_exists('PATH_INFO', $_SERVER)) $config
Definition: metadata.php:85
setPageConfig(ilPageConfig $a_val)
setPresentationTitle(string $a_title="")
setOriginalPresentationTitle($originalPresentationTitle)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Field Documentation

◆ $originalPresentationTitle

ilAssQuestionPageGUI::$originalPresentationTitle = ''
private

◆ $questionActionsHTML

ilAssQuestionPageGUI::$questionActionsHTML = ''
private

Definition at line 39 of file class.ilAssQuestionPageGUI.php.

◆ $questionInfoHTML

ilAssQuestionPageGUI::$questionInfoHTML = ''
private

Definition at line 38 of file class.ilAssQuestionPageGUI.php.

◆ TEMP_PRESENTATION_TITLE_PLACEHOLDER

const ilAssQuestionPageGUI::TEMP_PRESENTATION_TITLE_PLACEHOLDER = '___TEMP_PRESENTATION_TITLE_PLACEHOLDER___'

Definition at line 35 of file class.ilAssQuestionPageGUI.php.


The documentation for this class was generated from the following file: