ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
ilObjQuestionPoolGUI Class Reference

Class ilObjQuestionPoolGUI. More...

+ Inheritance diagram for ilObjQuestionPoolGUI:
+ Collaboration diagram for ilObjQuestionPoolGUI:

Public Member Functions

 __construct ()
 Constructor public. More...
 
 executeCommand ()
 execute command More...
 
 downloadFileObject ()
 download file More...
 
 fullscreenObject ()
 show fullscreen view More...
 
 filterObject ()
 set question list filter More...
 
 resetFilterObject ()
 resets filter More...
 
 download_paragraphObject ()
 download source code paragraph More...
 
 uploadQplObject ($questions_only=false)
 imports question(s) into the questionpool More...
 
 importVerifiedFileObject ()
 imports question(s) into the questionpool (after verification) More...
 
 cancelImportObject ()
 
 uploadObject ()
 imports question(s) into the questionpool More...
 
 importQuestionsObject (ilPropertyFormGUI $form=null)
 display the import form to import questions into the questionpool More...
 
createQuestionObject ()
 create new question More...
 
createQuestionForTestObject ()
 create new question More...
 
 afterSave (ilObject $a_new_object)
 save object public More...
 
 questionObject ()
 
 deleteQuestionsObject ()
 delete questions confirmation screen More...
 
 confirmDeleteQuestionsObject ()
 delete questions More...
 
 cancelDeleteQuestionsObject ()
 Cancel question deletion. More...
 
 exportQuestionObject ()
 export question More...
 
 filterQuestionBrowserObject ()
 
 resetQuestionBrowserObject ()
 
 questionsObject ()
 list questions of question pool More...
 
 updateObject ()
 
 pasteObject ()
 paste questios from the clipboard into the question pool More...
 
 copyObject ()
 copy one or more question objects to the clipboard More...
 
 moveObject ()
 mark one or more question objects for moving More...
 
 createExportExcel ()
 
editQuestionForTestObject ()
 edit question More...
 
 addLocatorItems ()
 
 setTitleAndDescription ()
 called by prepare output More...
 
 getTabs ()
 adds tabs to tab gui object More...
 
 infoScreenObject ()
 this one is called from the info button in the repository not very nice to set cmdClass/Cmd manually, if everything works through ilCtrl in the future this may be changed More...
 
 infoScreenForward ()
 show information screen More...
 
- Public Member Functions inherited from ilObjectGUI
 executeCommand ()
 execute command More...
 
 withReferences ()
 determines wether objects are referenced or not (got ref ids or not) More...
 
 setCreationMode ($a_mode=true)
 if true, a creation screen is displayed the current $_GET[ref_id] don't belong to the current class! the mode is determined in ilrepositorygui More...
 
 getCreationMode ()
 get creation mode More...
 
 prepareOutput ($a_show_subobjects=true)
 prepare output More...
 
 getAdminTabs ()
 administration tabs show only permissions and trash folder More...
 
 getHTML ()
 
 confirmedDeleteObject ()
 confirmed deletion of object -> objects are moved to trash or deleted immediately, if trash is disabled More...
 
 cancelDeleteObject ()
 cancel deletion of object More...
 
 cancelObject ()
 cancel action and go back to previous page public More...
 
 createObject ()
 create new object form More...
 
 cancelCreation ()
 cancel create action and go back to repository parent More...
 
 saveObject ()
 save object More...
 
 getDidacticTemplateVar ($a_type)
 Get didactic template setting from creation screen. More...
 
 putObjectInTree (ilObject $a_obj, $a_parent_node_id=null)
 Add object to tree at given position. More...
 
 editObject ()
 edit object More...
 
 addExternalEditFormCustom (ilPropertyFormGUI $a_form)
 
 updateObject ()
 updates object entry in object_data More...
 
 getFormAction ($a_cmd, $a_formaction="")
 get form action for command (command is method name without "Object", e.g. More...
 
 isVisible ($a_ref_id, $a_type)
 
 viewObject ()
 list childs of current object More...
 
 deleteObject ($a_error=false)
 Display deletion confirmation screen. More...
 
 cloneAllObject ()
 Clone single (not container object) Method is overwritten in ilContainerGUI. More...
 
 redirectAfterCreation ()
 Redirect after creation, see https://docu.ilias.de/goto_docu_wiki_wpage_5035_1357.html. More...
 

Static Public Member Functions

static _goto ($a_target)
 Redirect script to call a test with the question pool reference id. More...
 
- Static Public Member Functions inherited from ilObjectGUI
static _gotoRepositoryRoot ($a_raise_error=false)
 Goto repository root. More...
 
static _gotoRepositoryNode ($a_ref_id, $a_cmd="frameset")
 Goto repository root. More...
 

Data Fields

 $object
 
- Data Fields inherited from ilObjectGUI
const COPY_WIZARD_NEEDS_PAGE = 1
 
 $objDefinition
 
 $tpl
 
 $tree
 
 $lng
 
 $data
 
 $object
 
 $ref_id
 
 $obj_id
 
 $maxcount
 
 $formaction
 
 $return_location
 
 $target_frame
 
 $tab_target_script
 
 $actions
 
 $sub_objects
 
 $omit_locator = false
 
const CFORM_NEW = 1
 
const CFORM_IMPORT = 2
 
const CFORM_CLONE = 3
 

Protected Member Functions

 exportObject ()
 Gateway for exports initiated from workspace, as there is a generic forward to {objTypeMainGUI}::export() More...
 
 getImportQuestionsForm ()
 
 renoveImportFailsObject ()
 
 fetchAuthoringQuestionIdParamater ()
 
 initImportForm ($a_new_type)
 
 importFileObject ($parent_id=null, $a_catch_errors=true)
 form for new questionpool object import More...
 
- Protected Member Functions inherited from ilObjectGUI
 getObjectService ()
 Get object service. More...
 
 assignObject ()
 
 setTitleAndDescription ()
 called by prepare output More...
 
 initHeaderAction ($a_sub_type=null, $a_sub_id=null)
 Add header action menu. More...
 
 insertHeaderAction ($a_list_gui)
 Insert header action into main template. More...
 
 addHeaderAction ()
 Add header action menu. More...
 
 redrawHeaderActionObject ()
 Ajax call: redraw action header only. More...
 
 showMountWebfolderIcon ()
 
 setTabs ()
 set admin tabs public More...
 
 setAdminTabs ()
 set admin tabs public More...
 
 setLocator ()
 set Locator More...
 
 addLocatorItems ()
 should be overwritten to add object specific items (repository items are preloaded) More...
 
 omitLocator ($a_omit=true)
 
 addAdminLocatorItems ($a_do_not_add_object=false)
 should be overwritten to add object specific items (repository items are preloaded) More...
 
 initCreationForms ($a_new_type)
 Init creation froms. More...
 
 getCreationFormsHTML (array $a_forms)
 Get HTML for creation forms (accordion) More...
 
 initCreateForm ($a_new_type)
 Init object creation form. More...
 
 initDidacticTemplate (ilPropertyFormGUI $form)
 Show didactic template types. More...
 
 addDidacticTemplateOptions (array &$a_options)
 Add custom templates. More...
 
 afterSave (ilObject $a_new_object)
 Post (successful) object creation hook. More...
 
 initEditForm ()
 Init object edit form. More...
 
 initEditCustomForm (ilPropertyFormGUI $a_form)
 Add custom fields to update form. More...
 
 getEditFormValues ()
 Get values for edit form. More...
 
 getEditFormCustomValues (array &$a_values)
 Add values to custom edit fields. More...
 
 validateCustom (ilPropertyFormGUI $a_form)
 Validate custom values (if not possible with checkInput()) More...
 
 updateCustom (ilPropertyFormGUI $a_form)
 Insert custom update form values into object. More...
 
 afterUpdate ()
 Post (successful) object update hook. More...
 
 initImportForm ($a_new_type)
 Init object import form. More...
 
 importFileObject ($parent_id=null, $a_catch_errors=true)
 Import. More...
 
 afterImport (ilObject $a_new_object)
 Post (successful) object import hook. More...
 
 setFormAction ($a_cmd, $a_formaction)
 set specific form action for command More...
 
 getReturnLocation ($a_cmd, $a_location="")
 get return location for command (command is method name without "Object", e.g. More...
 
 setReturnLocation ($a_cmd, $a_location)
 set specific return location for command More...
 
 getTargetFrame ($a_cmd, $a_target_frame="")
 get target frame for command (command is method name without "Object", e.g. More...
 
 setTargetFrame ($a_cmd, $a_target_frame)
 set specific target frame for command More...
 
 showPossibleSubObjects ()
 show possible subobjects (pulldown menu) More...
 
 getTemplateFile ($a_cmd, $a_type="")
 get a template blockfile format: tpl. More...
 
 getTabs ()
 get tabs abstract method. More...
 
 __showButton ($a_cmd, $a_text, $a_target='')
 
 hitsperpageObject ()
 
__initTableGUI ()
 
 __setTableGUIBasicData (&$tbl, &$result_set, $a_from="")
 standard implementation for tables use 'from' variable use different initial setting of table More...
 
 redirectToRefId ($a_ref_id, $a_cmd="")
 redirects to (repository) view per ref id usually to a container and usually used at the end of a save/import method where the object gui type (of the new object) doesn't match with the type of the current $_GET["ref_id"] value More...
 
 fillCloneTemplate ($a_tpl_varname, $a_type)
 Fill object clone template This method can be called from any object GUI class that wants to offer object cloning. More...
 
 getCenterColumnHTML ()
 Get center column. More...
 
 getRightColumnHTML ()
 Display right column. More...
 
 setColumnSettings (ilColumnGUI $column_gui)
 May be overwritten in subclasses. More...
 
 checkPermission ($a_perm, $a_cmd="", $a_type="", $a_ref_id=null)
 Check permission and redirect on error. More...
 
 checkPermissionBool ($a_perm, $a_cmd="", $a_type="", $a_ref_id=null)
 Check permission. More...
 
 enableDragDropFileUpload ()
 Enables the file upload into this object by dropping files. More...
 
 handleAutoRating (ilObject $a_new_obj)
 Activate rating automatically if parent container setting. More...
 

Private Member Functions

 createQuestionFormObject ()
 
 buildCreateQuestionForm ()
 
 isSkillsTabRequired ()
 
 addSettingsSubTabs (ilTabsGUI $tabs)
 
 buildQuestionBrowserTableGUI ($taxIds)
 

Additional Inherited Members

- Protected Attributes inherited from ilObjectGUI
 $ilErr
 
 $locator
 
 $user
 
 $access
 
 $settings
 
 $rbacreview
 
 $toolbar
 
 $tmp_import_dir
 
 $tabs_gui = null
 
 $ctrl
 
 $object_service
 

Detailed Description

Constructor & Destructor Documentation

◆ __construct()

ilObjQuestionPoolGUI::__construct ( )

Constructor public.

Definition at line 46 of file class.ilObjQuestionPoolGUI.php.

References $_GET, $DIC, $ilCtrl, and ilObjectGUI\$lng.

47  {
48  global $DIC;
49  $lng = $DIC['lng'];
50  $ilCtrl = $DIC['ilCtrl'];
51  $rbacsystem = $DIC['rbacsystem'];
52  $lng->loadLanguageModule("assessment");
53  $this->type = "qpl";
54  $this->ctrl = &$ilCtrl;
55 
56  $this->ctrl->saveParameter($this, array(
57  "ref_id", "test_ref_id", "calling_test", "test_express_mode", "q_id", 'tax_node', 'calling_consumer', 'consumer_context'
58  ));
59  $this->ctrl->saveParameter($this, "calling_consumer");
60  $this->ctrl->saveParameterByClass('ilAssQuestionPageGUI', 'calling_consumer');
61  $this->ctrl->saveParameterByClass('ilAssQuestionPageGUI', 'consumer_context');
62  $this->ctrl->saveParameterByClass('ilobjquestionpoolgui', 'calling_consumer');
63  $this->ctrl->saveParameterByClass('ilobjquestionpoolgui', 'consumer_context');
64 
65  parent::__construct("", $_GET["ref_id"], true, false);
66  }
global $DIC
Definition: saml.php:7
$_GET["client_id"]
global $ilCtrl
Definition: ilias.php:18

Member Function Documentation

◆ _goto()

static ilObjQuestionPoolGUI::_goto (   $a_target)
static

Redirect script to call a test with the question pool reference id.

Redirect script to call a test with the question pool reference id

Parameters
integer$a_targetThe reference id of the question pool public

Definition at line 1656 of file class.ilObjQuestionPoolGUI.php.

References $_GET, $DIC, ilObjectGUI\$ilErr, ilObjectGUI\$lng, ilObjectGUI\_gotoRepositoryRoot(), ilObject\_lookupObjId(), ilObject\_lookupTitle(), exit, and ilUtil\sendInfo().

1657  {
1658  global $DIC;
1659  $ilAccess = $DIC['ilAccess'];
1660  $ilErr = $DIC['ilErr'];
1661  $lng = $DIC['lng'];
1662 
1663  if ($ilAccess->checkAccess("write", "", $a_target) || $ilAccess->checkAccess('read', '', $a_target)) {
1664  $_GET['cmdClass'] = 'ilObjQuestionPoolGUI';
1665  $_GET['cmd'] = 'questions';
1666  $_GET['baseClass'] = 'ilRepositoryGUI';
1667  $_GET["ref_id"] = $a_target;
1668  include_once("ilias.php");
1669  exit;
1670  } elseif ($ilAccess->checkAccess("read", "", ROOT_FOLDER_ID)) {
1671  ilUtil::sendInfo(sprintf(
1672  $lng->txt("msg_no_perm_read_item"),
1674  ), true);
1676  }
1677  $ilErr->raiseError($lng->txt("msg_no_perm_read_lm"), $ilErr->FATAL);
1678  }
global $DIC
Definition: saml.php:7
$_GET["client_id"]
static _gotoRepositoryRoot($a_raise_error=false)
Goto repository root.
static _lookupTitle($a_id)
lookup object title
static sendInfo($a_info="", $a_keep=false)
Send Info Message to Screen.
static _lookupObjId($a_id)
exit
Definition: backend.php:16
+ Here is the call graph for this function:

◆ addLocatorItems()

ilObjQuestionPoolGUI::addLocatorItems ( )

Definition at line 1360 of file class.ilObjQuestionPoolGUI.php.

References $_GET, $DIC, $title, assQuestionGUI\_getQuestionGUI(), and assQuestion\_getQuestionTypeName().

1361  {
1362  global $DIC;
1363  $ilLocator = $DIC['ilLocator'];
1364  switch ($this->ctrl->getCmd()) {
1365  case "create":
1366  case "importFile":
1367  case "cancel":
1368  break;
1369  default:
1370  $ilLocator->addItem($this->object->getTitle(), $this->ctrl->getLinkTarget($this, ""), "", $_GET["ref_id"]);
1371  break;
1372  }
1373  if ($_GET["q_id"] > 0) {
1374  include_once "./Modules/TestQuestionPool/classes/class.assQuestionGUI.php";
1375  $q_gui = assQuestionGUI::_getQuestionGUI("", $_GET["q_id"]);
1376  if ($q_gui->object instanceof assQuestion) {
1377  $q_gui->object->setObjId($this->object->getId());
1378  $title = $q_gui->object->getTitle();
1379  if (!$title) {
1380  $title = $this->lng->txt('new') . ': ' . assQuestion::_getQuestionTypeName($q_gui->object->getQuestionType());
1381  }
1382  $ilLocator->addItem($title, $this->ctrl->getLinkTargetByClass(get_class($q_gui), "editQuestion"));
1383  } else {
1384  // Workaround for context issues: If no object was found, redirect without q_id parameter
1385  $this->ctrl->setParameter($this, 'q_id', '');
1386  $this->ctrl->redirect($this);
1387  }
1388  }
1389  }
global $DIC
Definition: saml.php:7
$_GET["client_id"]
Abstract basic class which is to be extended by the concrete assessment question type classes...
static _getQuestionTypeName($type_tag)
Return the translation for a given question type tag.
static _getQuestionGUI($question_type, $question_id=-1)
Creates a question gui representation and returns the alias to the question gui note: please do not u...
+ Here is the call graph for this function:

◆ addSettingsSubTabs()

ilObjQuestionPoolGUI::addSettingsSubTabs ( ilTabsGUI  $tabs)
private

Definition at line 1596 of file class.ilObjQuestionPoolGUI.php.

References ilTabsGUI\addSubTabTarget().

Referenced by getTabs().

1597  {
1598  $tabs->addSubTabTarget(
1599  'qpl_settings_subtab_general',
1600  $this->ctrl->getLinkTargetByClass('ilObjQuestionPoolSettingsGeneralGUI'),
1601  '',
1602  'ilObjQuestionPoolSettingsGeneralGUI'
1603  );
1604 
1605  $tabs->addSubTabTarget(
1606  'qpl_settings_subtab_taxonomies',
1607  $this->ctrl->getLinkTargetByClass('ilObjTaxonomyGUI', 'editAOTaxonomySettings'),
1608  '',
1609  'ilObjTaxonomyGUI'
1610  );
1611  }
addSubTabTarget( $a_text, $a_link, $a_cmd="", $a_cmdClass="", $a_frame="", $a_activate=false, $a_dir_text=false)
DEPRECATED.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ afterSave()

ilObjQuestionPoolGUI::afterSave ( ilObject  $a_new_object)

save object public

Definition at line 866 of file class.ilObjQuestionPoolGUI.php.

References ilObject\getRefId(), and ilUtil\redirect().

867  {
868  // always send a message
869  ilUtil::sendSuccess($this->lng->txt("object_added"), true);
870 
871  ilUtil::redirect("ilias.php?ref_id=" . $a_new_object->getRefId() .
872  "&baseClass=ilObjQuestionPoolGUI");
873  }
getRefId()
get reference id public
static redirect($a_script)
+ Here is the call graph for this function:

◆ buildCreateQuestionForm()

ilObjQuestionPoolGUI::buildCreateQuestionForm ( )
private

Definition at line 1145 of file class.ilObjQuestionPoolGUI.php.

References $_POST, $d, ilObjectGUI\$data, $DIC, $form, $ilUser, PHPMailer\PHPMailer\$options, $si, assQuestion\ADDITIONAL_CONTENT_EDITING_MODE_DEFAULT, assQuestion\ADDITIONAL_CONTENT_EDITING_MODE_PAGE_OBJECT, ilRadioGroupInputGUI\addOption(), ilObjAssessmentFolder\isAdditionalQuestionContentEditingModePageObjectEnabled(), ilSelectInputGUI\setOptions(), and ilUtil\stripSlashes().

Referenced by createQuestionFormObject().

1146  {
1147  global $DIC;
1148  $ilUser = $DIC['ilUser'];
1149 
1150  // form
1151 
1152  require_once("Services/Form/classes/class.ilPropertyFormGUI.php");
1153  $form = new ilPropertyFormGUI();
1154  $form->setTitle($this->lng->txt('ass_create_question'));
1155  $form->setFormAction($this->ctrl->getFormAction($this));
1156 
1157  // question type
1158 
1159  $options = array();
1160  foreach ($this->object->getQuestionTypes(false, true, false) as $translation => $data) {
1161  $options[$data['type_tag']] = $translation;
1162  }
1163 
1164  require_once("Services/Form/classes/class.ilSelectInputGUI.php");
1165  $si = new ilSelectInputGUI($this->lng->txt('question_type'), 'sel_question_types');
1166  $si->setOptions($options);
1167  //$si->setValue($ilUser->getPref("tst_lastquestiontype"));
1168 
1169  $form->addItem($si);
1170 
1171  // content editing mode
1172 
1174  $ri = new ilRadioGroupInputGUI($this->lng->txt("tst_add_quest_cont_edit_mode"), "add_quest_cont_edit_mode");
1175 
1176  $ri->addOption(new ilRadioOption(
1177  $this->lng->txt('tst_add_quest_cont_edit_mode_default'),
1179  ));
1180 
1181  $ri->addOption(new ilRadioOption(
1182  $this->lng->txt('tst_add_quest_cont_edit_mode_page_object'),
1184  ));
1185 
1187 
1188  $form->addItem($ri, true);
1189  } else {
1190  $hi = new ilHiddenInputGUI("question_content_editing_type");
1192  $form->addItem($hi, true);
1193  }
1194 
1195  // commands
1196 
1197  $form->addCommandButton('createQuestion', $this->lng->txt('create'));
1198  $form->addCommandButton('questions', $this->lng->txt('cancel'));
1199 
1200  return $form;
1201  }
This class represents an option in a radio group.
This class represents a selection list property in a property form.
This class represents a property form user interface.
global $DIC
Definition: saml.php:7
const ADDITIONAL_CONTENT_EDITING_MODE_PAGE_OBJECT
constant for additional content editing mode "pageobject"
This class represents a hidden form property in a property form.
This class represents a property in a property form.
addOption($a_option)
Add Option.
if(isset($_POST['submit'])) $form
$ilUser
Definition: imgupload.php:18
const ADDITIONAL_CONTENT_EDITING_MODE_DEFAULT
constant for additional content editing mode "default"
static isAdditionalQuestionContentEditingModePageObjectEnabled()
returns the fact wether content editing with ilias page editor is enabled for questions or not ...
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ buildQuestionBrowserTableGUI()

ilObjQuestionPoolGUI::buildQuestionBrowserTableGUI (   $taxIds)
private
Parameters
array$taxIdsilRbacSystem $rbacsystem ilDBInterface $ilDB ilLanguage $lng ilPluginAdmin $ilPluginAdmin
Returns
ilQuestionBrowserTableGUI

Definition at line 1688 of file class.ilObjQuestionPoolGUI.php.

References $_GET, ilObjectGUI\$data, $DIC, $ilDB, ilObjectGUI\$lng, and ilTree\readRootId().

Referenced by executeCommand(), and questionsObject().

1689  {
1690  global $DIC;
1691  $rbacsystem = $DIC['rbacsystem'];
1692  $ilDB = $DIC['ilDB'];
1693  $lng = $DIC['lng'];
1694  $ilPluginAdmin = $DIC['ilPluginAdmin'];
1695 
1696  $writeAccess = (bool) $rbacsystem->checkAccess('write', $_GET['ref_id']);
1697  $enableCommenting = $writeAccess;
1698 
1699  include_once "./Modules/TestQuestionPool/classes/tables/class.ilQuestionBrowserTableGUI.php";
1700  $table_gui = new ilQuestionBrowserTableGUI($this, 'questions', $writeAccess, false, $taxIds, $enableCommenting);
1701  $table_gui->setEditable($writeAccess);
1702 
1703  require_once 'Modules/TestQuestionPool/classes/class.ilAssQuestionList.php';
1704  $questionList = new ilAssQuestionList($ilDB, $lng, $ilPluginAdmin);
1705  $questionList->setParentObjId($this->object->getId());
1706 
1707  foreach ($table_gui->getFilterItems() as $item) {
1708  if (substr($item->getPostVar(), 0, strlen('tax_')) == 'tax_') {
1709  $v = $item->getValue();
1710 
1711  if (is_array($v) && count($v) && !(int) $v[0]) {
1712  continue;
1713  }
1714 
1715  $taxId = substr($item->getPostVar(), strlen('tax_'));
1716 
1717  $questionList->addTaxonomyFilter(
1718  $taxId,
1719  $item->getValue(),
1720  $this->object->getId(),
1721  $this->object->getType()
1722  );
1723  } elseif ($item->getValue() !== false) {
1724  $questionList->addFieldFilter($item->getPostVar(), $item->getValue());
1725  }
1726  }
1727 
1728  if ($this->object->isNavTaxonomyActive() && (int) $_GET['tax_node']) {
1729  require_once 'Services/Taxonomy/classes/class.ilTaxonomyTree.php';
1730  $taxTree = new ilTaxonomyTree($this->object->getNavTaxonomyId());
1731  $rootNodeId = $taxTree->readRootId();
1732 
1733  if ((int) $_GET['tax_node'] != $rootNodeId) {
1734  $questionList->addTaxonomyFilter(
1735  $this->object->getNavTaxonomyId(),
1736  array((int) $_GET['tax_node']),
1737  $this->object->getId(),
1738  $this->object->getType()
1739  );
1740  }
1741  }
1742 
1743  $questionList->load();
1744  $data = $questionList->getQuestionDataArray();
1745 
1746  $table_gui->setQuestionData($data);
1747 
1748  return $table_gui;
1749  }
global $DIC
Definition: saml.php:7
$_GET["client_id"]
global $ilDB
readRootId()
read root id from database
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ cancelDeleteQuestionsObject()

ilObjQuestionPoolGUI::cancelDeleteQuestionsObject ( )

Cancel question deletion.

Definition at line 935 of file class.ilObjQuestionPoolGUI.php.

936  {
937  $this->ctrl->redirect($this, "questions");
938  }

◆ cancelImportObject()

ilObjQuestionPoolGUI::cancelImportObject ( )

Definition at line 748 of file class.ilObjQuestionPoolGUI.php.

References $_POST.

749  {
750  if ($_POST["questions_only"] == 1) {
751  $this->ctrl->redirect($this, "questions");
752  } else {
753  $this->ctrl->redirect($this, "cancel");
754  }
755  }
$_POST["username"]

◆ confirmDeleteQuestionsObject()

ilObjQuestionPoolGUI::confirmDeleteQuestionsObject ( )

delete questions

Definition at line 916 of file class.ilObjQuestionPoolGUI.php.

References $_POST, and $key.

917  {
918  // delete questions after confirmation
919  foreach ($_POST["q_id"] as $key => $value) {
920  $this->object->deleteQuestion($value);
921  $this->object->cleanupClipboard($value);
922  }
923  if (count($_POST["q_id"])) {
924  ilUtil::sendSuccess($this->lng->txt("qpl_questions_deleted"), true);
925  }
926 
927  $this->ctrl->setParameter($this, 'q_id', '');
928 
929  $this->ctrl->redirect($this, "questions");
930  }
$key
Definition: croninfo.php:18
$_POST["username"]

◆ copyObject()

ilObjQuestionPoolGUI::copyObject ( )

copy one or more question objects to the clipboard

Definition at line 1268 of file class.ilObjQuestionPoolGUI.php.

References $_GET, $_POST, $key, and ilUtil\sendInfo().

1269  {
1270  if (isset($_POST["q_id"]) && is_array($_POST["q_id"]) && count($_POST["q_id"]) > 0) {
1271  foreach ($_POST["q_id"] as $key => $value) {
1272  $this->object->copyToClipboard($value);
1273  }
1274  ilUtil::sendInfo($this->lng->txt("qpl_copy_insert_clipboard"), true);
1275  } elseif (isset($_GET['q_id']) && $_GET['q_id'] > 0) {
1276  $this->object->copyToClipboard((int) $_GET['q_id']);
1277  ilUtil::sendInfo($this->lng->txt("qpl_copy_insert_clipboard"), true);
1278  } else {
1279  ilUtil::sendInfo($this->lng->txt("qpl_copy_select_none"), true);
1280  }
1281  $this->ctrl->redirect($this, "questions");
1282  }
$_GET["client_id"]
static sendInfo($a_info="", $a_keep=false)
Send Info Message to Screen.
$key
Definition: croninfo.php:18
$_POST["username"]
+ Here is the call graph for this function:

◆ createExportExcel()

ilObjQuestionPoolGUI::createExportExcel ( )

Definition at line 1303 of file class.ilObjQuestionPoolGUI.php.

References $_GET, and $DIC.

1304  {
1305  global $DIC;
1306  $rbacsystem = $DIC['rbacsystem'];
1307  if ($rbacsystem->checkAccess("write", $_GET['ref_id'])) {
1308  include_once("./Modules/TestQuestionPool/classes/class.ilQuestionpoolExport.php");
1309  $question_ids = &$this->object->getAllQuestionIds();
1310  $qpl_exp = new ilQuestionpoolExport($this->object, 'xls', $question_ids);
1311  $qpl_exp->buildExportFile();
1312  $this->ctrl->redirectByClass("ilquestionpoolexportgui", "");
1313  }
1314  }
global $DIC
Definition: saml.php:7
$_GET["client_id"]
Export class for questionpools.

◆ createQuestionFormObject()

ilObjQuestionPoolGUI::createQuestionFormObject ( )
private

Definition at line 1127 of file class.ilObjQuestionPoolGUI.php.

References $DIC, $form, buildCreateQuestionForm(), and ilObjAssessmentFolder\isAdditionalQuestionContentEditingModePageObjectEnabled().

1128  {
1129  global $DIC; /* @var \ILIAS\DI\Container $DIC */
1130  $ilHelp = $DIC['ilHelp']; /* @var ilHelpGUI $ilHelp */
1131 
1132  $ilHelp->setScreenId('assQuestions');
1133 
1135  $ilHelp->setSubScreenId('createQuestion_editMode');
1136  } else {
1137  $ilHelp->setSubScreenId('createQuestion');
1138  }
1139 
1140  $form = $this->buildCreateQuestionForm();
1141 
1142  $this->tpl->setContent($this->ctrl->getHTML($form));
1143  }
global $DIC
Definition: saml.php:7
if(isset($_POST['submit'])) $form
static isAdditionalQuestionContentEditingModePageObjectEnabled()
returns the fact wether content editing with ilias page editor is enabled for questions or not ...
+ Here is the call graph for this function:

◆ createQuestionForTestObject()

& ilObjQuestionPoolGUI::createQuestionForTestObject ( )

create new question

Definition at line 832 of file class.ilObjQuestionPoolGUI.php.

References $_GET, assQuestionGUI\_getQuestionGUI(), assQuestion\ADDITIONAL_CONTENT_EDITING_MODE_DEFAULT, and ilObjAssessmentFolder\isAdditionalQuestionContentEditingModePageObjectEnabled().

833  {
834  if (!$_REQUEST['q_id']) {
835  require_once 'Modules/Test/classes/class.ilObjAssessmentFolder.php';
837  $addContEditMode = $_REQUEST['add_quest_cont_edit_mode'];
838  } else {
840  }
841 
842  include_once "./Modules/TestQuestionPool/classes/class.assQuestionGUI.php";
843  $q_gui = &assQuestionGUI::_getQuestionGUI($_GET["sel_question_types"]);
844  $q_gui->object->setObjId($this->object->getId());
845  $q_gui->object->setAdditionalContentEditingMode($addContEditMode);
846  $q_gui->object->createNewQuestion();
847 
848  $class = get_class($q_gui);
849  $qId = $q_gui->object->getId();
850  } else {
851  $class = $_GET["sel_question_types"] . 'gui';
852  $qId = $_REQUEST['q_id'];
853  }
854 
855  $this->ctrl->setParameterByClass($class, "q_id", $qId);
856  $this->ctrl->setParameterByClass($class, "sel_question_types", $_REQUEST["sel_question_types"]);
857  $this->ctrl->setParameterByClass($class, "prev_qid", $_REQUEST["prev_qid"]);
858 
859  $this->ctrl->redirectByClass($class, "editQuestion");
860  }
$_GET["client_id"]
static _getQuestionGUI($question_type, $question_id=-1)
Creates a question gui representation and returns the alias to the question gui note: please do not u...
const ADDITIONAL_CONTENT_EDITING_MODE_DEFAULT
constant for additional content editing mode "default"
static isAdditionalQuestionContentEditingModePageObjectEnabled()
returns the fact wether content editing with ilias page editor is enabled for questions or not ...
+ Here is the call graph for this function:

◆ createQuestionObject()

& ilObjQuestionPoolGUI::createQuestionObject ( )

create new question

Definition at line 810 of file class.ilObjQuestionPoolGUI.php.

References $_POST, assQuestionGUI\_getQuestionGUI(), assQuestion\ADDITIONAL_CONTENT_EDITING_MODE_DEFAULT, and ilObjAssessmentFolder\isAdditionalQuestionContentEditingModePageObjectEnabled().

811  {
813  $addContEditMode = $_POST['add_quest_cont_edit_mode'];
814  } else {
816  }
817 
818  include_once "./Modules/TestQuestionPool/classes/class.assQuestionGUI.php";
819  $q_gui = &assQuestionGUI::_getQuestionGUI($_POST["sel_question_types"]);
820  $this->object->addQuestionChangeListeners($q_gui->object);
821  $q_gui->object->setObjId($this->object->getId());
822  $q_gui->object->setAdditionalContentEditingMode($addContEditMode);
823  $q_gui->object->createNewQuestion();
824  $this->ctrl->setParameterByClass(get_class($q_gui), "q_id", $q_gui->object->getId());
825  $this->ctrl->setParameterByClass(get_class($q_gui), "sel_question_types", $_POST["sel_question_types"]);
826  $this->ctrl->redirectByClass(get_class($q_gui), "editQuestion");
827  }
static _getQuestionGUI($question_type, $question_id=-1)
Creates a question gui representation and returns the alias to the question gui note: please do not u...
const ADDITIONAL_CONTENT_EDITING_MODE_DEFAULT
constant for additional content editing mode "default"
static isAdditionalQuestionContentEditingModePageObjectEnabled()
returns the fact wether content editing with ilias page editor is enabled for questions or not ...
$_POST["username"]
+ Here is the call graph for this function:

◆ deleteQuestionsObject()

ilObjQuestionPoolGUI::deleteQuestionsObject ( )

delete questions confirmation screen

Definition at line 885 of file class.ilObjQuestionPoolGUI.php.

References $_GET, $_POST, $DIC, ilUtil\sendInfo(), ilUtil\sendQuestion(), and ilTable2GUI\setShowRowsSelector().

886  {
887  global $DIC;
888  $rbacsystem = $DIC['rbacsystem'];
889 
890  $questionIdsToDelete = isset($_POST['q_id']) ? (array) $_POST['q_id'] : array();
891  if (0 === count($questionIdsToDelete) && isset($_GET['q_id'])) {
892  $questionIdsToDelete = array($_GET['q_id']);
893  }
894 
895  $questionIdsToDelete = array_filter(array_map('intval', $questionIdsToDelete));
896  if (0 === count($questionIdsToDelete)) {
897  ilUtil::sendInfo($this->lng->txt("qpl_delete_select_none"), true);
898  $this->ctrl->redirect($this, "questions");
899  }
900 
901  ilUtil::sendQuestion($this->lng->txt("qpl_confirm_delete_questions"));
902  $deleteable_questions = &$this->object->getDeleteableQuestionDetails($questionIdsToDelete);
903  include_once "./Modules/TestQuestionPool/classes/tables/class.ilQuestionBrowserTableGUI.php";
904  $table_gui = new ilQuestionBrowserTableGUI($this, 'questions', (($rbacsystem->checkAccess('write', (int) $_GET['ref_id']) ? true : false)), true);
905  $table_gui->setShowRowsSelector(false);
906  $table_gui->setLimit(PHP_INT_MAX);
907  $table_gui->setEditable($rbacsystem->checkAccess('write', (int) $_GET['ref_id']));
908  $table_gui->setData($deleteable_questions);
909  $this->tpl->setVariable('ADM_CONTENT', $table_gui->getHTML());
910  }
global $DIC
Definition: saml.php:7
$_GET["client_id"]
static sendInfo($a_info="", $a_keep=false)
Send Info Message to Screen.
static sendQuestion($a_info="", $a_keep=false)
Send Question to Screen.
setShowRowsSelector($a_value)
Toggle rows-per-page selector.
$_POST["username"]
+ Here is the call graph for this function:

◆ download_paragraphObject()

ilObjQuestionPoolGUI::download_paragraphObject ( )

download source code paragraph

Definition at line 470 of file class.ilObjQuestionPoolGUI.php.

References $_GET, and exit.

471  {
472  include_once("./Modules/TestQuestionPool/classes/class.ilAssQuestionPage.php");
473  $pg_obj = new ilAssQuestionPage($_GET["pg_id"]);
474  $pg_obj->send_paragraph($_GET["par_id"], $_GET["downloadtitle"]);
475  exit;
476  }
$_GET["client_id"]
Question page object.
exit
Definition: backend.php:16

◆ downloadFileObject()

ilObjQuestionPoolGUI::downloadFileObject ( )

download file

Definition at line 429 of file class.ilObjQuestionPoolGUI.php.

References $_GET, and exit.

430  {
431  $file = explode("_", $_GET["file_id"]);
432  include_once("./Modules/File/classes/class.ilObjFile.php");
433  $fileObj = new ilObjFile($file[count($file) - 1], false);
434  $fileObj->sendFile();
435  exit;
436  }
$_GET["client_id"]
exit
Definition: backend.php:16

◆ editQuestionForTestObject()

& ilObjQuestionPoolGUI::editQuestionForTestObject ( )

edit question

Definition at line 1319 of file class.ilObjQuestionPoolGUI.php.

References $_GET, and assQuestionGUI\_getQuestionGUI().

1320  {
1321  include_once "./Modules/TestQuestionPool/classes/class.assQuestionGUI.php";
1322  $q_gui = &assQuestionGUI::_getQuestionGUI("", $_GET["q_id"]);
1323  $this->ctrl->redirectByClass(get_class($q_gui), "editQuestion");
1324  }
$_GET["client_id"]
static _getQuestionGUI($question_type, $question_id=-1)
Creates a question gui representation and returns the alias to the question gui note: please do not u...
+ Here is the call graph for this function:

◆ executeCommand()

ilObjQuestionPoolGUI::executeCommand ( )

execute command

ilLocatorGUI $ilLocator ilAccessHandler $ilAccess ilNavigationHistory $ilNavigationHistory ilTemplate $tpl ilCtrl $ilCtrl ilTabsGUI $ilTabs ilLanguage $lng ILIAS $ilias

Definition at line 80 of file class.ilObjQuestionPoolGUI.php.

References $_GET, $_POST, $DIC, $ilCtrl, $ilDB, ilObjectGUI\$ilErr, $ilUser, ilObjectGUI\$lng, ilObjectGUI\$ref_id, $ret, ilObjectGUI\$tpl, assQuestionGUI\_getQuestionGUI(), buildQuestionBrowserTableGUI(), assQuestionGUI\EDIT_CONTEXT_AUTHORING, fetchAuthoringQuestionIdParamater(), ilObjStyleSheet\getContentStylePath(), ilObjectGUI\getCreationMode(), ilCommonActionDispatcherGUI\getInstanceFromAjaxCall(), ilUtil\getStyleSheetLocation(), ilObjStyleSheet\getSyntaxStylePath(), infoScreenForward(), ilObjectGUI\prepareOutput(), and assQuestionGUI\RENDER_PURPOSE_PREVIEW.

81  {
82  global $DIC;
83  $ilUser = $DIC['ilUser'];
84  $ilLocator = $DIC['ilLocator'];
85  $ilAccess = $DIC['ilAccess'];
86  $ilNavigationHistory = $DIC['ilNavigationHistory'];
87  $tpl = $DIC['tpl'];
88  $ilCtrl = $DIC['ilCtrl'];
89  $ilErr = $DIC['ilErr'];
90  $ilTabs = $DIC['ilTabs'];
91  $lng = $DIC['lng'];
92  $ilDB = $DIC['ilDB'];
93  $ilPluginAdmin = $DIC['ilPluginAdmin'];
94  $ilias = $DIC['ilias'];
95 
96  $writeAccess = $ilAccess->checkAccess("write", "", $_GET["ref_id"]);
97 
98  if ((!$ilAccess->checkAccess("read", "", $_GET["ref_id"])) && (!$ilAccess->checkAccess("visible", "", $_GET["ref_id"]))) {
99  global $DIC;
100  $ilias = $DIC['ilias'];
101  $ilias->raiseError($this->lng->txt("permission_denied"), $ilias->error_obj->MESSAGE);
102  }
103 
104  // add entry to navigation history
105  if (!$this->getCreationMode() &&
106  $ilAccess->checkAccess("read", "", $_GET["ref_id"])) {
107  if ('qpl' == $this->object->getType()) {
108  $ilNavigationHistory->addItem(
109  $_GET["ref_id"],
110  "ilias.php?baseClass=ilObjQuestionPoolGUI&cmd=questions&ref_id=" . $_GET["ref_id"],
111  "qpl"
112  );
113  }
114  }
115 
116  $cmd = $this->ctrl->getCmd("questions");
117  $next_class = $this->ctrl->getNextClass($this);
118 
119  if (in_array($next_class, array('', 'ilobjquestionpoolgui')) && $cmd == 'questions') {
120  $_GET['q_id'] = '';
121  }
122 
123  $this->prepareOutput();
124 
125  $this->ctrl->setReturn($this, "questions");
126 
127  $this->tpl->addCss(ilUtil::getStyleSheetLocation("output", "test_print.css", "Modules/Test"), "print");
128  $this->tpl->addCss(ilUtil::getStyleSheetLocation("output", "ta.css", "Modules/Test"), "screen");
129 
130  if ($_GET["q_id"] < 1) {
131  $q_type = ($_POST["sel_question_types"] != "")
132  ? $_POST["sel_question_types"]
133  : $_GET["sel_question_types"];
134  }
135  if ($cmd != "createQuestion" && $cmd != "createQuestionForTest"
136  && $next_class != "ilassquestionpagegui") {
137  if (($_GET["test_ref_id"] != "") or ($_GET["calling_test"])) {
138  $ref_id = $_GET["test_ref_id"];
139  if (!$ref_id) {
140  $ref_id = $_GET["calling_test"];
141  }
142  }
143  }
144  switch ($next_class) {
145  case "ilcommonactiondispatchergui":
146  include_once("Services/Object/classes/class.ilCommonActionDispatcherGUI.php");
148  $this->ctrl->forwardCommand($gui);
149  break;
150 
151  case 'ilobjectmetadatagui':
152  if (!$ilAccess->checkAccess('write', '', $this->object->getRefId())) {
153  $ilErr->raiseError($this->lng->txt('permission_denied'), $ilErr->WARNING);
154  }
155  include_once 'Services/Object/classes/class.ilObjectMetaDataGUI.php';
156  $md_gui = new ilObjectMetaDataGUI($this->object);
157  $this->ctrl->forwardCommand($md_gui);
158  break;
159 
160  case 'ilassquestionpreviewgui':
161 
162  $this->ctrl->saveParameter($this, "q_id");
163 
164  require_once 'Modules/TestQuestionPool/classes/class.ilAssQuestionPreviewGUI.php';
165  $gui = new ilAssQuestionPreviewGUI($this->ctrl, $this->tabs_gui, $this->tpl, $this->lng, $ilDB, $ilUser);
166 
167  $gui->initQuestion((int) $_GET['q_id'], $this->object->getId());
168  $gui->initPreviewSettings($this->object->getRefId());
169  $gui->initPreviewSession($ilUser->getId(), $this->fetchAuthoringQuestionIdParamater());
170  $gui->initHintTracking();
171  $gui->initStyleSheets();
172 
173  global $DIC;
174  $ilHelp = $DIC['ilHelp'];
175  $ilHelp->setScreenIdComponent("qpl");
176 
177  $this->ctrl->forwardCommand($gui);
178  break;
179 
180  case "ilassquestionpagegui":
181  include_once("./Services/Style/Content/classes/class.ilObjStyleSheet.php");
182  $this->tpl->setCurrentBlock("ContentStyle");
183  $this->tpl->setVariable("LOCATION_CONTENT_STYLESHEET", ilObjStyleSheet::getContentStylePath(0));
184  $this->tpl->parseCurrentBlock();
185 
186  // syntax style
187  $this->tpl->setCurrentBlock("SyntaxStyle");
188  $this->tpl->setVariable("LOCATION_SYNTAX_STYLESHEET", ilObjStyleSheet::getSyntaxStylePath());
189  $this->tpl->parseCurrentBlock();
190 
191  include_once "./Modules/TestQuestionPool/classes/class.assQuestionGUI.php";
193  $q_gui->setRenderPurpose(assQuestionGUI::RENDER_PURPOSE_PREVIEW);
194  $q_gui->setQuestionTabs();
195  $q_gui->outAdditionalOutput();
196  $q_gui->object->setObjId($this->object->getId());
197 
198  $q_gui->setTargetGuiClass(null);
199  $q_gui->setQuestionActionCmd(null);
200 
201  if ($this->object->getType() == 'qpl') {
202  $q_gui->addHeaderAction();
203  }
204 
205  $question = $q_gui->object;
206  $this->ctrl->saveParameter($this, "q_id");
207  include_once("./Modules/TestQuestionPool/classes/class.ilAssQuestionPageGUI.php");
208  $this->lng->loadLanguageModule("content");
209  $this->ctrl->setReturnByClass("ilAssQuestionPageGUI", "view");
210  $this->ctrl->setReturn($this, "questions");
211  $page_gui = new ilAssQuestionPageGUI($_GET["q_id"]);
212  $page_gui->obj->addUpdateListener(
213  $question,
214  'updateTimestamp'
215  );
216  $page_gui->setEditPreview(true);
217  $page_gui->setEnabledTabs(false);
218  if (strlen($this->ctrl->getCmd()) == 0 && !isset($_POST["editImagemapForward_x"])) { // workaround for page edit imagemaps, keep in mind
219  $this->ctrl->setCmdClass(get_class($page_gui));
220  $this->ctrl->setCmd("preview");
221  }
222  $page_gui->setQuestionHTML(array($q_gui->object->getId() => $q_gui->getPreview(true)));
223  $page_gui->setTemplateTargetVar("ADM_CONTENT");
224  $page_gui->setOutputMode("edit");
225  $page_gui->setHeader($question->getTitle());
226  $page_gui->setPresentationTitle($question->getTitle());
227  $ret = $this->ctrl->forwardCommand($page_gui);
228  $tpl->setContent($ret);
229  break;
230 
231  case 'ilpermissiongui':
232  include_once("Services/AccessControl/classes/class.ilPermissionGUI.php");
233  $perm_gui = new ilPermissionGUI($this);
234  $ret = $this->ctrl->forwardCommand($perm_gui);
235  break;
236 
237  case 'ilobjectcopygui':
238  include_once './Services/Object/classes/class.ilObjectCopyGUI.php';
239  $cp = new ilObjectCopyGUI($this);
240  $cp->setType('qpl');
241  $this->ctrl->forwardCommand($cp);
242  break;
243 
244  case "ilquestionpoolexportgui":
245  require_once 'Modules/TestQuestionPool/classes/class.ilQuestionPoolExportGUI.php';
246  $exp_gui = new ilQuestionPoolExportGUI($this);
247  $exp_gui->addFormat('xml', $this->lng->txt('qpl_export_xml'));
248  $exp_gui->addFormat('xls', $this->lng->txt('qpl_export_excel'), $this, 'createExportExcel');
249  $ret = $this->ctrl->forwardCommand($exp_gui);
250  break;
251 
252  case "ilinfoscreengui":
253  $this->infoScreenForward();
254  break;
255 
256  case 'ilassquestionhintsgui':
257 
258  // set return target
259  $this->ctrl->setReturn($this, "questions");
260 
261  // set context tabs
262  require_once 'Modules/TestQuestionPool/classes/class.assQuestionGUI.php';
263  $questionGUI = assQuestionGUI::_getQuestionGUI($q_type, $this->fetchAuthoringQuestionIdParamater());
264  $questionGUI->object->setObjId($this->object->getId());
265  $questionGUI->setQuestionTabs();
266  global $DIC;
267  $ilHelp = $DIC['ilHelp'];
268  $ilHelp->setScreenIdComponent("qpl");
269 
270  if ($this->object->getType() == 'qpl' && $writeAccess) {
271  $questionGUI->addHeaderAction();
272  }
273 
274  // forward to ilAssQuestionHintsGUI
275  require_once 'Modules/TestQuestionPool/classes/class.ilAssQuestionHintsGUI.php';
276  $gui = new ilAssQuestionHintsGUI($questionGUI);
277 
278  $gui->setEditingEnabled(
279  $DIC->access()->checkAccess('write', '', $this->object->getRefId())
280  );
281 
282  $ilCtrl->forwardCommand($gui);
283 
284  break;
285 
286  case 'illocalunitconfigurationgui':
287  if (!$ilAccess->checkAccess('write', '', $this->object->getRefId())) {
288  $ilErr->raiseError($this->lng->txt('permission_denied'), $ilErr->WARNING);
289  }
290 
291  require_once 'Modules/TestQuestionPool/classes/class.assQuestionGUI.php';
292  $questionGUI = assQuestionGUI::_getQuestionGUI($q_type, $this->fetchAuthoringQuestionIdParamater());
293  $questionGUI->object->setObjId($this->object->getId());
294  $questionGUI->setQuestionTabs();
295 
296  $this->ctrl->setReturn($this, 'questions');
297 
298  require_once 'Modules/TestQuestionPool/classes/class.ilLocalUnitConfigurationGUI.php';
299  require_once 'Modules/TestQuestionPool/classes/class.ilUnitConfigurationRepository.php';
300  $gui = new ilLocalUnitConfigurationGUI(
301  new ilUnitConfigurationRepository((int) $_GET['q_id'])
302  );
303  $ilCtrl->forwardCommand($gui);
304  break;
305 
306  case 'ilassquestionfeedbackeditinggui':
307 
308  // set return target
309  $this->ctrl->setReturn($this, "questions");
310 
311  // set context tabs
312  require_once 'Modules/TestQuestionPool/classes/class.assQuestionGUI.php';
313  $questionGUI = assQuestionGUI::_getQuestionGUI($q_type, $this->fetchAuthoringQuestionIdParamater());
314  $questionGUI->object->setObjId($this->object->getId());
315  $questionGUI->setQuestionTabs();
316  global $DIC;
317  $ilHelp = $DIC['ilHelp'];
318  $ilHelp->setScreenIdComponent("qpl");
319 
320  if ($this->object->getType() == 'qpl' && $writeAccess) {
321  $questionGUI->addHeaderAction();
322  }
323 
324  // forward to ilAssQuestionFeedbackGUI
325  require_once 'Modules/TestQuestionPool/classes/class.ilAssQuestionFeedbackEditingGUI.php';
326  $gui = new ilAssQuestionFeedbackEditingGUI($questionGUI, $ilCtrl, $ilAccess, $tpl, $ilTabs, $lng);
327  $ilCtrl->forwardCommand($gui);
328 
329  break;
330 
331  case 'ilobjquestionpoolsettingsgeneralgui':
332  require_once 'Modules/TestQuestionPool/classes/class.ilObjQuestionPoolSettingsGeneralGUI.php';
333  $gui = new ilObjQuestionPoolSettingsGeneralGUI($ilCtrl, $ilAccess, $lng, $tpl, $ilTabs, $this);
334  $this->ctrl->forwardCommand($gui);
335  break;
336 
337  case "ilobjtaxonomygui":
338 
339  require_once 'Modules/TestQuestionPool/classes/class.ilObjQuestionPoolTaxonomyEditingCommandForwarder.php';
341  $this->object,
342  $ilDB,
343  $ilPluginAdmin,
344  $ilCtrl,
345  $ilTabs,
346  $lng
347  );
348 
349  $forwarder->forward();
350 
351  break;
352 
353  case 'ilquestionpoolskilladministrationgui':
354 
355  require_once 'Modules/TestQuestionPool/classes/class.ilQuestionPoolSkillAdministrationGUI.php';
357  $ilias,
358  $ilCtrl,
359  $ilAccess,
360  $ilTabs,
361  $tpl,
362  $lng,
363  $ilDB,
364  $ilPluginAdmin,
365  $this->object,
366  $this->ref_id
367  );
368 
369  $this->ctrl->forwardCommand($gui);
370 
371  break;
372 
373  case 'ilquestionbrowsertablegui':
374  $this->ctrl->forwardCommand($this->buildQuestionBrowserTableGUI($taxIds = array())); // no tax ids required
375  break;
376 
377  case "ilobjquestionpoolgui":
378  case "":
379 
380  if ($cmd == 'questions') {
381  $this->ctrl->setParameter($this, 'q_id', '');
382  }
383 
384  $cmd .= "Object";
385  $ret = $this->$cmd();
386  break;
387 
388  default:
389  $this->ctrl->setReturn($this, "questions");
390  include_once "./Modules/TestQuestionPool/classes/class.assQuestionGUI.php";
392  $q_gui->setEditContext(assQuestionGUI::EDIT_CONTEXT_AUTHORING);
393  $q_gui->object->setObjId($this->object->getId());
394  if ($this->object->getType() == 'qpl') {
395  $q_gui->setTaxonomyIds($this->object->getTaxonomyIds());
396  $this->object->addQuestionChangeListeners($q_gui->object);
397  if ($writeAccess) {
398  $q_gui->addHeaderAction();
399  }
400  }
401  $q_gui->setQuestionTabs();
402  global $DIC;
403  $ilHelp = $DIC['ilHelp'];
404  $ilHelp->setScreenIdComponent("qpl");
405  $ret = $this->ctrl->forwardCommand($q_gui);
406  break;
407  }
408 
409  if (!(strtolower($_GET["baseClass"]) == "iladministrationgui"
410  || strtolower($_GET['baseClass']) == 'ilrepositorygui')
411  && $this->getCreationMode() != true) {
412  $this->tpl->show();
413  }
414  }
Class ilObjectMetaDataGUI.
Export User Interface Class.
GUI class for the workflow of copying objects.
global $DIC
Definition: saml.php:7
static getStyleSheetLocation($mode="output", $a_css_name="", $a_css_location="")
get full style sheet file name (path inclusive) of current user
$_GET["client_id"]
Class ilUnitConfigurationRepository.
Question page GUI class.
global $ilCtrl
Definition: ilias.php:18
prepareOutput($a_show_subobjects=true)
prepare output
static _getQuestionGUI($question_type, $question_id=-1)
Creates a question gui representation and returns the alias to the question gui note: please do not u...
$ilUser
Definition: imgupload.php:18
static getSyntaxStylePath()
get syntax style path
static getContentStylePath($a_style_id, $add_random=true)
get content style path
global $ilDB
$ret
Definition: parser.php:6
getCreationMode()
get creation mode
Class ilLocalUnitConfigurationGUI.
infoScreenForward()
show information screen
New PermissionGUI (extends from old ilPermission2GUI) RBAC related output.
$_POST["username"]
static getInstanceFromAjaxCall()
(Re-)Build instance from ajax call
+ Here is the call graph for this function:

◆ exportObject()

ilObjQuestionPoolGUI::exportObject ( )
protected

Gateway for exports initiated from workspace, as there is a generic forward to {objTypeMainGUI}::export()

Definition at line 420 of file class.ilObjQuestionPoolGUI.php.

References $DIC.

421  {
422  global $DIC; /* @var ILIAS\DI\Container $DIC */
423  $DIC->ctrl()->redirectByClass('ilQuestionPoolExportGUI');
424  }
global $DIC
Definition: saml.php:7

◆ exportQuestionObject()

ilObjQuestionPoolGUI::exportQuestionObject ( )

export question

Definition at line 943 of file class.ilObjQuestionPoolGUI.php.

References $_POST, $filename, ilUtil\deliverFile(), exit, and ilUtil\sendInfo().

944  {
945  // export button was pressed
946  if (count($_POST["q_id"]) > 0) {
947  include_once("./Modules/TestQuestionPool/classes/class.ilQuestionpoolExport.php");
948  $qpl_exp = new ilQuestionpoolExport($this->object, "xml", $_POST["q_id"]);
949  $export_file = $qpl_exp->buildExportFile();
950  $filename = $export_file;
951  $filename = preg_replace("/.*\//", "", $filename);
952  include_once "./Services/Utilities/classes/class.ilUtil.php";
953  ilUtil::deliverFile($export_file, $filename);
954  exit();
955  } else {
956  ilUtil::sendInfo($this->lng->txt("qpl_export_select_none"), true);
957  }
958  $this->ctrl->redirect($this, "questions");
959  }
static sendInfo($a_info="", $a_keep=false)
Send Info Message to Screen.
Export class for questionpools.
$filename
Definition: buildRTE.php:89
exit
Definition: backend.php:16
$_POST["username"]
static deliverFile( $a_file, $a_filename, $a_mime='', $isInline=false, $removeAfterDelivery=false, $a_exit_after=true)
deliver file for download via browser.
+ Here is the call graph for this function:

◆ fetchAuthoringQuestionIdParamater()

ilObjQuestionPoolGUI::fetchAuthoringQuestionIdParamater ( )
protected
Returns
mixed

Definition at line 1116 of file class.ilObjQuestionPoolGUI.php.

References $_GET.

Referenced by executeCommand().

1117  {
1118  $qId = (int) $_GET['q_id'];
1119 
1120  if ($this->object->checkQuestionParent($qId)) {
1121  return $qId;
1122  }
1123 
1124  throw new ilTestQuestionPoolException('question id does not relate to parent object!');
1125  }
$_GET["client_id"]
+ Here is the caller graph for this function:

◆ filterObject()

ilObjQuestionPoolGUI::filterObject ( )

set question list filter

Definition at line 452 of file class.ilObjQuestionPoolGUI.php.

References questionsObject().

453  {
454  $this->questionsObject();
455  }
questionsObject()
list questions of question pool
+ Here is the call graph for this function:

◆ filterQuestionBrowserObject()

ilObjQuestionPoolGUI::filterQuestionBrowserObject ( )

Definition at line 961 of file class.ilObjQuestionPoolGUI.php.

References $_GET, $DIC, ilObjTaxonomy\getUsageOfObject(), and questionsObject().

962  {
963  global $DIC; /* @var ILIAS\DI\Container $DIC */
964  $enableComments = $DIC->rbac()->system()->checkAccess('write', $_GET['ref_id']);
965 
966  require_once 'Services/Taxonomy/classes/class.ilObjTaxonomy.php';
967  $taxIds = ilObjTaxonomy::getUsageOfObject($this->object->getId());
968 
969  include_once "./Modules/TestQuestionPool/classes/tables/class.ilQuestionBrowserTableGUI.php";
970  $table_gui = new ilQuestionBrowserTableGUI($this, 'questions', false, false, $taxIds, $enableComments);
971  $table_gui->resetOffset();
972  $table_gui->writeFilterToSession();
973  $this->questionsObject();
974  }
static getUsageOfObject($a_obj_id, $a_include_titles=false)
Get usage of object.
global $DIC
Definition: saml.php:7
$_GET["client_id"]
questionsObject()
list questions of question pool
+ Here is the call graph for this function:

◆ fullscreenObject()

ilObjQuestionPoolGUI::fullscreenObject ( )

show fullscreen view

Definition at line 441 of file class.ilObjQuestionPoolGUI.php.

References $_GET.

442  {
443  include_once("./Modules/TestQuestionPool/classes/class.ilAssQuestionPageGUI.php");
444  $page_gui = new ilAssQuestionPageGUI($_GET["pg_id"]);
445  $page_gui->showMediaFullscreen();
446  }
$_GET["client_id"]
Question page GUI class.

◆ getImportQuestionsForm()

ilObjQuestionPoolGUI::getImportQuestionsForm ( )
protected
Returns
ilPropertyFormGUI

Definition at line 790 of file class.ilObjQuestionPoolGUI.php.

References $form, and ilFormPropertyGUI\setRequired().

Referenced by importQuestionsObject(), and uploadObject().

791  {
792  require_once 'Services/Form/classes/class.ilPropertyFormGUI.php';
793  $form = new ilPropertyFormGUI();
794  $form->setTitle($this->lng->txt('import_question'));
795  $form->setFormAction($this->ctrl->getFormAction($this, 'upload'));
796 
797  $file = new ilFileInputGUI($this->lng->txt('select_file'), 'xmldoc');
798  $file->setRequired(true);
799  $form->addItem($file);
800 
801  $form->addCommandButton('upload', $this->lng->txt('upload'));
802  $form->addCommandButton('questions', $this->lng->txt('cancel'));
803 
804  return $form;
805  }
This class represents a property form user interface.
This class represents a file property in a property form.
if(isset($_POST['submit'])) $form
setRequired($a_required)
Set Required.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getTabs()

ilObjQuestionPoolGUI::getTabs ( )

adds tabs to tab gui object

Parameters
object$tabs_guiilTabsGUI object

Definition at line 1426 of file class.ilObjQuestionPoolGUI.php.

References $_GET, $_POST, $DIC, $key, addSettingsSubTabs(), ilAssQuestionSkillAssignmentsGUI\CMD_SHOW_SKILL_QUEST_ASSIGNS, and isSkillsTabRequired().

1427  {
1428  global $DIC;
1429  $ilAccess = $DIC['ilAccess'];
1430  $ilHelp = $DIC['ilHelp'];
1431 
1432  $currentUserHasWriteAccess = $ilAccess->checkAccess("write", "", $this->object->getRefId());
1433 
1434  $ilHelp->setScreenIdComponent("qpl");
1435 
1436  $next_class = strtolower($this->ctrl->getNextClass());
1437  switch ($next_class) {
1438  case "":
1439  case "ilpermissiongui":
1440  case "ilobjectmetadatagui":
1441  case "ilquestionpoolexportgui":
1442  case "ilquestionpoolskilladministrationgui":
1443  break;
1444 
1445  case 'ilobjtaxonomygui':
1446  case 'ilobjquestionpoolsettingsgeneralgui':
1447 
1448  if ($currentUserHasWriteAccess) {
1449  $this->addSettingsSubTabs($this->tabs_gui);
1450  }
1451 
1452  break;
1453 
1454  default:
1455  return;
1456  break;
1457  }
1458  // questions
1459  $force_active = false;
1460  $commands = $_POST["cmd"];
1461  if (is_array($commands)) {
1462  foreach ($commands as $key => $value) {
1463  if (preg_match("/^delete_.*/", $key, $matches) ||
1464  preg_match("/^addSelectGap_.*/", $key, $matches) ||
1465  preg_match("/^addTextGap_.*/", $key, $matches) ||
1466  preg_match("/^deleteImage_.*/", $key, $matches) ||
1467  preg_match("/^upload_.*/", $key, $matches) ||
1468  preg_match("/^addSuggestedSolution_.*/", $key, $matches)
1469  ) {
1470  $force_active = true;
1471  }
1472  }
1473  }
1474  if (array_key_exists("imagemap_x", $_POST)) {
1475  $force_active = true;
1476  }
1477  if (!$force_active) {
1478  $force_active = ((strtolower($this->ctrl->getCmdClass()) == strtolower(get_class($this)) || strlen($this->ctrl->getCmdClass()) == 0) &&
1479  $this->ctrl->getCmd() == "")
1480  ? true
1481  : false;
1482  }
1483  $this->tabs_gui->addTarget(
1484  "assQuestions",
1485  $this->ctrl->getLinkTarget($this, "questions"),
1486  array("questions", "filter", "resetFilter", "createQuestion",
1487  "importQuestions", "deleteQuestions", "filterQuestionBrowser",
1488  "view", "preview", "editQuestion", "exec_pg",
1489  "addItem", "upload", "save", "cancel", "addSuggestedSolution",
1490  "cancelExplorer", "linkChilds", "removeSuggestedSolution",
1491  "add", "addYesNo", "addTrueFalse", "createGaps", "saveEdit",
1492  "setMediaMode", "uploadingImage", "uploadingImagemap", "addArea",
1493  "deletearea", "saveShape", "back", "addPair", "uploadingJavaapplet",
1494  "addParameter", "assessment", "addGIT", "addST", "addPG", "delete",
1495  "toggleGraphicalAnswers", "deleteAnswer", "deleteImage", "removeJavaapplet"),
1496  "",
1497  "",
1498  $force_active
1499  );
1500 
1501  if ($ilAccess->checkAccess("read", "", $this->ref_id) || $ilAccess->checkAccess("visible", "", $this->ref_id)) {
1502  $this->tabs_gui->addTarget(
1503  "info_short",
1504  $this->ctrl->getLinkTarget($this, "infoScreen"),
1505  array("infoScreen", "showSummary")
1506  );
1507  }
1508 
1509  if ($ilAccess->checkAccess("write", "", $_GET['ref_id'])) {
1510  // properties
1511  $this->tabs_gui->addTarget(
1512  'settings',
1513  $this->ctrl->getLinkTargetByClass('ilObjQuestionPoolSettingsGeneralGUI'),
1514  array(),
1515  array('ilObjQuestionPoolSettingsGeneralGUI', 'ilObjTaxonomyGUI')
1516  );
1517 
1518  // skill service
1519  if ($this->isSkillsTabRequired()) {
1520  require_once 'Modules/TestQuestionPool/classes/class.ilAssQuestionSkillAssignmentsGUI.php';
1521 
1522  $link = $this->ctrl->getLinkTargetByClass(
1523  array('ilQuestionPoolSkillAdministrationGUI', 'ilAssQuestionSkillAssignmentsGUI'),
1525  );
1526 
1527  $this->tabs_gui->addTarget('qpl_tab_competences', $link, array(), array());
1528  }
1529  }
1530 
1531  // print view
1532  $this->tabs_gui->addTarget(
1533  "print_view",
1534  $this->ctrl->getLinkTarget($this, 'print'),
1535  array("print"),
1536  "",
1537  ""
1538  );
1539 
1540  if ($ilAccess->checkAccess("write", "", $this->object->getRefId())) {
1541  // meta data
1542  include_once "Services/Object/classes/class.ilObjectMetaDataGUI.php";
1543  $mdgui = new ilObjectMetaDataGUI($this->object);
1544  $mdtab = $mdgui->getTab();
1545  if ($mdtab) {
1546  $this->tabs_gui->addTarget(
1547  "meta_data",
1548  $mdtab,
1549  "",
1550  "ilmdeditorgui"
1551  );
1552  }
1553 
1554  // $this->tabs_gui->addTarget("export",
1555 // $this->ctrl->getLinkTarget($this,'export'),
1556 // array("export", "createExportFile", "confirmDeleteExportFile", "downloadExportFile"),
1557 // "", "");
1558  }
1559 
1560  if ($currentUserHasWriteAccess) {
1561  $this->tabs_gui->addTarget(
1562  "export",
1563  $this->ctrl->getLinkTargetByClass("ilquestionpoolexportgui", ""),
1564  "",
1565  "ilquestionpoolexportgui"
1566  );
1567  }
1568 
1569  if ($ilAccess->checkAccess("edit_permission", "", $this->object->getRefId())) {
1570  $this->tabs_gui->addTarget(
1571  "perm_settings",
1572  $this->ctrl->getLinkTargetByClass(array(get_class($this),'ilpermissiongui'), "perm"),
1573  array("perm","info","owner"),
1574  'ilpermissiongui'
1575  );
1576  }
1577  }
Class ilObjectMetaDataGUI.
global $DIC
Definition: saml.php:7
$_GET["client_id"]
$key
Definition: croninfo.php:18
$_POST["username"]
+ Here is the call graph for this function:

◆ importFileObject()

ilObjQuestionPoolGUI::importFileObject (   $parent_id = null,
  $a_catch_errors = true 
)
protected

form for new questionpool object import

Definition at line 1349 of file class.ilObjQuestionPoolGUI.php.

References $form, initImportForm(), and uploadQplObject().

1350  {
1351  $form = $this->initImportForm($_REQUEST["new_type"]);
1352  if ($form->checkInput()) {
1353  $this->uploadQplObject();
1354  }
1355 
1356  // display form to correct errors
1357  $this->tpl->setContent($form->getHTML());
1358  }
if(isset($_POST['submit'])) $form
uploadQplObject($questions_only=false)
imports question(s) into the questionpool
+ Here is the call graph for this function:

◆ importQuestionsObject()

ilObjQuestionPoolGUI::importQuestionsObject ( ilPropertyFormGUI  $form = null)

display the import form to import questions into the questionpool

Definition at line 778 of file class.ilObjQuestionPoolGUI.php.

References $form, and getImportQuestionsForm().

Referenced by uploadObject().

779  {
780  if (!$form instanceof ilPropertyFormGUI) {
781  $form = $this->getImportQuestionsForm();
782  }
783 
784  $this->tpl->setContent($form->getHtml());
785  }
This class represents a property form user interface.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ importVerifiedFileObject()

ilObjQuestionPoolGUI::importVerifiedFileObject ( )

imports question(s) into the questionpool (after verification)

Definition at line 674 of file class.ilObjQuestionPoolGUI.php.

References $_GET, $_POST, $_SESSION, $map, $object, $result, ilObjQuestionPool\_getImportDirectory(), ilUtil\delDir(), IL_MO_PARSE_QTI, and ilUtil\redirect().

675  {
676  if ($_POST["questions_only"] == 1) {
677  $newObj = &$this->object;
678  } else {
679  include_once("./Modules/TestQuestionPool/classes/class.ilObjQuestionPool.php");
680  // create new questionpool object
681  $newObj = new ilObjQuestionPool(0, true);
682  // set type of questionpool object
683  $newObj->setType($_GET["new_type"]);
684  // set title of questionpool object to "dummy"
685  $newObj->setTitle("dummy");
686  // set description of questionpool object
687  $newObj->setDescription("questionpool import");
688  // create the questionpool class in the ILIAS database (object_data table)
689  $newObj->create(true);
690  // create a reference for the questionpool object in the ILIAS database (object_reference table)
691  $newObj->createReference();
692  // put the questionpool object in the administration tree
693  $newObj->putInTree($_GET["ref_id"]);
694  // get default permissions and set the permissions for the questionpool object
695  $newObj->setPermissions($_GET["ref_id"]);
696  }
697 
698  if (is_file($_SESSION["qpl_import_dir"] . '/' . $_SESSION["qpl_import_subdir"] . "/manifest.xml")) {
699  $_SESSION["qpl_import_idents"] = $_POST["ident"];
700 
701  $fileName = $_SESSION["qpl_import_subdir"] . '.zip';
702  $fullPath = $_SESSION["qpl_import_dir"] . '/' . $fileName;
703 
704  include_once("./Services/Export/classes/class.ilImport.php");
705  $imp = new ilImport((int) $_GET["ref_id"]);
706  $map = $imp->getMapping();
707  $map->addMapping("Modules/TestQuestionPool", "qpl", "new_id", $newObj->getId());
708  $imp->importObject($newObj, $fullPath, $fileName, "qpl", "Modules/TestQuestionPool", true);
709  } else {
710  // start parsing of QTI files
711  include_once "./Services/QTI/classes/class.ilQTIParser.php";
712  $qtiParser = new ilQTIParser($_SESSION["qpl_import_qti_file"], IL_MO_PARSE_QTI, $newObj->getId(), $_POST["ident"]);
713  $result = $qtiParser->startParsing();
714 
715  // import page data
716  if (strlen($_SESSION["qpl_import_xml_file"])) {
717  include_once("./Modules/LearningModule/classes/class.ilContObjParser.php");
718  $contParser = new ilContObjParser($newObj, $_SESSION["qpl_import_xml_file"], $_SESSION["qpl_import_subdir"]);
719  $contParser->setQuestionMapping($qtiParser->getImportMapping());
720  $contParser->startParsing();
721 
722  // #20494
723  $newObj->fromXML($_SESSION["qpl_import_xml_file"]);
724  }
725 
726  // set another question pool name (if possible)
727  if (isset($_POST["qpl_new"]) && strlen($_POST["qpl_new"])) {
728  $newObj->setTitle($_POST["qpl_new"]);
729  }
730 
731  $newObj->update();
732  $newObj->saveToDb();
733  }
734 
735  // delete import directory
736  include_once "./Services/Utilities/classes/class.ilUtil.php";
738 
739  if ($_POST["questions_only"] == 1) {
740  $this->ctrl->redirect($this, "questions");
741  } else {
742  ilUtil::sendSuccess($this->lng->txt("object_imported"), true);
743  ilUtil::redirect("ilias.php?ref_id=" . $newObj->getRefId() .
744  "&baseClass=ilObjQuestionPoolGUI");
745  }
746  }
Content Object Parser.
$_SESSION["AccountId"]
$result
$_GET["client_id"]
Import class.
const IL_MO_PARSE_QTI
static _getImportDirectory()
get import directory of lm
static redirect($a_script)
static delDir($a_dir, $a_clean_only=false)
removes a dir and all its content (subdirs and files) recursively
$_POST["username"]
+ Here is the call graph for this function:

◆ infoScreenForward()

ilObjQuestionPoolGUI::infoScreenForward ( )

show information screen

Definition at line 1628 of file class.ilObjQuestionPoolGUI.php.

References $DIC, ilObjectGUI\$ilErr, and $info.

Referenced by executeCommand(), and infoScreenObject().

1629  {
1630  global $DIC;
1631  $ilErr = $DIC['ilErr'];
1632  $ilAccess = $DIC['ilAccess'];
1633 
1634  if (!$ilAccess->checkAccess("visible", "", $this->ref_id)) {
1635  $ilErr->raiseError($this->lng->txt("msg_no_perm_read"));
1636  }
1637 
1638  include_once("./Services/InfoScreen/classes/class.ilInfoScreenGUI.php");
1639  $info = new ilInfoScreenGUI($this);
1640  $info->enablePrivateNotes();
1641 
1642  // standard meta data
1643  $info->addMetaDataSections($this->object->getId(), 0, $this->object->getType());
1644 
1645  $this->ctrl->forwardCommand($info);
1646  }
Class ilInfoScreenGUI.
global $DIC
Definition: saml.php:7
$info
Definition: index.php:5
+ Here is the caller graph for this function:

◆ infoScreenObject()

ilObjQuestionPoolGUI::infoScreenObject ( )

this one is called from the info button in the repository not very nice to set cmdClass/Cmd manually, if everything works through ilCtrl in the future this may be changed

Definition at line 1618 of file class.ilObjQuestionPoolGUI.php.

References infoScreenForward().

1619  {
1620  $this->ctrl->setCmd("showSummary");
1621  $this->ctrl->setCmdClass("ilinfoscreengui");
1622  $this->infoScreenForward();
1623  }
infoScreenForward()
show information screen
+ Here is the call graph for this function:

◆ initImportForm()

ilObjQuestionPoolGUI::initImportForm (   $a_new_type)
protected

Definition at line 1326 of file class.ilObjQuestionPoolGUI.php.

References $form, and ilFileInputGUI\setSuffixes().

Referenced by importFileObject().

1327  {
1328  include_once("Services/Form/classes/class.ilPropertyFormGUI.php");
1329  $form = new ilPropertyFormGUI();
1330  $form->setTarget("_top");
1331  $form->setFormAction($this->ctrl->getFormAction($this));
1332  $form->setTitle($this->lng->txt("import_qpl"));
1333 
1334  include_once("./Services/Form/classes/class.ilFileInputGUI.php");
1335  $fi = new ilFileInputGUI($this->lng->txt("import_file"), "xmldoc");
1336  $fi->setSuffixes(array("zip"));
1337  $fi->setRequired(true);
1338  $form->addItem($fi);
1339 
1340  $form->addCommandButton("importFile", $this->lng->txt("import"));
1341  $form->addCommandButton("cancel", $this->lng->txt("cancel"));
1342 
1343  return $form;
1344  }
This class represents a property form user interface.
This class represents a file property in a property form.
if(isset($_POST['submit'])) $form
setSuffixes($a_suffixes)
Set Accepted Suffixes.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ isSkillsTabRequired()

ilObjQuestionPoolGUI::isSkillsTabRequired ( )
private

Definition at line 1579 of file class.ilObjQuestionPoolGUI.php.

References ilObjQuestionPool\isSkillManagementGloballyActivated().

Referenced by getTabs().

1580  {
1581  if (!($this->object instanceof ilObjQuestionPool)) {
1582  return false;
1583  }
1584 
1585  if (!$this->object->isSkillServiceEnabled()) {
1586  return false;
1587  }
1588 
1590  return false;
1591  }
1592 
1593  return true;
1594  }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ moveObject()

ilObjQuestionPoolGUI::moveObject ( )

mark one or more question objects for moving

Definition at line 1287 of file class.ilObjQuestionPoolGUI.php.

References $_GET, $_POST, $key, and ilUtil\sendInfo().

1288  {
1289  if (isset($_POST["q_id"]) && is_array($_POST["q_id"]) && count($_POST["q_id"]) > 0) {
1290  foreach ($_POST["q_id"] as $key => $value) {
1291  $this->object->moveToClipboard($value);
1292  }
1293  ilUtil::sendInfo($this->lng->txt("qpl_move_insert_clipboard"), true);
1294  } elseif (isset($_GET['q_id']) && $_GET['q_id'] > 0) {
1295  $this->object->moveToClipboard((int) $_GET['q_id']);
1296  ilUtil::sendInfo($this->lng->txt("qpl_copy_insert_clipboard"), true);
1297  } else {
1298  ilUtil::sendInfo($this->lng->txt("qpl_move_select_none"), true);
1299  }
1300  $this->ctrl->redirect($this, "questions");
1301  }
$_GET["client_id"]
static sendInfo($a_info="", $a_keep=false)
Send Info Message to Screen.
$key
Definition: croninfo.php:18
$_POST["username"]
+ Here is the call graph for this function:

◆ pasteObject()

ilObjQuestionPoolGUI::pasteObject ( )

paste questios from the clipboard into the question pool

Definition at line 1251 of file class.ilObjQuestionPoolGUI.php.

References $_SESSION, ilUtil\sendFailure(), and ilUtil\sendInfo().

1252  {
1253  if (array_key_exists("qpl_clipboard", $_SESSION)) {
1254  if ($this->object->pasteFromClipboard()) {
1255  ilUtil::sendSuccess($this->lng->txt("qpl_paste_success"), true);
1256  } else {
1257  ilUtil::sendFailure($this->lng->txt("qpl_paste_error"), true);
1258  }
1259  } else {
1260  ilUtil::sendInfo($this->lng->txt("qpl_paste_no_objects"), true);
1261  }
1262  $this->ctrl->redirect($this, "questions");
1263  }
$_SESSION["AccountId"]
static sendInfo($a_info="", $a_keep=false)
Send Info Message to Screen.
static sendFailure($a_info="", $a_keep=false)
Send Failure Message to Screen.
+ Here is the call graph for this function:

◆ questionObject()

ilObjQuestionPoolGUI::questionObject ( )

Definition at line 875 of file class.ilObjQuestionPoolGUI.php.

References $_GET, and $type.

876  {
877  //echo "<br>ilObjQuestionPoolGUI->questionObject()";
878  $type = $_GET["sel_question_types"];
879  $this->editQuestionForm($type);
880  }
$type
$_GET["client_id"]

◆ questionsObject()

ilObjQuestionPoolGUI::questionsObject ( )

list questions of question pool

Definition at line 1000 of file class.ilObjQuestionPoolGUI.php.

References $_GET, $_SESSION, $DIC, $ilCtrl, $ilDB, $ilUser, ilObjectGUI\$lng, ilObjectGUI\$ref_id, ilObjectGUI\$toolbar, ilLink\_getLink(), buildQuestionBrowserTableGUI(), ilLinkButton\getInstance(), ilObjectFactory\getInstanceByRefId(), ilObjTaxonomy\getUsageOfObject(), ilUtil\redirect(), and ilUtil\sendFailure().

Referenced by filterObject(), filterQuestionBrowserObject(), resetFilterObject(), and resetQuestionBrowserObject().

1001  {
1002  global $DIC;
1003  $rbacsystem = $DIC['rbacsystem'];
1004  $ilUser = $DIC['ilUser'];
1005  $ilCtrl = $DIC['ilCtrl'];
1006  $ilDB = $DIC['ilDB'];
1007  $lng = $DIC['lng'];
1008  $ilPluginAdmin = $DIC['ilPluginAdmin'];
1009 
1010  if (get_class($this->object) == "ilObjTest") {
1011  if ($_GET["calling_test"] > 0) {
1012  $ref_id = $_GET["calling_test"];
1013  $q_id = $_GET["q_id"];
1014 
1015  if ($_REQUEST['test_express_mode']) {
1016  if ($q_id) {
1017  ilUtil::redirect("ilias.php?ref_id=" . $ref_id . "&q_id=" . $q_id . "&test_express_mode=1&cmd=showPage&cmdClass=iltestexpresspageobjectgui&baseClass=ilObjTestGUI");
1018  } else {
1019  ilUtil::redirect("ilias.php?ref_id=" . $ref_id . "&test_express_mode=1&cmd=showPage&cmdClass=iltestexpresspageobjectgui&baseClass=ilObjTestGUI");
1020  }
1021  } else {
1022  ilUtil::redirect("ilias.php?baseClass=ilObjTestGUI&ref_id=" . $ref_id . "&cmd=questions");
1023  }
1024  }
1025  } elseif (isset($_GET['calling_consumer']) && (int) $_GET['calling_consumer']) {
1026  $ref_id = (int) $_GET['calling_consumer'];
1028  if ($consumer instanceof ilQuestionEditingFormConsumer) {
1029  ilUtil::redirect($consumer->getQuestionEditingFormBackTarget($_GET['consumer_context']));
1030  }
1031  require_once 'Services/Link/classes/class.ilLink.php';
1033  }
1034 
1035  $this->object->purgeQuestions();
1036  // reset test_id SESSION variable
1037  $_SESSION["test_id"] = "";
1038 
1039  require_once 'Modules/TestQuestionPool/classes/questions/class.ilAssQuestionSkillAssignmentImportFails.php';
1040  $qsaImportFails = new ilAssQuestionSkillAssignmentImportFails($this->object->getId());
1041  if ($qsaImportFails->failedImportsRegistered()) {
1042  require_once 'Services/UIComponent/Button/classes/class.ilLinkButton.php';
1043  $button = ilLinkButton::getInstance();
1044  $button->setUrl($this->ctrl->getLinkTarget($this, 'renoveImportFails'));
1045  $button->setCaption('ass_skl_import_fails_remove_btn');
1046 
1047  ilUtil::sendFailure($qsaImportFails->getFailedImportsMessage($this->lng) . '<br />' . $button->render());
1048  }
1049 
1050  require_once 'Services/Taxonomy/classes/class.ilObjTaxonomy.php';
1051  $taxIds = ilObjTaxonomy::getUsageOfObject($this->object->getId());
1052 
1053  $table_gui = $this->buildQuestionBrowserTableGUI($taxIds);
1054  $table_gui->setPreventDoubleSubmission(false);
1055 
1056  if ($rbacsystem->checkAccess('write', $_GET['ref_id'])) {
1057  $toolbar = new ilToolbarGUI();
1058 
1059  require_once 'Services/UIComponent/Button/classes/class.ilLinkButton.php';
1060  $btn = ilLinkButton::getInstance();
1061  $btn->setCaption('ass_create_question');
1062  $btn->setUrl($this->ctrl->getLinkTarget($this, 'createQuestionForm'));
1063  $btn->setPrimary(true);
1064  $toolbar->addButtonInstance($btn);
1065 
1066 
1067  $btnImport = ilLinkButton::getInstance();
1068  $btnImport->setCaption('import');
1069  $btnImport->setUrl($this->ctrl->getLinkTarget($this, 'importQuestions'));
1070  $toolbar->addButtonInstance($btnImport);
1071 
1072  if (array_key_exists("qpl_clipboard", $_SESSION) && count($_SESSION['qpl_clipboard'])) {
1073  $btnPaste = ilLinkButton::getInstance();
1074  $btnPaste->setCaption('paste');
1075  $btnPaste->setUrl($this->ctrl->getLinkTarget($this, 'paste'));
1076  $toolbar->addButtonInstance($btnPaste);
1077  }
1078 
1079  $this->tpl->setContent(
1080  $this->ctrl->getHTML($toolbar) . $this->ctrl->getHTML($table_gui)
1081  );
1082  } else {
1083  $this->tpl->setContent($this->ctrl->getHTML($table_gui));
1084  }
1085 
1086  if ($this->object->getShowTaxonomies()) {
1087  $this->lng->loadLanguageModule('tax');
1088 
1089  require_once 'Services/Taxonomy/classes/class.ilTaxonomyExplorerGUI.php';
1090 
1091  foreach ($taxIds as $taxId) {
1092  if ($taxId != $this->object->getNavTaxonomyId()) {
1093  continue;
1094  }
1095 
1096  $taxExp = new ilTaxonomyExplorerGUI(
1097  $this,
1098  'showNavTaxonomy',
1099  $taxId,
1100  'ilobjquestionpoolgui',
1101  'questions'
1102  );
1103 
1104  if (!$taxExp->handleCommand()) {
1105  $this->tpl->setLeftContent($taxExp->getHTML() . "&nbsp;");
1106  }
1107 
1108  break;
1109  }
1110  }
1111  }
$_SESSION["AccountId"]
static getUsageOfObject($a_obj_id, $a_include_titles=false)
Get usage of object.
global $DIC
Definition: saml.php:7
$_GET["client_id"]
Taxonomy explorer GUI class.
global $ilCtrl
Definition: ilias.php:18
$ilUser
Definition: imgupload.php:18
static sendFailure($a_info="", $a_keep=false)
Send Failure Message to Screen.
global $ilDB
static getInstanceByRefId($a_ref_id, $stop_on_error=true)
get an instance of an Ilias object by reference id
static redirect($a_script)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ renoveImportFailsObject()

ilObjQuestionPoolGUI::renoveImportFailsObject ( )
protected

Definition at line 988 of file class.ilObjQuestionPoolGUI.php.

References ilAssQuestionSkillAssignmentImportFails\deleteRegisteredImportFails().

989  {
990  require_once 'Modules/TestQuestionPool/classes/questions/class.ilAssQuestionSkillAssignmentImportFails.php';
991  $qsaImportFails = new ilAssQuestionSkillAssignmentImportFails($this->object->getId());
992  $qsaImportFails->deleteRegisteredImportFails();
993 
994  $this->ctrl->redirect($this, 'infoScreen');
995  }
+ Here is the call graph for this function:

◆ resetFilterObject()

ilObjQuestionPoolGUI::resetFilterObject ( )

resets filter

Definition at line 460 of file class.ilObjQuestionPoolGUI.php.

References $_POST, and questionsObject().

461  {
462  $_POST["filter_text"] = "";
463  $_POST["sel_filter_type"] = "";
464  $this->questionsObject();
465  }
questionsObject()
list questions of question pool
$_POST["username"]
+ Here is the call graph for this function:

◆ resetQuestionBrowserObject()

ilObjQuestionPoolGUI::resetQuestionBrowserObject ( )

Definition at line 976 of file class.ilObjQuestionPoolGUI.php.

References ilObjTaxonomy\getUsageOfObject(), and questionsObject().

977  {
978  require_once 'Services/Taxonomy/classes/class.ilObjTaxonomy.php';
979  $taxIds = ilObjTaxonomy::getUsageOfObject($this->object->getId());
980 
981  include_once "./Modules/TestQuestionPool/classes/tables/class.ilQuestionBrowserTableGUI.php";
982  $table_gui = new ilQuestionBrowserTableGUI($this, 'questions', false, false, $taxIds);
983  $table_gui->resetOffset();
984  $table_gui->resetFilter();
985  $this->questionsObject();
986  }
static getUsageOfObject($a_obj_id, $a_include_titles=false)
Get usage of object.
questionsObject()
list questions of question pool
+ Here is the call graph for this function:

◆ setTitleAndDescription()

ilObjQuestionPoolGUI::setTitleAndDescription ( )

called by prepare output

Definition at line 1394 of file class.ilObjQuestionPoolGUI.php.

References $_GET, $title, ilObject2\_getIcon(), assQuestionGUI\_getQuestionGUI(), and assQuestion\_getQuestionTypeName().

1395  {
1396  parent::setTitleAndDescription();
1397  if ($_GET["q_id"] > 0) {
1398  include_once "./Modules/TestQuestionPool/classes/class.assQuestionGUI.php";
1399  $q_gui = assQuestionGUI::_getQuestionGUI("", $_GET["q_id"]);
1400  if ($q_gui->object instanceof assQuestion) {
1401  $q_gui->object->setObjId($this->object->getId());
1402  $title = $q_gui->object->getTitle();
1403  if (!$title) {
1404  $title = $this->lng->txt('new') . ': ' . assQuestion::_getQuestionTypeName($q_gui->object->getQuestionType());
1405  }
1406  $this->tpl->setTitle($title);
1407  $this->tpl->setDescription($q_gui->object->getComment());
1408  $this->tpl->setTitleIcon(ilObject2::_getIcon("", "big", $this->object->getType()));
1409  } else {
1410  // Workaround for context issues: If no object was found, redirect without q_id parameter
1411  $this->ctrl->setParameter($this, 'q_id', '');
1412  $this->ctrl->redirect($this);
1413  }
1414  } else {
1415  $this->tpl->setTitle($this->object->getTitle());
1416  $this->tpl->setDescription($this->object->getLongDescription());
1417  $this->tpl->setTitleIcon(ilObject2::_getIcon("", "big", $this->object->getType()));
1418  }
1419  }
$_GET["client_id"]
Abstract basic class which is to be extended by the concrete assessment question type classes...
static _getQuestionTypeName($type_tag)
Return the translation for a given question type tag.
static _getIcon($a_obj_id="", $a_size="big", $a_type="", $a_offline=false)
static _getQuestionGUI($question_type, $question_id=-1)
Creates a question gui representation and returns the alias to the question gui note: please do not u...
+ Here is the call graph for this function:

◆ updateObject()

ilObjQuestionPoolGUI::updateObject ( )

Definition at line 1241 of file class.ilObjQuestionPoolGUI.php.

References League\Flysystem\Adapter\Polyfill\update().

1242  {
1243  // $this->update = $this->object->updateMetaData();
1244  $this->update = $this->object->update();
1245  ilUtil::sendSuccess($this->lng->txt("msg_obj_modified"), true);
1246  }
update($pash, $contents, Config $config)
+ Here is the call graph for this function:

◆ uploadObject()

ilObjQuestionPoolGUI::uploadObject ( )

imports question(s) into the questionpool

Definition at line 760 of file class.ilObjQuestionPoolGUI.php.

References $form, getImportQuestionsForm(), importQuestionsObject(), and uploadQplObject().

761  {
762  $upload_valid = true;
763  $form = $this->getImportQuestionsForm();
764  if ($form->checkInput()) {
765  if (!$this->uploadQplObject(true)) {
766  $form->setValuesByPost();
768  }
769  } else {
770  $form->setValuesByPost();
772  }
773  }
importQuestionsObject(ilPropertyFormGUI $form=null)
display the import form to import questions into the questionpool
if(isset($_POST['submit'])) $form
uploadQplObject($questions_only=false)
imports question(s) into the questionpool
+ Here is the call graph for this function:

◆ uploadQplObject()

ilObjQuestionPoolGUI::uploadQplObject (   $questions_only = false)

imports question(s) into the questionpool

Definition at line 481 of file class.ilObjQuestionPoolGUI.php.

References $_SESSION, $DIC, $result, $row, $rows, $table, $type, $xml, ilObjQuestionPool\_createImportDirectory(), ilObjQuestionPool\_getImportDirectory(), ilObjQuestionPool\_setImportDirectory(), ilObjTest\_setImportDirectory(), CLOZE_TEST_IDENTIFIER, ilUtil\delDir(), ilPlugin\getPluginObject(), IL_COMP_MODULE, IL_MO_VERIFY_QTI, IMAGEMAP_QUESTION_IDENTIFIER, JAVAAPPLET_QUESTION_IDENTIFIER, KPRIM_CHOICE_QUESTION_IDENTIFIER, LONG_MENU_QUESTION_IDENTIFIER, MATCHING_QUESTION_IDENTIFIER, MULTIPLE_CHOICE_QUESTION_IDENTIFIER, NUMERIC_QUESTION_IDENTIFIER, ORDERING_QUESTION_IDENTIFIER, ilUtil\sendFailure(), SINGLE_CHOICE_QUESTION_IDENTIFIER, TEXT_QUESTION_IDENTIFIER, TEXTSUBSET_QUESTION_IDENTIFIER, and ilUtil\unzip().

Referenced by importFileObject(), and uploadObject().

482  {
483  $this->ctrl->setParameter($this, 'new_type', $_REQUEST['new_type']);
484  if ($_FILES["xmldoc"]["error"] > UPLOAD_ERR_OK) {
485  ilUtil::sendFailure($this->lng->txt("error_upload"), true);
486  if (!$questions_only) {
487  $this->ctrl->redirect($this, 'create');
488  }
489  return false;
490  }
491  // create import directory
492  include_once "./Modules/TestQuestionPool/classes/class.ilObjQuestionPool.php";
494 
495  global $DIC; /* @var ILIAS\DI\Container $DIC */
496  // copy uploaded file to import directory
497  $file = pathinfo($_FILES["xmldoc"]["name"]);
498  $full_path = $basedir . "/" . $_FILES["xmldoc"]["name"];
499  $DIC['ilLog']->write(__METHOD__ . ": full path " . $full_path);
500  include_once "./Services/Utilities/classes/class.ilUtil.php";
501  ilUtil::moveUploadedFile($_FILES["xmldoc"]["tmp_name"], $_FILES["xmldoc"]["name"], $full_path);
502  $DIC['ilLog']->write(__METHOD__ . ": full path " . $full_path);
503  if (strcmp($_FILES["xmldoc"]["type"], "text/xml") == 0) {
504  $qti_file = $full_path;
506  } else {
507  // unzip file
508  ilUtil::unzip($full_path);
509 
510  // determine filenames of xml files
511  $subdir = basename($file["basename"], "." . $file["extension"]);
513  $xml_file = ilObjQuestionPool::_getImportDirectory() . '/' . $subdir . '/' . $subdir . ".xml";
514  $qti_file = ilObjQuestionPool::_getImportDirectory() . '/' . $subdir . '/' . str_replace("qpl", "qti", $subdir) . ".xml";
515  }
516 
517  // start verification of QTI files
518  include_once "./Services/QTI/classes/class.ilQTIParser.php";
519  $qtiParser = new ilQTIParser($qti_file, IL_MO_VERIFY_QTI, 0, "");
520  $result = $qtiParser->startParsing();
521  $founditems = &$qtiParser->getFoundItems();
522  if (count($founditems) == 0) {
523  // nothing found
524 
525  // delete import directory
526  ilUtil::delDir($basedir);
527 
528  ilUtil::sendFailure($this->lng->txt("qpl_import_no_items"), true);
529  if (!$questions_only) {
530  $this->ctrl->redirect($this, 'create');
531  }
532  return false;
533  }
534 
535  $complete = 0;
536  $incomplete = 0;
537  foreach ($founditems as $item) {
538  if (strlen($item["type"])) {
539  $complete++;
540  } else {
541  $incomplete++;
542  }
543  }
544 
545  if ($complete == 0) {
546  // delete import directory
547  ilUtil::delDir($basedir);
548 
549  ilUtil::sendFailure($this->lng->txt("qpl_import_non_ilias_files"), true);
550  if (!$questions_only) {
551  $this->ctrl->redirect($this, 'create');
552  }
553  return false;
554  }
555 
556  $_SESSION["qpl_import_xml_file"] = $xml_file;
557  $_SESSION["qpl_import_qti_file"] = $qti_file;
558  $_SESSION["qpl_import_subdir"] = $subdir;
559 
560  $this->tpl->addBlockFile("ADM_CONTENT", "adm_content", "tpl.qpl_import_verification.html", "Modules/TestQuestionPool");
561 
562  require_once 'Modules/TestQuestionPool/classes/tables/class.ilQuestionPoolImportVerificationTableGUI.php';
563  $table = new ilQuestionPoolImportVerificationTableGUI($this, 'uploadQplObject');
564  $rows = array();
565 
566  foreach ($founditems as $item) {
567  $row = array(
568  'title' => $item['title'],
569  'ident' => $item['ident'],
570  );
571 
572  include_once "./Services/QTI/classes/class.ilQTIItem.php";
573  switch ($item["type"]) {
575  $type = $this->lng->txt("assClozeTest");
576  break;
578  $type = $this->lng->txt("assImagemapQuestion");
579  break;
581  $type = $this->lng->txt("assJavaApplet");
582  break;
584  $type = $this->lng->txt("assMatchingQuestion");
585  break;
587  $type = $this->lng->txt("assMultipleChoice");
588  break;
590  $type = $this->lng->txt("assKprimChoice");
591  break;
593  $type = $this->lng->txt("assLongMenu");
594  break;
596  $type = $this->lng->txt("assSingleChoice");
597  break;
599  $type = $this->lng->txt("assOrderingQuestion");
600  break;
602  $type = $this->lng->txt("assTextQuestion");
603  break;
605  $type = $this->lng->txt("assNumeric");
606  break;
608  $type = $this->lng->txt("assTextSubset");
609  break;
610  default:
611  $type = $this->lng->txt($item["type"]);
612  break;
613  }
614 
615  if (strcmp($type, "-" . $item["type"] . "-") == 0) {
616  global $DIC;
617  $ilPluginAdmin = $DIC['ilPluginAdmin'];
618  $pl_names = $ilPluginAdmin->getActivePluginsForSlot(IL_COMP_MODULE, "TestQuestionPool", "qst");
619  foreach ($pl_names as $pl_name) {
620  $pl = ilPlugin::getPluginObject(IL_COMP_MODULE, "TestQuestionPool", "qst", $pl_name);
621  if (strcmp($pl->getQuestionType(), $item["type"]) == 0) {
622  $type = $pl->getQuestionTypeTranslation();
623  }
624  }
625  }
626 
627  $row['type'] = $type;
628 
629  $rows[] = $row;
630  }
631  $table->setData($rows);
632 
633  $this->tpl->setCurrentBlock("import_qpl");
634  if (is_file($xml_file)) {
635  // read file into a string
636  $fh = @fopen($xml_file, "r") or die("");
637  $xml = @fread($fh, filesize($xml_file));
638  @fclose($fh);
639  if (preg_match("/<ContentObject.*?MetaData.*?General.*?Title[^>]*?>([^<]*?)</", $xml, $matches)) {
640  $this->tpl->setVariable("VALUE_NEW_QUESTIONPOOL", $matches[1]);
641  }
642  }
643  $this->tpl->setVariable("TEXT_CREATE_NEW_QUESTIONPOOL", $this->lng->txt("qpl_import_create_new_qpl"));
644  $this->tpl->parseCurrentBlock();
645 
646  $this->tpl->setCurrentBlock("adm_content");
647  $this->tpl->setVariable("FOUND_QUESTIONS_INTRODUCTION", $this->lng->txt("qpl_import_verify_found_questions"));
648  if ($questions_only) {
649  $this->tpl->setVariable("VERIFICATION_HEADING", $this->lng->txt("import_questions_into_qpl"));
650  $this->tpl->setVariable("FORMACTION", $this->ctrl->getFormAction($this));
651  } else {
652  $this->tpl->setVariable("VERIFICATION_HEADING", $this->lng->txt("import_qpl"));
653 
654  $this->ctrl->setParameter($this, "new_type", $this->type);
655  $this->tpl->setVariable("FORMACTION", $this->ctrl->getFormAction($this));
656  }
657 
658  $value_questions_only = 0;
659  if ($questions_only) {
660  $value_questions_only = 1;
661  }
662  $this->tpl->setVariable("VALUE_QUESTIONS_ONLY", $value_questions_only);
663  $this->tpl->setVariable("VERIFICATION_TABLE", $table->getHtml());
664  $this->tpl->setVariable("VERIFICATION_FORM_NAME", $table->getFormName());
665 
666  $this->tpl->parseCurrentBlock();
667 
668  return true;
669  }
const MATCHING_QUESTION_IDENTIFIER
const MULTIPLE_CHOICE_QUESTION_IDENTIFIER
static getPluginObject(string $a_ctype, string $a_cname, string $a_slot_id, string $a_pname)
$_SESSION["AccountId"]
$result
$type
global $DIC
Definition: saml.php:7
const KPRIM_CHOICE_QUESTION_IDENTIFIER
static unzip($a_file, $overwrite=false, $a_flat=false)
unzip file
const LONG_MENU_QUESTION_IDENTIFIER
const TEXTSUBSET_QUESTION_IDENTIFIER
Title class.
Definition: Title.php:36
const JAVAAPPLET_QUESTION_IDENTIFIER
if(!file_exists(getcwd() . '/ilias.ini.php'))
registration confirmation script for ilias
Definition: confirmReg.php:12
const NUMERIC_QUESTION_IDENTIFIER
const ORDERING_QUESTION_IDENTIFIER
static _setImportDirectory($a_import_dir=null)
set import directory
const IL_COMP_MODULE
const TEXT_QUESTION_IDENTIFIER
static sendFailure($a_info="", $a_keep=false)
Send Failure Message to Screen.
$row
$rows
Definition: xhr_table.php:10
static _getImportDirectory()
get import directory of lm
if(empty($password)) $table
Definition: pwgen.php:24
const IL_MO_VERIFY_QTI
static _createImportDirectory()
creates data directory for import files (data_dir/qpl_data/qpl_<id>/import, depending on data directo...
const SINGLE_CHOICE_QUESTION_IDENTIFIER
static delDir($a_dir, $a_clean_only=false)
removes a dir and all its content (subdirs and files) recursively
const CLOZE_TEST_IDENTIFIER
Question identifier constants.
static _setImportDirectory($a_import_dir=null)
set import directory
const IMAGEMAP_QUESTION_IDENTIFIER
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Field Documentation

◆ $object

ilObjQuestionPoolGUI::$object

Definition at line 40 of file class.ilObjQuestionPoolGUI.php.

Referenced by importVerifiedFileObject().


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