ILIAS
release_5-4 Revision v5.4.26-12-gabc799a52e6
|
Public Member Functions | |
__construct ($a_id=0, $a_call_by_reference=true) | |
Constructor public. More... | |
create ($a_upload=false) | |
create question pool object More... | |
update () | |
update object data More... | |
read () | |
read object data from db into object public More... | |
cloneObject ($a_target_id, $a_copy_id=0, $a_omit_tree=false) | |
Creates a 1:1 copy of the object and places the copy in a given repository. More... | |
& | createQuestion ($question_type, $question_id=-1) |
copyQuestion ($question_id, $questionpool_to) | |
Copies a question into another question pool. More... | |
loadFromDb () | |
Loads a ilObjQuestionpool object from a database. More... | |
saveToDb () | |
Saves a ilObjSurveyQuestionPool object to a database. More... | |
delete () | |
delete object and all related data More... | |
deleteAllData () | |
removeQuestion ($question_id) | |
Removes a question from the question pool. More... | |
getQuestiontype ($question_id) | |
Returns the question type of a question with a given id. More... | |
isInUse ($question_id) | |
Checks if a question is in use by a survey. More... | |
paste ($question_id) | |
Pastes a question in the question pool. More... | |
& | getQuestionsInfo ($question_array) |
Retrieves the datase entries for questions from a given array. More... | |
duplicateQuestion ($question_id, $obj_id="") | |
Duplicates a question for a questionpool. More... | |
getQuestionsData ($arrFilter) | |
Calculates the data for the output of the questionpool. More... | |
createExportDirectory () | |
creates data directory for export files (data_dir/spl_data/spl_<id>/export, depending on data directory that is set in ILIAS setup/ini) More... | |
getExportDirectory () | |
get export directory of survey More... | |
getExportFiles ($dir) | |
get export files More... | |
createImportDirectory () | |
creates data directory for import files (data_dir/spl_data/spl_<id>/import, depending on data directory that is set in ILIAS setup/ini) More... | |
getImportDirectory () | |
get import directory of survey More... | |
toXML ($questions) | |
export questions to xml More... | |
& | getQuestions () |
importObject ($source, $spl_exists=false) | |
Imports survey questions into ILIAS. More... | |
setOnline ($a_online_status) | |
Sets the questionpool online status. More... | |
getOnline () | |
isPluginActive ($a_pname) | |
Checks whether or not a question plugin with a given name is active. More... | |
getQuestionInfos ($question_ids) | |
Returns title, description and type for an array of question id's. More... | |
purgeQuestions () | |
copyToClipboard ($question_id) | |
Copies a question to the clipboard. More... | |
moveToClipboard ($question_id) | |
Moves a question to the clipboard. More... | |
pasteFromClipboard () | |
Copies/Moves a question from the clipboard. More... | |
setObligatoryStates ($obligatory_questions) | |
Sets the obligatory states for questions in a survey from the questions form. More... | |
Public Member Functions inherited from ilObject | |
__construct ($a_id=0, $a_reference=true) | |
Constructor public. More... | |
withReferences () | |
determines wehter objects are referenced or not (got ref ids or not) More... | |
read () | |
read object data from db into object More... | |
getId () | |
get object id public More... | |
setId ($a_id) | |
set object id public More... | |
setRefId ($a_id) | |
set reference id public More... | |
getRefId () | |
get reference id public More... | |
getType () | |
get object type public More... | |
setType ($a_type) | |
set object type public More... | |
getPresentationTitle () | |
get presentation title Normally same as title Overwritten for sessions More... | |
getTitle () | |
get object title public More... | |
getUntranslatedTitle () | |
get untranslated object title public More... | |
setTitle ($a_title) | |
set object title More... | |
getDescription () | |
get object description More... | |
setDescription ($a_desc) | |
set object description More... | |
getLongDescription () | |
get object long description (stored in object_description) More... | |
getImportId () | |
get import id More... | |
setImportId ($a_import_id) | |
set import id More... | |
setOfflineStatus ($a_status) | |
Set offline status. More... | |
getOfflineStatus () | |
Get offline status. More... | |
supportsOfflineHandling () | |
Check whether object supports offline handling. More... | |
getOwner () | |
get object owner More... | |
getOwnerName () | |
setOwner ($a_owner) | |
set object owner More... | |
getCreateDate () | |
get create date public More... | |
getLastUpdateDate () | |
get last update date public More... | |
getDiskUsage () | |
Gets the disk usage of the object in bytes. More... | |
create () | |
create More... | |
update () | |
update object in db More... | |
MDUpdateListener ($a_element) | |
Meta data update listener. More... | |
createMetaData () | |
create meta data entry More... | |
updateMetaData () | |
update meta data entry More... | |
deleteMetaData () | |
delete meta data entry More... | |
updateOwner () | |
update owner of object in db More... | |
putInTree ($a_parent_ref) | |
maybe this method should be in tree object!? More... | |
setPermissions ($a_parent_ref) | |
set permissions of object More... | |
setParentRolePermissions ($a_parent_ref) | |
Initialize the permissions of parent roles (local roles of categories, global roles...) This method is overwritten in e.g courses, groups for building permission intersections with non_member templates. More... | |
createReference () | |
creates reference for object More... | |
countReferences () | |
count references of object More... | |
initDefaultRoles () | |
init default roles settings Purpose of this function is to create a local role folder and local roles, that are needed depending on the object type If you want to setup default local roles you MUST overwrite this method in derived object classes (see ilObjForum for an example) public More... | |
applyDidacticTemplate ($a_tpl_id) | |
Apply template. More... | |
setRegisterMode ($a_bool) | |
isUserRegistered ($a_user_id=0) | |
requireRegistration () | |
getXMLZip () | |
getHTMLDirectory () | |
appendCopyInfo ($a_target_id, $a_copy_id) | |
Prepend Copy info if object with same name exists in that container. More... | |
cloneDependencies ($a_target_id, $a_copy_id) | |
Clone object dependencies. More... | |
cloneMetaData ($target_obj) | |
Copy meta data. More... | |
getPossibleSubObjects ($a_filter=true) | |
get all possible subobjects of this type the object can decide which types of subobjects are possible jut in time overwrite if the decision distinguish from standard model More... | |
Static Public Member Functions | |
static | _setOnline ($a_obj_id, $a_online_status) |
static | _lookupOnline ($a_obj_id) |
static | _isWriteable ($object_id, $user_id) |
Returns true, if the question pool is writeable by a given user. More... | |
static | _getQuestiontypes () |
Creates a list of all available question types. More... | |
static | _getQuestionTypeTranslations () |
static | _getAvailableQuestionpools ($use_object_id=false, $could_be_offline=false, $showPath=false, $permission="read") |
Returns the available question pools for the active user. More... | |
Static Public Member Functions inherited from ilObject | |
static | _lookupObjIdByImportId ($a_import_id) |
static | _lookupImportId ($a_obj_id) |
static | _lookupOwnerName ($a_owner_id) |
lookup owner name for owner id More... | |
static | _getIdForImportId ($a_import_id) |
get current object id for import id (static) More... | |
static | _getAllReferences ($a_id) |
get all reference ids of object More... | |
static | _lookupTitle ($a_id) |
lookup object title More... | |
static | lookupOfflineStatus ($a_obj_id) |
Lookup offline status using objectDataCache. More... | |
static | _lookupOwner ($a_id) |
lookup object owner More... | |
static | _getIdsForTitle ($title, $type='', $partialmatch=false) |
static | _lookupDescription ($a_id) |
lookup object description More... | |
static | _lookupLastUpdate ($a_id, $a_as_string=false) |
lookup last update More... | |
static | _getLastUpdateOfObjects ($a_objs) |
Get last update for a set of media objects. More... | |
static | _lookupObjId ($a_id) |
static | _setDeletedDate ($a_ref_id) |
only called in ilTree::saveSubTree More... | |
static | setDeletedDates ($a_ref_ids) |
Set deleted date. More... | |
static | _resetDeletedDate ($a_ref_id) |
only called in ilObjectGUI::insertSavedNodes More... | |
static | _lookupDeletedDate ($a_ref_id) |
only called in ilObjectGUI::insertSavedNodes More... | |
static | _writeTitle ($a_obj_id, $a_title) |
write title to db (static) More... | |
static | _writeDescription ($a_obj_id, $a_desc) |
write description to db (static) More... | |
static | _writeImportId ($a_obj_id, $a_import_id) |
write import id to db (static) More... | |
static | _lookupType ($a_id, $a_reference=false) |
lookup object type More... | |
static | _isInTrash ($a_ref_id) |
checks wether object is in trash More... | |
static | _hasUntrashedReference ($a_obj_id) |
checks wether an object has at least one reference that is not in trash More... | |
static | _lookupObjectId ($a_ref_id) |
lookup object id More... | |
static | _getObjectsDataForType ($a_type, $a_omit_trash=false) |
get all objects of a certain type More... | |
static | _exists ($a_id, $a_reference=false, $a_type=null) |
checks if an object exists in object_data More... | |
static | _getObjectsByType ($a_obj_type="", $a_owner="") |
Get objects by type. More... | |
static | _prepareCloneSelection ($a_ref_ids, $new_type, $show_path=true) |
Prepare copy wizard object selection. More... | |
static | collectDeletionDependencies (&$deps, $a_ref_id, $a_obj_id, $a_type, $a_depth=0) |
Collect deletion dependencies. More... | |
static | getDeletionDependencies ($a_obj_id) |
Get deletion dependencies. More... | |
static | getLongDescriptions (array $a_obj_ids) |
Get long description data. More... | |
static | getAllOwnedRepositoryObjects ($a_user_id) |
Get all ids of objects user owns. More... | |
static | fixMissingTitles ($a_type, array &$a_obj_title_map) |
Try to fix missing object titles. More... | |
static | _lookupCreationDate ($a_id) |
Lookup creation date. More... | |
static | hasAutoRating ($a_type, $a_ref_id) |
Check if auto rating is active for parent group/course. More... | |
Data Fields | |
$online | |
Data Fields inherited from ilObject | |
const | TITLE_LENGTH = 255 |
max length of object title More... | |
const | DESC_LENGTH = 128 |
$lng | |
$id | |
$ref_id | |
$type | |
$title | |
$untranslatedTitle | |
$desc | |
$long_desc | |
$owner | |
$create_date | |
$last_update | |
$import_id | |
$register = false | |
$referenced | |
$objectList | |
$max_title | |
$max_desc | |
$add_dots | |
Protected Attributes | |
$user | |
$plugin_admin | |
Protected Attributes inherited from ilObject | |
$objDefinition | |
$db | |
$log | |
$error | |
$tree | |
$app_event_handler | |
$rbacadmin | |
$rbacreview | |
Definition at line 36 of file class.ilObjSurveyQuestionPool.php.
ilObjSurveyQuestionPool::__construct | ( | $a_id = 0 , |
|
$a_call_by_reference = true |
|||
) |
Constructor public.
integer | reference_id or object_id |
boolean | treat the id as reference_id (true) or object_id (false) |
Definition at line 61 of file class.ilObjSurveyQuestionPool.php.
|
static |
Returns the available question pools for the active user.
Definition at line 921 of file class.ilObjSurveyQuestionPool.php.
References $DIC, $ilDB, $ilUser, ilObject\$ref_id, $result, $row, ilUtil\_getObjectsByOperations(), ilObject\_lookupObjectId(), and ilObject\_prepareCloneSelection().
Referenced by ilSurveyQuestionbrowserTableGUI\__construct(), ilObjSurvey\getAvailableQuestionpools(), and ilObjSurvey\getQuestionpoolTitles().
|
static |
Creates a list of all available question types.
Definition at line 811 of file class.ilObjSurveyQuestionPool.php.
References $DIC, $ilDB, ilObject\$lng, $row, ilObject\$type, ilPlugin\getPluginObject(), and IL_COMP_MODULE.
Referenced by ilSurveyPageGUI\addQuestion(), ilSurveyPageGUI\addQuestionToolbarForm(), ilSurveyPageGUI\getPageNodes(), ilSurveyQuestionTableGUI\importData(), and ilSurveyEditorGUI\questionsObject().
|
static |
Definition at line 880 of file class.ilObjSurveyQuestionPool.php.
References $DIC, $ilDB, $ilLog, ilObject\$lng, $result, $row, ilPlugin\getPluginObject(), and IL_COMP_MODULE.
Referenced by ilObjSurvey\getQuestionsTable().
|
static |
Returns true, if the question pool is writeable by a given user.
integer | $object_id | The object id of the question pool |
integer | $user_id | The database id of the user public |
Definition at line 786 of file class.ilObjSurveyQuestionPool.php.
References $DIC, $ilDB, $result, ilObject\_getAllReferences(), and ilObject\_hasUntrashedReference().
Referenced by SurveyQuestion\_isWriteable().
|
static |
Definition at line 761 of file class.ilObjSurveyQuestionPool.php.
References $DIC, $ilDB, $result, and $row.
Referenced by ilObjSurveyQuestionPoolListGUI\getProperties().
|
static |
Definition at line 713 of file class.ilObjSurveyQuestionPool.php.
ilObjSurveyQuestionPool::cloneObject | ( | $a_target_id, | |
$a_copy_id = 0 , |
|||
$a_omit_tree = false |
|||
) |
Creates a 1:1 copy of the object and places the copy in a given repository.
public
Definition at line 117 of file class.ilObjSurveyQuestionPool.php.
References $ilLog, ilObject\$log, ilCopyWizardOptions\_getInstance(), ilObject\getId(), getOnline(), getQuestions(), and ilObject\getType().
ilObjSurveyQuestionPool::copyQuestion | ( | $question_id, | |
$questionpool_to | |||
) |
Copies a question into another question pool.
integer | $question_id | Database id of the question |
integer | $questionpool_to | Database id of the target questionpool public |
Definition at line 170 of file class.ilObjSurveyQuestionPool.php.
References createQuestion(), duplicateQuestion(), and ilObject\getId().
Referenced by pasteFromClipboard().
ilObjSurveyQuestionPool::copyToClipboard | ( | $question_id | ) |
Copies a question to the clipboard.
integer | $question_id | Object id of the question |
Definition at line 1018 of file class.ilObjSurveyQuestionPool.php.
References $_SESSION.
ilObjSurveyQuestionPool::create | ( | $a_upload = false | ) |
create question pool object
Definition at line 76 of file class.ilObjSurveyQuestionPool.php.
References ilObject\createMetaData().
ilObjSurveyQuestionPool::createExportDirectory | ( | ) |
creates data directory for export files (data_dir/spl_data/spl_<id>/export, depending on data directory that is set in ILIAS setup/ini)
ilSurveyException |
Definition at line 477 of file class.ilObjSurveyQuestionPool.php.
References ilUtil\getDataDir(), ilObject\getId(), and ilUtil\makeDir().
ilObjSurveyQuestionPool::createImportDirectory | ( | ) |
creates data directory for import files (data_dir/spl_data/spl_<id>/import, depending on data directory that is set in ILIAS setup/ini)
ilSurveyException |
Definition at line 553 of file class.ilObjSurveyQuestionPool.php.
References ilUtil\getDataDir(), ilObject\getId(), and ilUtil\makeDir().
& ilObjSurveyQuestionPool::createQuestion | ( | $question_type, | |
$question_id = -1 |
|||
) |
Definition at line 146 of file class.ilObjSurveyQuestionPool.php.
References getQuestiontype().
Referenced by copyQuestion().
ilObjSurveyQuestionPool::delete | ( | ) |
delete object and all related data
public
Definition at line 248 of file class.ilObjSurveyQuestionPool.php.
References deleteAllData(), and ilObject\deleteMetaData().
ilObjSurveyQuestionPool::deleteAllData | ( | ) |
Definition at line 265 of file class.ilObjSurveyQuestionPool.php.
References ilObject\$db, $ilDB, $result, $row, ilUtil\delDir(), ilUtil\getDataDir(), ilObject\getId(), and removeQuestion().
Referenced by delete().
ilObjSurveyQuestionPool::duplicateQuestion | ( | $question_id, | |
$obj_id = "" |
|||
) |
Duplicates a question for a questionpool.
integer | $question_id | The database id of the question public |
Definition at line 404 of file class.ilObjSurveyQuestionPool.php.
References $ilUser, $user, and SurveyQuestion\_instanciateQuestion().
Referenced by copyQuestion(), and paste().
ilObjSurveyQuestionPool::getExportDirectory | ( | ) |
get export directory of survey
Definition at line 505 of file class.ilObjSurveyQuestionPool.php.
References ilUtil\getDataDir(), and ilObject\getId().
ilObjSurveyQuestionPool::getExportFiles | ( | $dir | ) |
ilObjSurveyQuestionPool::getImportDirectory | ( | ) |
get import directory of survey
Definition at line 583 of file class.ilObjSurveyQuestionPool.php.
References ilUtil\getDataDir(), and ilObject\getId().
ilObjSurveyQuestionPool::getOnline | ( | ) |
Definition at line 753 of file class.ilObjSurveyQuestionPool.php.
References $online.
Referenced by cloneObject(), saveToDb(), and toXML().
ilObjSurveyQuestionPool::getQuestionInfos | ( | $question_ids | ) |
Returns title, description and type for an array of question id's.
array | $question_ids | An array of question id's |
Definition at line 973 of file class.ilObjSurveyQuestionPool.php.
References $data, ilObject\$db, and $ilDB.
& ilObjSurveyQuestionPool::getQuestions | ( | ) |
Definition at line 655 of file class.ilObjSurveyQuestionPool.php.
References ilObject\$db, $ilDB, $result, $row, and ilObject\getId().
Referenced by cloneObject(), setObligatoryStates(), and toXML().
ilObjSurveyQuestionPool::getQuestionsData | ( | $arrFilter | ) |
Calculates the data for the output of the questionpool.
public
Definition at line 428 of file class.ilObjSurveyQuestionPool.php.
References ilObject\$db, $ilDB, $ilUser, $key, $row, $rows, $user, ilObject\getId(), and isPluginActive().
& ilObjSurveyQuestionPool::getQuestionsInfo | ( | $question_array | ) |
Retrieves the datase entries for questions from a given array.
array | $question_array | An array containing the id's of the questions |
Definition at line 381 of file class.ilObjSurveyQuestionPool.php.
References ilObject\$db, $ilDB, $result, $row, and isPluginActive().
ilObjSurveyQuestionPool::getQuestiontype | ( | $question_id | ) |
Returns the question type of a question with a given id.
integer | $question_id | The database id of the question |
Definition at line 309 of file class.ilObjSurveyQuestionPool.php.
References $data, ilObject\$db, $ilDB, and $result.
Referenced by createQuestion(), and toXML().
ilObjSurveyQuestionPool::importObject | ( | $source, | |
$spl_exists = false |
|||
) |
Imports survey questions into ILIAS.
string | $source | The filename of an XML import file public |
Definition at line 678 of file class.ilObjSurveyQuestionPool.php.
References $source, $xml, ilUtil\delDir(), ilObject\getId(), and ilUtil\unzip().
ilObjSurveyQuestionPool::isInUse | ( | $question_id | ) |
Checks if a question is in use by a survey.
integer | $question_id | The database id of the question |
Definition at line 335 of file class.ilObjSurveyQuestionPool.php.
References ilObject\$db, $ilDB, $result, and $row.
ilObjSurveyQuestionPool::isPluginActive | ( | $a_pname | ) |
Checks whether or not a question plugin with a given name is active.
string | $a_pname | The plugin name public |
Definition at line 957 of file class.ilObjSurveyQuestionPool.php.
References $plugin_admin, and IL_COMP_MODULE.
Referenced by getQuestionsData(), and getQuestionsInfo().
ilObjSurveyQuestionPool::loadFromDb | ( | ) |
Loads a ilObjQuestionpool object from a database.
public
Definition at line 195 of file class.ilObjSurveyQuestionPool.php.
References ilObject\$db, $ilDB, $result, $row, ilObject\getId(), and setOnline().
Referenced by read().
ilObjSurveyQuestionPool::moveToClipboard | ( | $question_id | ) |
Moves a question to the clipboard.
integer | $question_id | Object id of the question |
Definition at line 1031 of file class.ilObjSurveyQuestionPool.php.
References $_SESSION.
ilObjSurveyQuestionPool::paste | ( | $question_id | ) |
Pastes a question in the question pool.
integer | $question_id | The database id of the question public |
Definition at line 369 of file class.ilObjSurveyQuestionPool.php.
References duplicateQuestion(), and ilObject\getId().
ilObjSurveyQuestionPool::pasteFromClipboard | ( | ) |
Copies/Moves a question from the clipboard.
Definition at line 1042 of file class.ilObjSurveyQuestionPool.php.
References $_SESSION, ilObject\$db, $ilDB, $result, $row, copyQuestion(), ilObject\getId(), ilUtil\makeDirParents(), and ilUtil\sendFailure().
ilObjSurveyQuestionPool::purgeQuestions | ( | ) |
Definition at line 998 of file class.ilObjSurveyQuestionPool.php.
References $data, ilObject\$db, $ilDB, $ilUser, $result, $user, and removeQuestion().
ilObjSurveyQuestionPool::read | ( | ) |
read object data from db into object public
Definition at line 106 of file class.ilObjSurveyQuestionPool.php.
References loadFromDb().
ilObjSurveyQuestionPool::removeQuestion | ( | $question_id | ) |
Removes a question from the question pool.
integer | $question_id | The database id of the question private |
Definition at line 292 of file class.ilObjSurveyQuestionPool.php.
References SurveyQuestion\_instanciateQuestion().
Referenced by deleteAllData(), and purgeQuestions().
ilObjSurveyQuestionPool::saveToDb | ( | ) |
Saves a ilObjSurveyQuestionPool object to a database.
public
Definition at line 215 of file class.ilObjSurveyQuestionPool.php.
References ilObject\$db, $ilDB, $query, $result, ilObject\getId(), getOnline(), and League\Flysystem\Adapter\Polyfill\update().
ilObjSurveyQuestionPool::setObligatoryStates | ( | $obligatory_questions | ) |
Sets the obligatory states for questions in a survey from the questions form.
array | $obligatory_questions | The questions which should be set obligatory from the questions form, the remaining questions should be setted not obligatory public |
Definition at line 1094 of file class.ilObjSurveyQuestionPool.php.
References ilObject\$db, $ilDB, and getQuestions().
ilObjSurveyQuestionPool::setOnline | ( | $a_online_status | ) |
Sets the questionpool online status.
integer | $a_online_status | Online status of the questionpool |
Definition at line 740 of file class.ilObjSurveyQuestionPool.php.
Referenced by loadFromDb().
ilObjSurveyQuestionPool::toXML | ( | $questions | ) |
export questions to xml
Definition at line 597 of file class.ilObjSurveyQuestionPool.php.
References $key, $metadata, $xml, SurveyQuestion\_includeClass(), ilObject\getId(), getOnline(), getQuestions(), getQuestiontype(), ilObject\getTitle(), ilObject\getType(), and ilXmlWriter\xmlHeader().
ilObjSurveyQuestionPool::update | ( | ) |
update object data
public
Definition at line 90 of file class.ilObjSurveyQuestionPool.php.
References League\Flysystem\Adapter\Polyfill\update(), and ilObject\updateMetaData().
ilObjSurveyQuestionPool::$online |
Definition at line 53 of file class.ilObjSurveyQuestionPool.php.
Referenced by getOnline().
|
protected |
Definition at line 46 of file class.ilObjSurveyQuestionPool.php.
Referenced by isPluginActive().
|
protected |
Definition at line 41 of file class.ilObjSurveyQuestionPool.php.
Referenced by duplicateQuestion(), getQuestionsData(), and purgeQuestions().