ILIAS  release_6 Revision v6.24-5-g0c8bfefb3b8
All Data Structures Namespaces Files Functions Variables Modules Pages
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 ()
 viewObject container presentation for "administration -> repository, trash, permissions" 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...
 
 addToDeskObject ()
 
 removeFromDeskObject ()
 

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...
 
 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)
 

Private Attributes

 $error
 

Additional Inherited Members

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

Detailed Description

Constructor & Destructor Documentation

◆ __construct()

ilObjQuestionPoolGUI::__construct ( )

Constructor public.

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

References $_GET, $DIC, $ilCtrl, ilObjectGUI\$lng, ilObjectGUI\$rbacsystem, and ILIAS\GlobalScreen\Provider\__construct().

50  {
51  global $DIC;
52  $lng = $DIC['lng'];
53  $ilCtrl = $DIC['ilCtrl'];
54  $rbacsystem = $DIC['rbacsystem'];
55  $lng->loadLanguageModule("assessment");
56  $this->type = "qpl";
57  $this->error = $DIC['ilErr'];
58  $this->ctrl = &$ilCtrl;
59 
60  $this->ctrl->saveParameter($this, array(
61  "ref_id", "test_ref_id", "calling_test", "test_express_mode", "q_id", 'tax_node', 'calling_consumer', 'consumer_context'
62  ));
63  $this->ctrl->saveParameter($this, "calling_consumer");
64  $this->ctrl->saveParameterByClass('ilAssQuestionPageGUI', 'calling_consumer');
65  $this->ctrl->saveParameterByClass('ilAssQuestionPageGUI', 'consumer_context');
66  $this->ctrl->saveParameterByClass('ilobjquestionpoolgui', 'calling_consumer');
67  $this->ctrl->saveParameterByClass('ilobjquestionpoolgui', 'consumer_context');
68 
69  parent::__construct("", $_GET["ref_id"], true, false);
70  }
$_GET["client_id"]
global $ilCtrl
Definition: ilias.php:18
__construct(Container $dic, ilPlugin $plugin)
$DIC
Definition: xapitoken.php:46
+ Here is the call graph for this function:

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 1669 of file class.ilObjQuestionPoolGUI.php.

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

1670  {
1671  global $DIC;
1672  $ilAccess = $DIC['ilAccess'];
1673  $ilErr = $DIC['ilErr'];
1674  $lng = $DIC['lng'];
1675 
1676  if ($ilAccess->checkAccess("write", "", $a_target) || $ilAccess->checkAccess('read', '', $a_target)) {
1677  $_GET['cmdClass'] = 'ilObjQuestionPoolGUI';
1678  $_GET['cmd'] = 'questions';
1679  $_GET['baseClass'] = 'ilRepositoryGUI';
1680  $_GET["ref_id"] = $a_target;
1681  include_once("ilias.php");
1682  exit;
1683  } elseif ($ilAccess->checkAccess("read", "", ROOT_FOLDER_ID)) {
1684  ilUtil::sendInfo(sprintf(
1685  $lng->txt("msg_no_perm_read_item"),
1687  ), true);
1689  }
1690  $ilErr->raiseError($lng->txt("msg_no_perm_read_lm"), $ilErr->FATAL);
1691  }
exit
Definition: login.php:29
$_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)
$DIC
Definition: xapitoken.php:46
+ Here is the call graph for this function:

◆ addLocatorItems()

ilObjQuestionPoolGUI::addLocatorItems ( )

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

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

1371  {
1372  global $DIC;
1373  $ilLocator = $DIC['ilLocator'];
1374  switch ($this->ctrl->getCmd()) {
1375  case "create":
1376  case "importFile":
1377  case "cancel":
1378  break;
1379  default:
1380  $ilLocator->addItem($this->object->getTitle(), $this->ctrl->getLinkTarget($this, ""), "", $_GET["ref_id"]);
1381  break;
1382  }
1383  if ($_GET["q_id"] > 0) {
1384  include_once "./Modules/TestQuestionPool/classes/class.assQuestionGUI.php";
1385  $q_gui = assQuestionGUI::_getQuestionGUI("", $_GET["q_id"]);
1386  if ($q_gui->object instanceof assQuestion) {
1387  $q_gui->object->setObjId($this->object->getId());
1388  $title = $q_gui->object->getTitle();
1389  if (!$title) {
1390  $title = $this->lng->txt('new') . ': ' . assQuestion::_getQuestionTypeName($q_gui->object->getQuestionType());
1391  }
1392  $ilLocator->addItem($title, $this->ctrl->getLinkTargetByClass(get_class($q_gui), "editQuestion"));
1393  } else {
1394  // Workaround for context issues: If no object was found, redirect without q_id parameter
1395  $this->ctrl->setParameter($this, 'q_id', '');
1396  $this->ctrl->redirect($this);
1397  }
1398  }
1399  }
$_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...
$DIC
Definition: xapitoken.php:46
+ Here is the call graph for this function:

◆ addSettingsSubTabs()

ilObjQuestionPoolGUI::addSettingsSubTabs ( ilTabsGUI  $tabs)
private

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

References ilTabsGUI\addSubTabTarget().

Referenced by getTabs().

1610  {
1611  $tabs->addSubTabTarget(
1612  'qpl_settings_subtab_general',
1613  $this->ctrl->getLinkTargetByClass('ilObjQuestionPoolSettingsGeneralGUI'),
1614  '',
1615  'ilObjQuestionPoolSettingsGeneralGUI'
1616  );
1617 
1618  $tabs->addSubTabTarget(
1619  'qpl_settings_subtab_taxonomies',
1620  $this->ctrl->getLinkTargetByClass('ilObjTaxonomyGUI', 'editAOTaxonomySettings'),
1621  '',
1622  'ilObjTaxonomyGUI'
1623  );
1624  }
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 872 of file class.ilObjQuestionPoolGUI.php.

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

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

◆ buildCreateQuestionForm()

ilObjQuestionPoolGUI::buildCreateQuestionForm ( )
private

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

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

Referenced by createQuestionFormObject().

1152  {
1153  global $DIC;
1154  $ilUser = $DIC['ilUser'];
1155 
1156  // form
1157 
1158  require_once("Services/Form/classes/class.ilPropertyFormGUI.php");
1159  $form = new ilPropertyFormGUI();
1160  $form->setTitle($this->lng->txt('ass_create_question'));
1161  $form->setFormAction($this->ctrl->getFormAction($this));
1162 
1163  // question type
1164 
1165  $options = array();
1166  foreach ($this->object->getQuestionTypes(false, true, false) as $translation => $data) {
1167  $options[$data['type_tag']] = $translation;
1168  }
1169 
1170  require_once("Services/Form/classes/class.ilSelectInputGUI.php");
1171  $si = new ilSelectInputGUI($this->lng->txt('question_type'), 'sel_question_types');
1172  $si->setOptions($options);
1173  //$si->setValue($ilUser->getPref("tst_lastquestiontype"));
1174 
1175  $form->addItem($si);
1176 
1177  // content editing mode
1178 
1180  $ri = new ilRadioGroupInputGUI($this->lng->txt("tst_add_quest_cont_edit_mode"), "add_quest_cont_edit_mode");
1181 
1182  $ri->addOption(new ilRadioOption(
1183  $this->lng->txt('tst_add_quest_cont_edit_mode_page_object'),
1185  ));
1186 
1187  $ri->addOption(new ilRadioOption(
1188  $this->lng->txt('tst_add_quest_cont_edit_mode_default'),
1190  ));
1191 
1193 
1194  $form->addItem($ri, true);
1195  } else {
1196  $hi = new ilHiddenInputGUI("question_content_editing_type");
1198  $form->addItem($hi, true);
1199  }
1200 
1201  // commands
1202 
1203  $form->addCommandButton('createQuestion', $this->lng->txt('create'));
1204  $form->addCommandButton('questions', $this->lng->txt('cancel'));
1205 
1206  return $form;
1207  }
This class represents an option in a radio group.
This class represents a property form user interface.
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.
$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 ...
$DIC
Definition: xapitoken.php:46
+ 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 1701 of file class.ilObjQuestionPoolGUI.php.

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

Referenced by executeCommand(), and questionsObject().

1702  {
1703  global $DIC;
1704  $rbacsystem = $DIC['rbacsystem'];
1705  $ilDB = $DIC['ilDB'];
1706  $lng = $DIC['lng'];
1707  $ilPluginAdmin = $DIC['ilPluginAdmin'];
1708 
1709  $writeAccess = (bool) $rbacsystem->checkAccess('write', $_GET['ref_id']);
1710  $enableCommenting = $writeAccess;
1711 
1712  include_once "./Modules/TestQuestionPool/classes/tables/class.ilQuestionBrowserTableGUI.php";
1713  $table_gui = new ilQuestionBrowserTableGUI($this, 'questions', $writeAccess, false, $taxIds, $enableCommenting);
1714  $table_gui->setEditable($writeAccess);
1715 
1716  require_once 'Modules/TestQuestionPool/classes/class.ilAssQuestionList.php';
1717  $questionList = new ilAssQuestionList($ilDB, $lng, $ilPluginAdmin);
1718  $questionList->setParentObjId($this->object->getId());
1719 
1720  foreach ($table_gui->getFilterItems() as $item) {
1721  if (substr($item->getPostVar(), 0, strlen('tax_')) == 'tax_') {
1722  $v = $item->getValue();
1723 
1724  if (is_array($v) && count($v) && !(int) $v[0]) {
1725  continue;
1726  }
1727 
1728  $taxId = substr($item->getPostVar(), strlen('tax_'));
1729 
1730  $questionList->addTaxonomyFilter(
1731  $taxId,
1732  $item->getValue(),
1733  $this->object->getId(),
1734  $this->object->getType()
1735  );
1736  } elseif ($item->getValue() !== false) {
1737  $questionList->addFieldFilter($item->getPostVar(), $item->getValue());
1738  }
1739  }
1740 
1741  if ($this->object->isNavTaxonomyActive() && (int) $_GET['tax_node']) {
1742  require_once 'Services/Taxonomy/classes/class.ilTaxonomyTree.php';
1743  $taxTree = new ilTaxonomyTree($this->object->getNavTaxonomyId());
1744  $rootNodeId = $taxTree->readRootId();
1745 
1746  if ((int) $_GET['tax_node'] != $rootNodeId) {
1747  $questionList->addTaxonomyFilter(
1748  $this->object->getNavTaxonomyId(),
1749  array((int) $_GET['tax_node']),
1750  $this->object->getId(),
1751  $this->object->getType()
1752  );
1753  }
1754  }
1755 
1756  $questionList->load();
1757  $data = $questionList->getQuestionDataArray();
1758 
1759  $table_gui->setQuestionData($data);
1760 
1761  return $table_gui;
1762  }
$_GET["client_id"]
global $ilDB
$DIC
Definition: xapitoken.php:46
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 941 of file class.ilObjQuestionPoolGUI.php.

942  {
943  $this->ctrl->redirect($this, "questions");
944  }

◆ cancelImportObject()

ilObjQuestionPoolGUI::cancelImportObject ( )

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

References $_POST.

755  {
756  if ($_POST["questions_only"] == 1) {
757  $this->ctrl->redirect($this, "questions");
758  } else {
759  $this->ctrl->redirect($this, "cancel");
760  }
761  }
$_POST["username"]

◆ confirmDeleteQuestionsObject()

ilObjQuestionPoolGUI::confirmDeleteQuestionsObject ( )

delete questions

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

References $_POST.

923  {
924  // delete questions after confirmation
925  foreach ($_POST["q_id"] as $key => $value) {
926  $this->object->deleteQuestion($value);
927  $this->object->cleanupClipboard($value);
928  }
929  if (count($_POST["q_id"])) {
930  ilUtil::sendSuccess($this->lng->txt("qpl_questions_deleted"), true);
931  }
932 
933  $this->ctrl->setParameter($this, 'q_id', '');
934 
935  $this->ctrl->redirect($this, "questions");
936  }
$_POST["username"]

◆ copyObject()

ilObjQuestionPoolGUI::copyObject ( )

copy one or more question objects to the clipboard

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

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

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

◆ createExportExcel()

ilObjQuestionPoolGUI::createExportExcel ( )

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

References $_GET, $DIC, and ilObjectGUI\$rbacsystem.

1310  {
1311  global $DIC;
1312  $rbacsystem = $DIC['rbacsystem'];
1313  if ($rbacsystem->checkAccess("write", $_GET['ref_id'])) {
1314  include_once("./Modules/TestQuestionPool/classes/class.ilQuestionpoolExport.php");
1315  $question_ids = &$this->object->getAllQuestionIds();
1316  $qpl_exp = new ilQuestionpoolExport($this->object, 'xls', $question_ids);
1317  $qpl_exp->buildExportFile();
1318  $this->ctrl->redirectByClass("ilquestionpoolexportgui", "");
1319  }
1320  }
$_GET["client_id"]
Export class for questionpools.
$DIC
Definition: xapitoken.php:46

◆ createQuestionFormObject()

ilObjQuestionPoolGUI::createQuestionFormObject ( )
private

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

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

1134  {
1135  global $DIC; /* @var \ILIAS\DI\Container $DIC */
1136  $ilHelp = $DIC['ilHelp']; /* @var ilHelpGUI $ilHelp */
1137 
1138  $ilHelp->setScreenId('assQuestions');
1139 
1141  $ilHelp->setSubScreenId('createQuestion_editMode');
1142  } else {
1143  $ilHelp->setSubScreenId('createQuestion');
1144  }
1145 
1146  $form = $this->buildCreateQuestionForm();
1147 
1148  $this->tpl->setContent($this->ctrl->getHTML($form));
1149  }
static isAdditionalQuestionContentEditingModePageObjectEnabled()
returns the fact wether content editing with ilias page editor is enabled for questions or not ...
$DIC
Definition: xapitoken.php:46
+ Here is the call graph for this function:

◆ createQuestionForTestObject()

& ilObjQuestionPoolGUI::createQuestionForTestObject ( )

create new question

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

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

839  {
840  if (!$_REQUEST['q_id']) {
841  require_once 'Modules/Test/classes/class.ilObjAssessmentFolder.php';
843  $addContEditMode = $_REQUEST['add_quest_cont_edit_mode'];
844  } else {
846  }
847 
848  include_once "./Modules/TestQuestionPool/classes/class.assQuestionGUI.php";
849  $q_gui = &assQuestionGUI::_getQuestionGUI($_GET["sel_question_types"]);
850  $q_gui->object->setObjId($this->object->getId());
851  $q_gui->object->setAdditionalContentEditingMode($addContEditMode);
852  $q_gui->object->createNewQuestion();
853 
854  $class = get_class($q_gui);
855  $qId = $q_gui->object->getId();
856  } else {
857  $class = $_GET["sel_question_types"] . 'gui';
858  $qId = $_REQUEST['q_id'];
859  }
860 
861  $this->ctrl->setParameterByClass($class, "q_id", $qId);
862  $this->ctrl->setParameterByClass($class, "sel_question_types", $_REQUEST["sel_question_types"]);
863  $this->ctrl->setParameterByClass($class, "prev_qid", $_REQUEST["prev_qid"]);
864 
865  $this->ctrl->redirectByClass($class, "editQuestion");
866  }
$_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 816 of file class.ilObjQuestionPoolGUI.php.

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

817  {
819  $addContEditMode = $_POST['add_quest_cont_edit_mode'];
820  } else {
822  }
823 
824  include_once "./Modules/TestQuestionPool/classes/class.assQuestionGUI.php";
825  $q_gui = &assQuestionGUI::_getQuestionGUI($_POST["sel_question_types"]);
826  $this->object->addQuestionChangeListeners($q_gui->object);
827  $q_gui->object->setObjId($this->object->getId());
828  $q_gui->object->setAdditionalContentEditingMode($addContEditMode);
829  $q_gui->object->createNewQuestion();
830  $this->ctrl->setParameterByClass(get_class($q_gui), "q_id", $q_gui->object->getId());
831  $this->ctrl->setParameterByClass(get_class($q_gui), "sel_question_types", $_POST["sel_question_types"]);
832  $this->ctrl->redirectByClass(get_class($q_gui), "editQuestion");
833  }
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 891 of file class.ilObjQuestionPoolGUI.php.

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

892  {
893  global $DIC;
894  $rbacsystem = $DIC['rbacsystem'];
895 
896  $questionIdsToDelete = isset($_POST['q_id']) ? (array) $_POST['q_id'] : array();
897  if (0 === count($questionIdsToDelete) && isset($_GET['q_id'])) {
898  $questionIdsToDelete = array($_GET['q_id']);
899  }
900 
901  $questionIdsToDelete = array_filter(array_map('intval', $questionIdsToDelete));
902  if (0 === count($questionIdsToDelete)) {
903  ilUtil::sendInfo($this->lng->txt("qpl_delete_select_none"), true);
904  $this->ctrl->redirect($this, "questions");
905  }
906 
907  ilUtil::sendQuestion($this->lng->txt("qpl_confirm_delete_questions"));
908  $deleteable_questions = &$this->object->getDeleteableQuestionDetails($questionIdsToDelete);
909  include_once "./Modules/TestQuestionPool/classes/tables/class.ilQuestionBrowserTableGUI.php";
910  $table_gui = new ilQuestionBrowserTableGUI($this, 'questions', (($rbacsystem->checkAccess('write', (int) $_GET['ref_id']) ? true : false)), true);
911  $table_gui->setShowRowsSelector(false);
912  $table_gui->setLimit(PHP_INT_MAX);
913  $table_gui->setEditable($rbacsystem->checkAccess('write', (int) $_GET['ref_id']));
914  $table_gui->setData($deleteable_questions);
915  $this->tpl->setVariable('ADM_CONTENT', $table_gui->getHTML());
916  }
$_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.
$DIC
Definition: xapitoken.php:46
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 476 of file class.ilObjQuestionPoolGUI.php.

References $_GET, and exit.

477  {
478  include_once("./Modules/TestQuestionPool/classes/class.ilAssQuestionPage.php");
479  $pg_obj = new ilAssQuestionPage($_GET["pg_id"]);
480  $pg_obj->send_paragraph($_GET["par_id"], $_GET["downloadtitle"]);
481  exit;
482  }
exit
Definition: login.php:29
$_GET["client_id"]
Question page object.

◆ downloadFileObject()

ilObjQuestionPoolGUI::downloadFileObject ( )

download file

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

References $_GET, and exit.

436  {
437  $file = explode("_", $_GET["file_id"]);
438  include_once("./Modules/File/classes/class.ilObjFile.php");
439  $fileObj = new ilObjFile($file[count($file) - 1], false);
440  $fileObj->sendFile();
441  exit;
442  }
exit
Definition: login.php:29
$_GET["client_id"]

◆ editQuestionForTestObject()

& ilObjQuestionPoolGUI::editQuestionForTestObject ( )

edit question

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

References $_GET, and assQuestionGUI\_getQuestionGUI().

1326  {
1327  include_once "./Modules/TestQuestionPool/classes/class.assQuestionGUI.php";
1328  $q_gui = &assQuestionGUI::_getQuestionGUI("", $_GET["q_id"]);
1329  $this->ctrl->redirectByClass(get_class($q_gui), "editQuestion");
1330  }
$_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 84 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.

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

References $DIC.

427  {
428  global $DIC; /* @var ILIAS\DI\Container $DIC */
429  $DIC->ctrl()->redirectByClass('ilQuestionPoolExportGUI');
430  }
$DIC
Definition: xapitoken.php:46

◆ exportQuestionObject()

ilObjQuestionPoolGUI::exportQuestionObject ( )

export question

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

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

950  {
951  // export button was pressed
952  if (count($_POST["q_id"]) > 0) {
953  include_once("./Modules/TestQuestionPool/classes/class.ilQuestionpoolExport.php");
954  $qpl_exp = new ilQuestionpoolExport($this->object, "xml", $_POST["q_id"]);
955  $export_file = $qpl_exp->buildExportFile();
956  $filename = $export_file;
957  $filename = preg_replace("/.*\//", "", $filename);
958  include_once "./Services/Utilities/classes/class.ilUtil.php";
959  ilUtil::deliverFile($export_file, $filename);
960  exit();
961  } else {
962  ilUtil::sendInfo($this->lng->txt("qpl_export_select_none"), true);
963  }
964  $this->ctrl->redirect($this, "questions");
965  }
exit
Definition: login.php:29
static sendInfo($a_info="", $a_keep=false)
Send Info Message to Screen.
Export class for questionpools.
$filename
Definition: buildRTE.php:89
$_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 1122 of file class.ilObjQuestionPoolGUI.php.

References $_GET.

Referenced by executeCommand().

1123  {
1124  $qId = (int) $_GET['q_id'];
1125 
1126  if ($this->object->checkQuestionParent($qId)) {
1127  return $qId;
1128  }
1129 
1130  throw new ilTestQuestionPoolException('question id does not relate to parent object!');
1131  }
$_GET["client_id"]
+ Here is the caller graph for this function:

◆ filterObject()

ilObjQuestionPoolGUI::filterObject ( )

set question list filter

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

References questionsObject().

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

◆ filterQuestionBrowserObject()

ilObjQuestionPoolGUI::filterQuestionBrowserObject ( )

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

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

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

◆ fullscreenObject()

ilObjQuestionPoolGUI::fullscreenObject ( )

show fullscreen view

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

References $_GET.

448  {
449  include_once("./Modules/TestQuestionPool/classes/class.ilAssQuestionPageGUI.php");
450  $page_gui = new ilAssQuestionPageGUI($_GET["pg_id"]);
451  $page_gui->showMediaFullscreen();
452  }
$_GET["client_id"]
Question page GUI class.

◆ getImportQuestionsForm()

ilObjQuestionPoolGUI::getImportQuestionsForm ( )
protected
Returns
ilPropertyFormGUI

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

References ilFormPropertyGUI\setRequired().

Referenced by importQuestionsObject(), and uploadObject().

797  {
798  require_once 'Services/Form/classes/class.ilPropertyFormGUI.php';
799  $form = new ilPropertyFormGUI();
800  $form->setTitle($this->lng->txt('import_question'));
801  $form->setFormAction($this->ctrl->getFormAction($this, 'upload'));
802 
803  $file = new ilFileInputGUI($this->lng->txt('select_file'), 'xmldoc');
804  $file->setRequired(true);
805  $form->addItem($file);
806 
807  $form->addCommandButton('upload', $this->lng->txt('upload'));
808  $form->addCommandButton('questions', $this->lng->txt('cancel'));
809 
810  return $form;
811  }
This class represents a property form user interface.
This class represents a file property in a property 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 1436 of file class.ilObjQuestionPoolGUI.php.

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

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

References ilObjectGUI\checkPermissionBool(), initImportForm(), and uploadQplObject().

1356  {
1357  if (!$this->checkPermissionBool("create", "", $_REQUEST["new_type"])) {
1358  $this->error->raiseError($this->lng->txt("no_create_permission"));
1359  }
1360 
1361  $form = $this->initImportForm($_REQUEST["new_type"]);
1362  if ($form->checkInput()) {
1363  $this->uploadQplObject();
1364  }
1365 
1366  // display form to correct errors
1367  $this->tpl->setContent($form->getHTML());
1368  }
uploadQplObject($questions_only=false)
imports question(s) into the questionpool
checkPermissionBool($a_perm, $a_cmd="", $a_type="", $a_ref_id=null)
Check permission.
+ 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 784 of file class.ilObjQuestionPoolGUI.php.

References getImportQuestionsForm().

Referenced by uploadObject().

785  {
786  if (!$form instanceof ilPropertyFormGUI) {
787  $form = $this->getImportQuestionsForm();
788  }
789 
790  $this->tpl->setContent($form->getHtml());
791  }
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 680 of file class.ilObjQuestionPoolGUI.php.

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

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

References $DIC, and ilObjectGUI\$ilErr.

Referenced by executeCommand(), and infoScreenObject().

1642  {
1643  global $DIC;
1644  $ilErr = $DIC['ilErr'];
1645  $ilAccess = $DIC['ilAccess'];
1646 
1647  if (!$ilAccess->checkAccess("visible", "", $this->ref_id)) {
1648  $ilErr->raiseError($this->lng->txt("msg_no_perm_read"));
1649  }
1650 
1651  include_once("./Services/InfoScreen/classes/class.ilInfoScreenGUI.php");
1652  $info = new ilInfoScreenGUI($this);
1653  $info->enablePrivateNotes();
1654 
1655  // standard meta data
1656  $info->addMetaDataSections($this->object->getId(), 0, $this->object->getType());
1657 
1658  $this->ctrl->forwardCommand($info);
1659  }
Class ilInfoScreenGUI.
$DIC
Definition: xapitoken.php:46
+ 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 1631 of file class.ilObjQuestionPoolGUI.php.

References infoScreenForward().

1632  {
1633  $this->ctrl->setCmd("showSummary");
1634  $this->ctrl->setCmdClass("ilinfoscreengui");
1635  $this->infoScreenForward();
1636  }
infoScreenForward()
show information screen
+ Here is the call graph for this function:

◆ initImportForm()

ilObjQuestionPoolGUI::initImportForm (   $a_new_type)
protected

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

References ilFileInputGUI\setSuffixes().

Referenced by importFileObject().

1333  {
1334  include_once("Services/Form/classes/class.ilPropertyFormGUI.php");
1335  $form = new ilPropertyFormGUI();
1336  $form->setTarget("_top");
1337  $form->setFormAction($this->ctrl->getFormAction($this));
1338  $form->setTitle($this->lng->txt("import_qpl"));
1339 
1340  include_once("./Services/Form/classes/class.ilFileInputGUI.php");
1341  $fi = new ilFileInputGUI($this->lng->txt("import_file"), "xmldoc");
1342  $fi->setSuffixes(array("zip"));
1343  $fi->setRequired(true);
1344  $form->addItem($fi);
1345 
1346  $form->addCommandButton("importFile", $this->lng->txt("import"));
1347  $form->addCommandButton("cancel", $this->lng->txt("cancel"));
1348 
1349  return $form;
1350  }
This class represents a property form user interface.
This class represents a file property in a property 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 1592 of file class.ilObjQuestionPoolGUI.php.

References ilObjQuestionPool\isSkillManagementGloballyActivated().

Referenced by getTabs().

1593  {
1594  if (!($this->object instanceof ilObjQuestionPool)) {
1595  return false;
1596  }
1597 
1598  if (!$this->object->isSkillServiceEnabled()) {
1599  return false;
1600  }
1601 
1603  return false;
1604  }
1605 
1606  return true;
1607  }
+ 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 1293 of file class.ilObjQuestionPoolGUI.php.

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

1294  {
1295  if (isset($_POST["q_id"]) && is_array($_POST["q_id"]) && count($_POST["q_id"]) > 0) {
1296  foreach ($_POST["q_id"] as $key => $value) {
1297  $this->object->moveToClipboard($value);
1298  }
1299  ilUtil::sendInfo($this->lng->txt("qpl_move_insert_clipboard"), true);
1300  } elseif (isset($_GET['q_id']) && $_GET['q_id'] > 0) {
1301  $this->object->moveToClipboard((int) $_GET['q_id']);
1302  ilUtil::sendInfo($this->lng->txt("qpl_copy_insert_clipboard"), true);
1303  } else {
1304  ilUtil::sendInfo($this->lng->txt("qpl_move_select_none"), true);
1305  }
1306  $this->ctrl->redirect($this, "questions");
1307  }
$_GET["client_id"]
static sendInfo($a_info="", $a_keep=false)
Send Info Message to Screen.
$_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 1257 of file class.ilObjQuestionPoolGUI.php.

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

1258  {
1259  if (array_key_exists("qpl_clipboard", $_SESSION)) {
1260  if ($this->object->pasteFromClipboard()) {
1261  ilUtil::sendSuccess($this->lng->txt("qpl_paste_success"), true);
1262  } else {
1263  ilUtil::sendFailure($this->lng->txt("qpl_paste_error"), true);
1264  }
1265  } else {
1266  ilUtil::sendInfo($this->lng->txt("qpl_paste_no_objects"), true);
1267  }
1268  $this->ctrl->redirect($this, "questions");
1269  }
$_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 881 of file class.ilObjQuestionPoolGUI.php.

References $_GET, and $type.

882  {
883  //echo "<br>ilObjQuestionPoolGUI->questionObject()";
884  $type = $_GET["sel_question_types"];
885  $this->editQuestionForm($type);
886  }
$type
$_GET["client_id"]

◆ questionsObject()

ilObjQuestionPoolGUI::questionsObject ( )

list questions of question pool

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

References $_GET, $_SESSION, $DIC, $ilCtrl, $ilDB, $ilUser, ilObjectGUI\$lng, ilObjectGUI\$rbacsystem, 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().

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

References ilAssQuestionSkillAssignmentImportFails\deleteRegisteredImportFails().

995  {
996  require_once 'Modules/TestQuestionPool/classes/questions/class.ilAssQuestionSkillAssignmentImportFails.php';
997  $qsaImportFails = new ilAssQuestionSkillAssignmentImportFails($this->object->getId());
998  $qsaImportFails->deleteRegisteredImportFails();
999 
1000  $this->ctrl->redirect($this, 'infoScreen');
1001  }
+ Here is the call graph for this function:

◆ resetFilterObject()

ilObjQuestionPoolGUI::resetFilterObject ( )

resets filter

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

References $_POST, and questionsObject().

467  {
468  $_POST["filter_text"] = "";
469  $_POST["sel_filter_type"] = "";
470  $this->questionsObject();
471  }
questionsObject()
list questions of question pool
$_POST["username"]
+ Here is the call graph for this function:

◆ resetQuestionBrowserObject()

ilObjQuestionPoolGUI::resetQuestionBrowserObject ( )

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

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

983  {
984  require_once 'Services/Taxonomy/classes/class.ilObjTaxonomy.php';
985  $taxIds = ilObjTaxonomy::getUsageOfObject($this->object->getId());
986 
987  include_once "./Modules/TestQuestionPool/classes/tables/class.ilQuestionBrowserTableGUI.php";
988  $table_gui = new ilQuestionBrowserTableGUI($this, 'questions', false, false, $taxIds);
989  $table_gui->resetOffset();
990  $table_gui->resetFilter();
991  $this->questionsObject();
992  }
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 1404 of file class.ilObjQuestionPoolGUI.php.

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

1405  {
1406  parent::setTitleAndDescription();
1407  if ($_GET["q_id"] > 0) {
1408  include_once "./Modules/TestQuestionPool/classes/class.assQuestionGUI.php";
1409  $q_gui = assQuestionGUI::_getQuestionGUI("", $_GET["q_id"]);
1410  if ($q_gui->object instanceof assQuestion) {
1411  $q_gui->object->setObjId($this->object->getId());
1412  $title = $q_gui->object->getTitle();
1413  if (!$title) {
1414  $title = $this->lng->txt('new') . ': ' . assQuestion::_getQuestionTypeName($q_gui->object->getQuestionType());
1415  }
1416  $this->tpl->setTitle($title);
1417  $this->tpl->setDescription($q_gui->object->getComment());
1418  $this->tpl->setTitleIcon(ilObject2::_getIcon("", "big", $this->object->getType()));
1419  } else {
1420  // Workaround for context issues: If no object was found, redirect without q_id parameter
1421  $this->ctrl->setParameter($this, 'q_id', '');
1422  $this->ctrl->redirect($this);
1423  }
1424  } else {
1425  $this->tpl->setTitle($this->object->getTitle());
1426  $this->tpl->setDescription($this->object->getLongDescription());
1427  $this->tpl->setTitleIcon(ilObject2::_getIcon("", "big", $this->object->getType()));
1428  }
1429  }
$_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 1247 of file class.ilObjQuestionPoolGUI.php.

1248  {
1249  // $this->update = $this->object->updateMetaData();
1250  $this->update = $this->object->update();
1251  ilUtil::sendSuccess($this->lng->txt("msg_obj_modified"), true);
1252  }

◆ uploadObject()

ilObjQuestionPoolGUI::uploadObject ( )

imports question(s) into the questionpool

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

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

767  {
768  $upload_valid = true;
769  $form = $this->getImportQuestionsForm();
770  if ($form->checkInput()) {
771  if (!$this->uploadQplObject(true)) {
772  $form->setValuesByPost();
773  $this->importQuestionsObject($form);
774  }
775  } else {
776  $form->setValuesByPost();
777  $this->importQuestionsObject($form);
778  }
779  }
importQuestionsObject(ilPropertyFormGUI $form=null)
display the import form to import questions into the questionpool
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 487 of file class.ilObjQuestionPoolGUI.php.

References $_SESSION, $DIC, $result, $rows, $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, ilUtil\moveUploadedFile(), 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().

488  {
489  $this->ctrl->setParameter($this, 'new_type', $_REQUEST['new_type']);
490  if ($_FILES["xmldoc"]["error"] > UPLOAD_ERR_OK) {
491  ilUtil::sendFailure($this->lng->txt("error_upload"), true);
492  if (!$questions_only) {
493  $this->ctrl->redirect($this, 'create');
494  }
495  return false;
496  }
497  // create import directory
498  include_once "./Modules/TestQuestionPool/classes/class.ilObjQuestionPool.php";
500 
501  global $DIC; /* @var ILIAS\DI\Container $DIC */
502  // copy uploaded file to import directory
503  $file = pathinfo($_FILES["xmldoc"]["name"]);
504  $full_path = $basedir . "/" . $_FILES["xmldoc"]["name"];
505  $DIC['ilLog']->write(__METHOD__ . ": full path " . $full_path);
506  include_once "./Services/Utilities/classes/class.ilUtil.php";
507  ilUtil::moveUploadedFile($_FILES["xmldoc"]["tmp_name"], $_FILES["xmldoc"]["name"], $full_path);
508  $DIC['ilLog']->write(__METHOD__ . ": full path " . $full_path);
509  if (strcmp($_FILES["xmldoc"]["type"], "text/xml") == 0) {
510  $qti_file = $full_path;
512  } else {
513  // unzip file
514  ilUtil::unzip($full_path);
515 
516  // determine filenames of xml files
517  $subdir = basename($file["basename"], "." . $file["extension"]);
519  $xml_file = ilObjQuestionPool::_getImportDirectory() . '/' . $subdir . '/' . $subdir . ".xml";
520  $qti_file = ilObjQuestionPool::_getImportDirectory() . '/' . $subdir . '/' . str_replace("qpl", "qti", $subdir) . ".xml";
521  }
522 
523  // start verification of QTI files
524  include_once "./Services/QTI/classes/class.ilQTIParser.php";
525  $qtiParser = new ilQTIParser($qti_file, IL_MO_VERIFY_QTI, 0, "");
526  $result = $qtiParser->startParsing();
527  $founditems = &$qtiParser->getFoundItems();
528  if (count($founditems) == 0) {
529  // nothing found
530 
531  // delete import directory
532  ilUtil::delDir($basedir);
533 
534  ilUtil::sendFailure($this->lng->txt("qpl_import_no_items"), true);
535  if (!$questions_only) {
536  $this->ctrl->redirect($this, 'create');
537  }
538  return false;
539  }
540 
541  $complete = 0;
542  $incomplete = 0;
543  foreach ($founditems as $item) {
544  if (strlen($item["type"])) {
545  $complete++;
546  } else {
547  $incomplete++;
548  }
549  }
550 
551  if ($complete == 0) {
552  // delete import directory
553  ilUtil::delDir($basedir);
554 
555  ilUtil::sendFailure($this->lng->txt("qpl_import_non_ilias_files"), true);
556  if (!$questions_only) {
557  $this->ctrl->redirect($this, 'create');
558  }
559  return false;
560  }
561 
562  $_SESSION["qpl_import_xml_file"] = $xml_file;
563  $_SESSION["qpl_import_qti_file"] = $qti_file;
564  $_SESSION["qpl_import_subdir"] = $subdir;
565 
566  $this->tpl->addBlockFile("ADM_CONTENT", "adm_content", "tpl.qpl_import_verification.html", "Modules/TestQuestionPool");
567 
568  require_once 'Modules/TestQuestionPool/classes/tables/class.ilQuestionPoolImportVerificationTableGUI.php';
569  $table = new ilQuestionPoolImportVerificationTableGUI($this, 'uploadQplObject');
570  $rows = array();
571 
572  foreach ($founditems as $item) {
573  $row = array(
574  'title' => $item['title'],
575  'ident' => $item['ident'],
576  );
577 
578  include_once "./Services/QTI/classes/class.ilQTIItem.php";
579  switch ($item["type"]) {
581  $type = $this->lng->txt("assClozeTest");
582  break;
584  $type = $this->lng->txt("assImagemapQuestion");
585  break;
587  $type = $this->lng->txt("assJavaApplet");
588  break;
590  $type = $this->lng->txt("assMatchingQuestion");
591  break;
593  $type = $this->lng->txt("assMultipleChoice");
594  break;
596  $type = $this->lng->txt("assKprimChoice");
597  break;
599  $type = $this->lng->txt("assLongMenu");
600  break;
602  $type = $this->lng->txt("assSingleChoice");
603  break;
605  $type = $this->lng->txt("assOrderingQuestion");
606  break;
608  $type = $this->lng->txt("assTextQuestion");
609  break;
611  $type = $this->lng->txt("assNumeric");
612  break;
614  $type = $this->lng->txt("assTextSubset");
615  break;
616  default:
617  $type = $this->lng->txt($item["type"]);
618  break;
619  }
620 
621  if (strcmp($type, "-" . $item["type"] . "-") == 0) {
622  global $DIC;
623  $ilPluginAdmin = $DIC['ilPluginAdmin'];
624  $pl_names = $ilPluginAdmin->getActivePluginsForSlot(IL_COMP_MODULE, "TestQuestionPool", "qst");
625  foreach ($pl_names as $pl_name) {
626  $pl = ilPlugin::getPluginObject(IL_COMP_MODULE, "TestQuestionPool", "qst", $pl_name);
627  if (strcmp($pl->getQuestionType(), $item["type"]) == 0) {
628  $type = $pl->getQuestionTypeTranslation();
629  }
630  }
631  }
632 
633  $row['type'] = $type;
634 
635  $rows[] = $row;
636  }
637  $table->setData($rows);
638 
639  $this->tpl->setCurrentBlock("import_qpl");
640  if (is_file($xml_file)) {
641  // read file into a string
642  $fh = @fopen($xml_file, "r") or die("");
643  $xml = @fread($fh, filesize($xml_file));
644  @fclose($fh);
645  if (preg_match("/<ContentObject.*?MetaData.*?General.*?Title[^>]*?>([^<]*?)</", $xml, $matches)) {
646  $this->tpl->setVariable("VALUE_NEW_QUESTIONPOOL", $matches[1]);
647  }
648  }
649  $this->tpl->setVariable("TEXT_CREATE_NEW_QUESTIONPOOL", $this->lng->txt("qpl_import_create_new_qpl"));
650  $this->tpl->parseCurrentBlock();
651 
652  $this->tpl->setCurrentBlock("adm_content");
653  $this->tpl->setVariable("FOUND_QUESTIONS_INTRODUCTION", $this->lng->txt("qpl_import_verify_found_questions"));
654  if ($questions_only) {
655  $this->tpl->setVariable("VERIFICATION_HEADING", $this->lng->txt("import_questions_into_qpl"));
656  $this->tpl->setVariable("FORMACTION", $this->ctrl->getFormAction($this));
657  } else {
658  $this->tpl->setVariable("VERIFICATION_HEADING", $this->lng->txt("import_qpl"));
659 
660  $this->ctrl->setParameter($this, "new_type", $this->type);
661  $this->tpl->setVariable("FORMACTION", $this->ctrl->getFormAction($this));
662  }
663 
664  $value_questions_only = 0;
665  if ($questions_only) {
666  $value_questions_only = 1;
667  }
668  $this->tpl->setVariable("VALUE_QUESTIONS_ONLY", $value_questions_only);
669  $this->tpl->setVariable("VERIFICATION_TABLE", $table->getHtml());
670  $this->tpl->setVariable("VERIFICATION_FORM_NAME", $table->getFormName());
671 
672  $this->tpl->parseCurrentBlock();
673 
674  return true;
675  }
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
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
static moveUploadedFile($a_file, $a_name, $a_target, $a_raise_errors=true, $a_mode="move_uploaded")
move uploaded file
const ORDERING_QUESTION_IDENTIFIER
static _setImportDirectory($a_import_dir=null)
set import directory
const IL_COMP_MODULE
$xml
Definition: metadata.php:332
const TEXT_QUESTION_IDENTIFIER
static sendFailure($a_info="", $a_keep=false)
Send Failure Message to Screen.
$rows
Definition: xhr_table.php:10
$DIC
Definition: xapitoken.php:46
static _getImportDirectory()
get import directory of lm
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

◆ $error

ilObjQuestionPoolGUI::$error
private

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

◆ $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: