ILIAS
Release_3_10_x_branch Revision 61812
|
Public Member Functions | |
ilObjSurveyQuestionPool ($a_id=0, $a_call_by_reference=true) | |
Constructor public. | |
create ($a_upload=false) | |
create question pool object | |
update () | |
update object data | |
read ($a_force_db=false) | |
read object data from db into object | |
cloneObject ($a_target_id, $a_copy_id=0) | |
Creates a 1:1 copy of the object and places the copy in a given repository. | |
& | createQuestion ($question_type, $question_id=-1) |
copyQuestion ($question_id, $questionpool_to) | |
Copies a question into another question pool. | |
loadFromDb () | |
Loads a ilObjQuestionpool object from a database. | |
saveToDb () | |
Saves a ilObjSurveyQuestionPool object to a database. | |
delete () | |
delete object and all related data | |
deleteAllData () | |
notify ($a_event, $a_ref_id, $a_parent_non_rbac_id, $a_node_id, $a_params=0) | |
notifys an object about an event occured Based on the event happend, each object may decide how it reacts. | |
getTitle () | |
get title of survey question pool object | |
setTitle ($a_title) | |
set title of survey question pool object | |
removeQuestion ($question_id) | |
Removes a question from the question pool. | |
getQuestiontype ($question_id) | |
Returns the question type of a question with a given id. | |
isInUse ($question_id) | |
Checks if a question is in use by a survey. | |
paste ($question_id) | |
Pastes a question in the question pool. | |
& | getQuestionsInfo ($question_array) |
Retrieves the datase entries for questions from a given array. | |
duplicateQuestion ($question_id, $obj_id="") | |
Duplicates a question for a questionpool. | |
getQuestionsTable ($sort, $sortorder, $filter_text, $sel_filter_type, $startrow=0) | |
Calculates the data for the output of the questionpool. | |
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) | |
getExportDirectory () | |
get export directory of survey | |
getExportFiles ($dir) | |
get export files | |
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) | |
getImportDirectory () | |
get import directory of survey | |
toXML ($questions) | |
export questions to xml | |
& | getQuestions () |
importObject ($source, $spl_exists=FALSE) | |
Imports survey questions into ILIAS. | |
setOnline ($a_online_status) | |
Sets the questionpool online status. | |
getOnline () | |
_lookupOnline ($a_obj_id) | |
_isWriteable ($object_id, $user_id) | |
Returns true, if the question pool is writeable by a given user. | |
& | _getQuestiontypes () |
Creates a list of all available question types. | |
& | _getAvailableQuestionpools ($use_object_id=FALSE, $could_be_offline=FALSE, $showPath=FALSE, $permission="read") |
Returns the available question pools for the active user. | |
isPluginActive ($a_pname) | |
Checks wheather or not a question plugin with a given name is active. | |
Public Member Functions inherited from ilObject | |
ilObject ($a_id=0, $a_reference=true) | |
Constructor public. | |
withReferences () | |
determines wehter objects are referenced or not (got ref ids or not) | |
getId () | |
get object id public | |
setId ($a_id) | |
set object id public | |
setRefId ($a_id) | |
set reference id public | |
getRefId () | |
get reference id public | |
getType () | |
get object type public | |
setType ($a_type) | |
set object type public | |
getPresentationTitle () | |
get presentation title Normally same as title Overwritten for sessions | |
getUntranslatedTitle () | |
get untranslated object title public | |
getDescription () | |
get object description | |
setDescription ($a_desc) | |
set object description | |
getLongDescription () | |
get object long description (stored in object_description) | |
getImportId () | |
get import id | |
setImportId ($a_import_id) | |
set import id | |
_lookupObjIdByImportId ($a_import_id) | |
getOwner () | |
get object owner | |
getOwnerName () | |
_lookupOwnerName ($a_owner_id) | |
lookup owner name for owner id | |
setOwner ($a_owner) | |
set object owner | |
getCreateDate () | |
get create date public | |
getLastUpdateDate () | |
get last update date public | |
setObjDataRecord ($a_record) | |
set object_data record (note: this method should only be called from the ilObjectFactory class) | |
create () | |
create | |
MDUpdateListener ($a_element) | |
Meta data update listener. | |
createMetaData () | |
create meta data entry | |
updateMetaData () | |
update meta data entry | |
deleteMetaData () | |
delete meta data entry | |
updateOwner () | |
update owner of object in db | |
_getIdForImportId ($a_import_id) | |
get current object id for import id (static) | |
_getAllReferences ($a_id) | |
get all reference ids of object | |
_lookupTitle ($a_id) | |
lookup object title | |
_lookupDescription ($a_id) | |
lookup object description | |
_lookupLastUpdate ($a_id, $a_as_string=false) | |
lookup last update | |
_getLastUpdateOfObjects ($a_objs) | |
Get last update for a set of media objects. | |
_lookupObjId ($a_id) | |
_setDeletedDate ($a_ref_id) | |
only called in ilTree::saveSubTree | |
_resetDeletedDate ($a_ref_id) | |
only called in ilObjectGUI::insertSavedNodes | |
_writeTitle ($a_obj_id, $a_title) | |
write title to db (static) | |
_writeDescription ($a_obj_id, $a_desc) | |
write description to db (static) | |
_writeImportId ($a_obj_id, $a_import_id) | |
write import id to db (static) | |
_lookupType ($a_id, $a_reference=false) | |
lookup object type | |
_isInTrash ($a_ref_id) | |
checks wether object is in trash | |
_hasUntrashedReference ($a_obj_id) | |
checks wether an object has at least one reference that is not in trash | |
_lookupObjectId ($a_ref_id) | |
lookup object id | |
_getObjectsDataForType ($a_type, $a_omit_trash=false) | |
get all objects of a certain type | |
putInTree ($a_parent_ref) | |
maybe this method should be in tree object!? | |
setPermissions ($a_parent_ref) | |
set permissions of object | |
createReference () | |
creates reference for object | |
countReferences () | |
count references of object | |
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 | |
createRoleFolder () | |
creates a local role folder | |
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. | |
cloneDependencies ($a_target_id, $a_copy_id) | |
Clone object dependencies. | |
cloneMetaData ($target_obj) | |
Copy meta data. |
Data Fields | |
$online | |
Data Fields inherited from ilObject | |
$ilias | |
$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 | |
$obj_data_record | |
object_data record |
Additional Inherited Members | |
Static Public Member Functions inherited from ilObject | |
static | _getIdsForTitle ($title, $type= '') |
_exists ($a_id, $a_reference=false) | |
checks if an object exists in object_data | |
static | _getObjectsByType ($a_obj_type="") |
Get objects by type. | |
static | _prepareCloneSelection ($a_ref_ids, $new_type) |
Prepare copy wizard object selection. | |
static | _getIcon ($a_obj_id="", $a_size="big", $a_type="", $a_offline=false) |
Definition at line 37 of file class.ilObjSurveyQuestionPool.php.
& ilObjSurveyQuestionPool::_getAvailableQuestionpools | ( | $use_object_id = FALSE , |
|
$could_be_offline = FALSE , |
|||
$showPath = FALSE , |
|||
$permission = "read" |
|||
) |
Returns the available question pools for the active user.
Returns the available question pools for the active user
Definition at line 1018 of file class.ilObjSurveyQuestionPool.php.
References $result, ilObject\$title, ilUtil\_getObjectsByOperations(), and ilObject\_prepareCloneSelection().
Referenced by ilObjSurvey\getAvailableQuestionpools(), and ilObjSurvey\getQuestionpoolTitles().
& ilObjSurveyQuestionPool::_getQuestiontypes | ( | ) |
Creates a list of all available question types.
Creates a list of all available question types
Definition at line 976 of file class.ilObjSurveyQuestionPool.php.
References ilObject\$lng, ilPlugin\getPluginObject(), and IL_COMP_MODULE.
Referenced by ilObjSurveyGUI\browseForQuestionsObject(), and ilObjSurveyGUI\questionsObject().
ilObjSurveyQuestionPool::_isWriteable | ( | $object_id, | |
$user_id | |||
) |
Returns true, if the question pool is writeable by a given user.
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 947 of file class.ilObjSurveyQuestionPool.php.
References $result, and ilObject\_hasUntrashedReference().
ilObjSurveyQuestionPool::_lookupOnline | ( | $a_obj_id | ) |
Definition at line 922 of file class.ilObjSurveyQuestionPool.php.
References $result.
Referenced by ilObjSurveyQuestionPoolListGUI\getProperties().
ilObjSurveyQuestionPool::cloneObject | ( | $a_target_id, | |
$a_copy_id = 0 |
|||
) |
Creates a 1:1 copy of the object and places the copy in a given repository.
Creates a 1:1 copy of the object and places the copy in a given repository
public
Reimplemented from ilObject.
Definition at line 107 of file class.ilObjSurveyQuestionPool.php.
References $ilLog, ilObject\getId(), getOnline(), getQuestions(), and ilObject\getType().
ilObjSurveyQuestionPool::copyQuestion | ( | $question_id, | |
$questionpool_to | |||
) |
Copies a question into another question pool.
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 158 of file class.ilObjSurveyQuestionPool.php.
References createQuestion(), duplicateQuestion(), and ilObject\getId().
ilObjSurveyQuestionPool::create | ( | $a_upload = false | ) |
create question pool object
Definition at line 61 of file class.ilObjSurveyQuestionPool.php.
References ilObject\create(), and 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)
Definition at line 651 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)
Definition at line 732 of file class.ilObjSurveyQuestionPool.php.
References ilUtil\getDataDir(), ilObject\getId(), and ilUtil\makeDir().
& ilObjSurveyQuestionPool::createQuestion | ( | $question_type, | |
$question_id = -1 |
|||
) |
Definition at line 130 of file class.ilObjSurveyQuestionPool.php.
References getQuestiontype().
Referenced by copyQuestion().
ilObjSurveyQuestionPool::delete | ( | ) |
delete object and all related data
public
Reimplemented from ilObject.
Definition at line 254 of file class.ilObjSurveyQuestionPool.php.
References deleteAllData(), and ilObject\deleteMetaData().
ilObjSurveyQuestionPool::deleteAllData | ( | ) |
Definition at line 272 of file class.ilObjSurveyQuestionPool.php.
References $result, ilUtil\delDir(), ilUtil\getDataDir(), ilObject\getId(), and removeQuestion().
Referenced by delete().
ilObjSurveyQuestionPool::duplicateQuestion | ( | $question_id, | |
$obj_id = "" |
|||
) |
Duplicates a question for a questionpool.
Duplicates a question for a questionpool
integer | $question_id | The database id of the question public |
Definition at line 511 of file class.ilObjSurveyQuestionPool.php.
References SurveyQuestion\_instanciateQuestion().
Referenced by copyQuestion(), and paste().
ilObjSurveyQuestionPool::getExportDirectory | ( | ) |
get export directory of survey
Definition at line 681 of file class.ilObjSurveyQuestionPool.php.
References ilUtil\getDataDir().
ilObjSurveyQuestionPool::getExportFiles | ( | $dir | ) |
get export files
Definition at line 691 of file class.ilObjSurveyQuestionPool.php.
ilObjSurveyQuestionPool::getImportDirectory | ( | ) |
get import directory of survey
Definition at line 764 of file class.ilObjSurveyQuestionPool.php.
References ilUtil\getDataDir().
ilObjSurveyQuestionPool::getOnline | ( | ) |
Definition at line 916 of file class.ilObjSurveyQuestionPool.php.
References $online.
Referenced by cloneObject().
& ilObjSurveyQuestionPool::getQuestions | ( | ) |
Definition at line 842 of file class.ilObjSurveyQuestionPool.php.
References $result.
Referenced by cloneObject(), and toXML().
& ilObjSurveyQuestionPool::getQuestionsInfo | ( | $question_array | ) |
Retrieves the datase entries for questions from a given 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 479 of file class.ilObjSurveyQuestionPool.php.
References $result, and isPluginActive().
ilObjSurveyQuestionPool::getQuestionsTable | ( | $sort, | |
$sortorder, | |||
$filter_text, | |||
$sel_filter_type, | |||
$startrow = 0 |
|||
) |
Calculates the data for the output of the questionpool.
Calculates the data for the output of the questionpool
public
Definition at line 537 of file class.ilObjSurveyQuestionPool.php.
References ilObject\getId(), ilUtil\getImagePath(), and isPluginActive().
ilObjSurveyQuestionPool::getQuestiontype | ( | $question_id | ) |
Returns the question type of a question with a given id.
Returns the question type of a question with a given id
integer | $question_id | The database id of the question |
Definition at line 405 of file class.ilObjSurveyQuestionPool.php.
References $data, and $result.
Referenced by createQuestion(), and toXML().
ilObjSurveyQuestionPool::getTitle | ( | ) |
get title of survey question pool object
Reimplemented from ilObject.
Definition at line 366 of file class.ilObjSurveyQuestionPool.php.
Referenced by toXML().
ilObjSurveyQuestionPool::ilObjSurveyQuestionPool | ( | $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 52 of file class.ilObjSurveyQuestionPool.php.
References ilObject\ilObject().
ilObjSurveyQuestionPool::importObject | ( | $source, | |
$spl_exists = FALSE |
|||
) |
Imports survey questions into ILIAS.
Imports survey questions into ILIAS
string | $source | The filename of an XML import file public |
Definition at line 867 of file class.ilObjSurveyQuestionPool.php.
ilObjSurveyQuestionPool::isInUse | ( | $question_id | ) |
Checks if a question is in use by a survey.
Checks if a question is in use by a survey
integer | $question_id | The database id of the question |
Definition at line 430 of file class.ilObjSurveyQuestionPool.php.
References $result.
ilObjSurveyQuestionPool::isPluginActive | ( | $a_pname | ) |
Checks wheather or not a question plugin with a given name is active.
string | $a_pname | The plugin name public |
Definition at line 1065 of file class.ilObjSurveyQuestionPool.php.
References IL_COMP_MODULE.
Referenced by getQuestionsInfo(), and getQuestionsTable().
ilObjSurveyQuestionPool::loadFromDb | ( | ) |
Loads a ilObjQuestionpool object from a database.
Loads a ilObjQuestionpool object from a database
public
Definition at line 190 of file class.ilObjSurveyQuestionPool.php.
References $result, and setOnline().
Referenced by read().
ilObjSurveyQuestionPool::notify | ( | $a_event, | |
$a_ref_id, | |||
$a_parent_non_rbac_id, | |||
$a_node_id, | |||
$a_params = 0 |
|||
) |
notifys an object about an event occured Based on the event happend, each object may decide how it reacts.
If you are not required to handle any events related to your module, just delete this method. (For an example how this method is used, look at ilObjGroup)
public
string | event |
integer | reference id of object where the event occured |
array | passes optional parameters if required |
Reimplemented from ilObject.
Definition at line 308 of file class.ilObjSurveyQuestionPool.php.
References $_GET, and ilObject\getType().
ilObjSurveyQuestionPool::paste | ( | $question_id | ) |
Pastes a question in the question pool.
Pastes a question in the question pool
integer | $question_id | The database id of the question public |
Definition at line 465 of file class.ilObjSurveyQuestionPool.php.
References duplicateQuestion(), and ilObject\getId().
ilObjSurveyQuestionPool::read | ( | $a_force_db = false | ) |
read object data from db into object
boolean | public |
Reimplemented from ilObject.
Definition at line 94 of file class.ilObjSurveyQuestionPool.php.
References loadFromDb().
ilObjSurveyQuestionPool::removeQuestion | ( | $question_id | ) |
Removes a question from the question pool.
Removes a question from the question pool
integer | $question_id | The database id of the question private |
Definition at line 388 of file class.ilObjSurveyQuestionPool.php.
References SurveyQuestion\_instanciateQuestion().
Referenced by deleteAllData().
ilObjSurveyQuestionPool::saveToDb | ( | ) |
Saves a ilObjSurveyQuestionPool object to a database.
Saves a ilObjSurveyQuestionPool object to a database
public
Definition at line 212 of file class.ilObjSurveyQuestionPool.php.
References ilObject\$ilias, and $result.
ilObjSurveyQuestionPool::setOnline | ( | $a_online_status | ) |
Sets the questionpool online status.
Sets the questionpool online status
integer | $a_online_status | Online status of the questionpool |
Definition at line 902 of file class.ilObjSurveyQuestionPool.php.
Referenced by loadFromDb().
ilObjSurveyQuestionPool::setTitle | ( | $a_title | ) |
set title of survey question pool object
Reimplemented from ilObject.
Definition at line 375 of file class.ilObjSurveyQuestionPool.php.
ilObjSurveyQuestionPool::toXML | ( | $questions | ) |
export questions to xml
Definition at line 782 of file class.ilObjSurveyQuestionPool.php.
References SurveyQuestion\_includeClass(), ilObject\getId(), getQuestions(), getQuestiontype(), getTitle(), ilObject\getType(), and ilXmlWriter\xmlHeader().
ilObjSurveyQuestionPool::update | ( | ) |
update object data
public
Reimplemented from ilObject.
Definition at line 76 of file class.ilObjSurveyQuestionPool.php.
References ilObject\updateMetaData().
ilObjSurveyQuestionPool::$online |
Definition at line 44 of file class.ilObjSurveyQuestionPool.php.
Referenced by getOnline().