ILIAS
release_4-3 Revision
|
Public Member Functions | |
__construct ($a_id=0, $a_reference=true) | |
Constructor public. | |
initType () | |
setOnline ($a_value) | |
isOnline () | |
setAccessType ($a_value) | |
getAccessType () | |
setAccessBegin ($a_value) | |
getAccessBegin () | |
setAccessEnd ($a_value) | |
getAccessEnd () | |
setAccessVisibility ($a_value) | |
getAccessVisibility () | |
setQuestion ($a_value) | |
getQuestion () | |
setImage ($a_value) | |
getImage () | |
setViewResults ($a_value) | |
getViewResults () | |
setVotingPeriod ($a_value) | |
getVotingPeriod () | |
setVotingPeriodBegin ($a_value) | |
getVotingPeriodBegin () | |
setVotingPeriodEnd ($a_value) | |
getVotingPeriodEnd () | |
doCloneObject (ilObjPoll $new_obj, $a_target_id, $a_copy_id=0) | |
Clone poll. | |
getImageFullPath ($a_as_thumb=false) | |
Get image incl. | |
deleteImage () | |
remove existing file | |
uploadImage (array $a_upload, $a_clone=false) | |
Upload new image file. | |
getAnswers () | |
getAnswer ($a_id) | |
saveAnswer ($a_text, $a_pos=null) | |
updateAnswer ($a_id, $a_text) | |
rebuildAnswerPositions () | |
updateAnswerPositions (array $a_pos) | |
deleteAnswer ($a_id) | |
deleteAllVotes () | |
saveAnswers (array $a_answers) | |
saveVote ($a_user_id, $a_answer_id) | |
hasUserVoted ($a_user_id) | |
countVotes () | |
getVotePercentages () | |
Public Member Functions inherited from ilObject2 | |
withReferences () | |
determines wehter objects are referenced or not (got ref ids or not) | |
read ($a_force_db=false) | |
Read data from db. | |
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 | |
getTitle () | |
get object title public | |
getUntranslatedTitle () | |
get untranslated object title public | |
setTitle ($a_title) | |
set object title | |
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 | |
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 ($a_clone_mode=false) | |
update () | |
update object in db | |
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) | |
_lookupOwner ($a_id) | |
lookup object owner | |
_lookupLastUpdate ($a_id, $a_as_string=false) | |
lookup last update | |
_getLastUpdateOfObjects ($a_objs) | |
Get last update for a set of media objects. | |
_setDeletedDate ($a_ref_id) | |
only called in ilTree::saveSubTree | |
_resetDeletedDate ($a_ref_id) | |
only called in ilObjectGUI::insertSavedNodes | |
_lookupDeletedDate ($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) | |
_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 | |
_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 | |
delete () | |
delete object or referenced object (in the case of a referenced object, object data is only deleted if last reference is deleted) This function removes an object entirely from system!! | |
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 | |
_exists ($a_id, $a_reference=false) | |
checks if an object exists in object_data | |
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 passed, each object may decide how it reacts. | |
setRegisterMode ($a_bool) | |
isUserRegistered ($a_user_id=0) | |
requireRegistration () | |
appendCopyInfo ($a_target_id, $a_copy_id) | |
Prepend Copy info if object with same name exists in that container. | |
cloneMetaData ($target_obj) | |
Copy meta data. | |
cloneObject ($a_target_id, $a_copy_id=null, $a_omit_tree=false) | |
Clone object permissions, put in tree ... | |
cloneDependencies ($a_target_id, $a_copy_id) | |
Clone object dependencies. | |
Public Member Functions inherited from ilObject | |
ilObject ($a_id=0, $a_reference=true) | |
Constructor public. | |
getDiskUsage () | |
Gets the disk usage of the object in bytes. | |
create () | |
create | |
applyDidacticTemplate ($a_tpl_id) | |
Apply template. | |
getXMLZip () | |
getHTMLDirectory () | |
_lookupCreationDate ($a_id) | |
Lookup creation date. |
Static Public Member Functions | |
static | initStorage ($a_id, $a_subdir=null) |
Init file system storage. | |
static | getImageSize () |
Static Public Member Functions inherited from ilObject2 | |
static | _lookupObjIdByImportId ($a_import_id) |
static | _getAllReferences ($a_id) |
get all reference ids of object | |
static | _lookupTitle ($a_id) |
lookup object title | |
static | _getIdsForTitle ($title, $type= '', $partialmatch=false) |
static | _lookupDescription ($a_id) |
lookup object description | |
static | _lookupObjId ($a_id) |
static | _lookupType ($a_id, $a_reference=false) |
lookup object type | |
static | _lookupObjectId ($a_ref_id) |
lookup object id | |
static | _getObjectsByType ($a_obj_type="", $a_owner="") |
Get objects by type. | |
static | _prepareCloneSelection ($a_ref_ids, $new_type) |
static | _getIcon ($a_obj_id="", $a_size="big", $a_type="", $a_offline=false) |
Get icon for repository item. | |
Static Public Member Functions inherited from ilObject | |
static | _prepareCloneSelection ($a_ref_ids, $new_type, $show_path=true) |
Prepare copy wizard object selection. | |
static | collectDeletionDependencies (&$deps, $a_ref_id, $a_obj_id, $a_type, $a_depth=0) |
Collect deletion dependencies. | |
static | getDeletionDependencies ($a_obj_id) |
Get deletion dependencies. | |
static | getLongDescriptions (array $a_obj_ids) |
Get long description data. | |
static | getAllOwnedRepositoryObjects ($a_user_id) |
Get all ids of objects user owns. |
Data Fields | |
const | VIEW_RESULTS_ALWAYS = 1 |
const | VIEW_RESULTS_NEVER = 2 |
const | VIEW_RESULTS_AFTER_VOTE = 3 |
const | VIEW_RESULTS_AFTER_PERIOD = 4 |
Protected Member Functions | |
doRead () | |
propertiesToDB () | |
doCreate () | |
doUpdate () | |
doDelete () | |
deleteAllAnswers () | |
Protected Member Functions inherited from ilObject2 | |
beforeCreate () | |
beforeUpdate () | |
doMDUpdateListener ($a_element) | |
beforeMDUpdateListener ($a_element) | |
doCreateMetaData () | |
beforeCreateMetaData () | |
doUpdateMetaData () | |
beforeUpdateMetaData () | |
beforeDelete () | |
doCloneObject ($new_obj, $a_target_id, $a_copy_id=null) | |
beforeCloneObject () |
Protected Attributes | |
$online | |
$access_type | |
$access_begin | |
$access_end | |
$access_visibility | |
$question | |
$image | |
$view_results | |
$period | |
$period_begin | |
$period_end |
Class ilObjPoll.
Definition at line 16 of file class.ilObjPoll.php.
ilObjPoll::__construct | ( | $a_id = 0 , |
|
$a_reference = true |
|||
) |
Constructor public.
integer | reference_id or object_id |
boolean | treat the id as reference_id (true) or object_id (false) |
Reimplemented from ilObject2.
Definition at line 35 of file class.ilObjPoll.php.
References setAccessType(), setOnline(), setViewResults(), setVotingPeriod(), and ilObjectActivation\TIMINGS_DEACTIVATED.
ilObjPoll::countVotes | ( | ) |
Definition at line 660 of file class.ilObjPoll.php.
References $row, and ilObject2\getId().
|
protected |
Definition at line 550 of file class.ilObjPoll.php.
References deleteAllVotes(), and ilObject2\getId().
Referenced by doDelete().
ilObjPoll::deleteAllVotes | ( | ) |
Definition at line 563 of file class.ilObjPoll.php.
References ilObject2\getId().
Referenced by deleteAllAnswers().
ilObjPoll::deleteAnswer | ( | $a_id | ) |
Definition at line 536 of file class.ilObjPoll.php.
Referenced by saveAnswers().
ilObjPoll::deleteImage | ( | ) |
remove existing file
Definition at line 335 of file class.ilObjPoll.php.
References setImage().
Referenced by doDelete(), and uploadImage().
ilObjPoll::doCloneObject | ( | ilObjPoll | $new_obj, |
$a_target_id, | |||
$a_copy_id = 0 |
|||
) |
Clone poll.
ilObjPoll | new object |
int | target ref_id |
int | copy id |
Definition at line 278 of file class.ilObjPoll.php.
References $image, getAnswers(), getImage(), getImageFullPath(), getQuestion(), getViewResults(), saveAnswer(), setQuestion(), setViewResults(), ilObject2\update(), and uploadImage().
|
protected |
Reimplemented from ilObject2.
Definition at line 201 of file class.ilObjPoll.php.
References ilObject2\getId(), and propertiesToDB().
|
protected |
Reimplemented from ilObject2.
Definition at line 251 of file class.ilObjPoll.php.
References deleteAllAnswers(), ilObjectActivation\deleteAllEntries(), deleteImage(), and ilObject2\getId().
|
protected |
Reimplemented from ilObject2.
Definition at line 161 of file class.ilObjPoll.php.
References $row, ilObjectActivation\getItem(), setAccessBegin(), setAccessEnd(), setAccessType(), setAccessVisibility(), setImage(), setOnline(), setQuestion(), setViewResults(), setVotingPeriod(), setVotingPeriodBegin(), and setVotingPeriodEnd().
|
protected |
Reimplemented from ilObject2.
Definition at line 226 of file class.ilObjPoll.php.
References getAccessBegin(), getAccessEnd(), getAccessType(), getAccessVisibility(), ilObject2\getId(), and propertiesToDB().
ilObjPoll::getAccessBegin | ( | ) |
Definition at line 76 of file class.ilObjPoll.php.
References $access_begin.
Referenced by doUpdate().
ilObjPoll::getAccessEnd | ( | ) |
Definition at line 86 of file class.ilObjPoll.php.
References $access_end.
Referenced by doUpdate().
ilObjPoll::getAccessType | ( | ) |
Definition at line 66 of file class.ilObjPoll.php.
References $access_type.
Referenced by doUpdate().
ilObjPoll::getAccessVisibility | ( | ) |
Definition at line 96 of file class.ilObjPoll.php.
References $access_visibility.
Referenced by doUpdate().
ilObjPoll::getAnswer | ( | $a_id | ) |
Definition at line 454 of file class.ilObjPoll.php.
ilObjPoll::getAnswers | ( | ) |
Definition at line 437 of file class.ilObjPoll.php.
References $res, $row, and ilObject2\getId().
Referenced by doCloneObject(), rebuildAnswerPositions(), and saveAnswers().
ilObjPoll::getImage | ( | ) |
Definition at line 116 of file class.ilObjPoll.php.
References $image.
Referenced by doCloneObject(), getImageFullPath(), and propertiesToDB().
ilObjPoll::getImageFullPath | ( | $a_as_thumb = false | ) |
Get image incl.
path
bool | $a_as_thumb |
Definition at line 315 of file class.ilObjPoll.php.
References $img, $path, getImage(), and initStorage().
Referenced by doCloneObject().
|
static |
Definition at line 426 of file class.ilObjPoll.php.
ilObjPoll::getQuestion | ( | ) |
Definition at line 106 of file class.ilObjPoll.php.
References $question.
Referenced by doCloneObject(), and propertiesToDB().
ilObjPoll::getViewResults | ( | ) |
Definition at line 126 of file class.ilObjPoll.php.
References $view_results.
Referenced by doCloneObject(), and propertiesToDB().
ilObjPoll::getVotePercentages | ( | ) |
Definition at line 672 of file class.ilObjPoll.php.
References ilObject\$id, $res, $row, and ilObject2\getId().
ilObjPoll::getVotingPeriod | ( | ) |
Definition at line 136 of file class.ilObjPoll.php.
References $period.
Referenced by propertiesToDB().
ilObjPoll::getVotingPeriodBegin | ( | ) |
Definition at line 146 of file class.ilObjPoll.php.
References $period_begin.
Referenced by propertiesToDB().
ilObjPoll::getVotingPeriodEnd | ( | ) |
Definition at line 156 of file class.ilObjPoll.php.
References $period_end.
Referenced by propertiesToDB().
ilObjPoll::hasUserVoted | ( | $a_user_id | ) |
Definition at line 648 of file class.ilObjPoll.php.
References ilObject2\getId().
Referenced by saveVote().
|
static |
Init file system storage.
type | $a_id | |
type | $a_subdir |
Definition at line 354 of file class.ilObjPoll.php.
References $path.
Referenced by getImageFullPath(), ilPollDataSet\getXmlRecord(), ilPollDataSet\importRecord(), and uploadImage().
ilObjPoll::initType | ( | ) |
Reimplemented from ilObject2.
Definition at line 46 of file class.ilObjPoll.php.
ilObjPoll::isOnline | ( | ) |
Definition at line 56 of file class.ilObjPoll.php.
References $online.
Referenced by propertiesToDB().
|
protected |
Definition at line 186 of file class.ilObjPoll.php.
References getImage(), getQuestion(), getViewResults(), getVotingPeriod(), getVotingPeriodBegin(), getVotingPeriodEnd(), and isOnline().
Referenced by doCreate(), and doUpdate().
ilObjPoll::rebuildAnswerPositions | ( | ) |
Definition at line 506 of file class.ilObjPoll.php.
References getAnswers(), and updateAnswerPositions().
ilObjPoll::saveAnswer | ( | $a_text, | |
$a_pos = null |
|||
) |
Definition at line 464 of file class.ilObjPoll.php.
References ilObject\$id, and ilObject2\getId().
Referenced by doCloneObject(), and saveAnswers().
ilObjPoll::saveAnswers | ( | array | $a_answers | ) |
Definition at line 574 of file class.ilObjPoll.php.
References ilObject\$id, deleteAnswer(), getAnswers(), saveAnswer(), and updateAnswerPositions().
ilObjPoll::saveVote | ( | $a_user_id, | |
$a_answer_id | |||
) |
Definition at line 632 of file class.ilObjPoll.php.
References ilObject2\getId(), and hasUserVoted().
ilObjPoll::setAccessBegin | ( | $a_value | ) |
Definition at line 71 of file class.ilObjPoll.php.
Referenced by doRead().
ilObjPoll::setAccessEnd | ( | $a_value | ) |
Definition at line 81 of file class.ilObjPoll.php.
Referenced by doRead().
ilObjPoll::setAccessType | ( | $a_value | ) |
Definition at line 61 of file class.ilObjPoll.php.
Referenced by __construct(), and doRead().
ilObjPoll::setAccessVisibility | ( | $a_value | ) |
Definition at line 91 of file class.ilObjPoll.php.
Referenced by doRead().
ilObjPoll::setImage | ( | $a_value | ) |
Definition at line 111 of file class.ilObjPoll.php.
Referenced by deleteImage(), doRead(), and uploadImage().
ilObjPoll::setOnline | ( | $a_value | ) |
Definition at line 51 of file class.ilObjPoll.php.
Referenced by __construct(), and doRead().
ilObjPoll::setQuestion | ( | $a_value | ) |
Definition at line 101 of file class.ilObjPoll.php.
Referenced by doCloneObject(), and doRead().
ilObjPoll::setViewResults | ( | $a_value | ) |
Definition at line 121 of file class.ilObjPoll.php.
Referenced by __construct(), doCloneObject(), and doRead().
ilObjPoll::setVotingPeriod | ( | $a_value | ) |
Definition at line 131 of file class.ilObjPoll.php.
Referenced by __construct(), and doRead().
ilObjPoll::setVotingPeriodBegin | ( | $a_value | ) |
Definition at line 141 of file class.ilObjPoll.php.
Referenced by doRead().
ilObjPoll::setVotingPeriodEnd | ( | $a_value | ) |
Definition at line 151 of file class.ilObjPoll.php.
Referenced by doRead().
ilObjPoll::updateAnswer | ( | $a_id, | |
$a_text | |||
) |
Definition at line 497 of file class.ilObjPoll.php.
ilObjPoll::updateAnswerPositions | ( | array | $a_pos | ) |
Definition at line 519 of file class.ilObjPoll.php.
References ilObject\$id.
Referenced by rebuildAnswerPositions(), and saveAnswers().
ilObjPoll::uploadImage | ( | array | $a_upload, |
$a_clone = false |
|||
) |
Upload new image file.
array | $a_upload |
Definition at line 381 of file class.ilObjPoll.php.
References $path, $success, deleteImage(), ilUtil\escapeShellArg(), ilUtil\execConvert(), initStorage(), and setImage().
Referenced by doCloneObject().
|
protected |
Definition at line 20 of file class.ilObjPoll.php.
Referenced by getAccessBegin().
|
protected |
Definition at line 21 of file class.ilObjPoll.php.
Referenced by getAccessEnd().
|
protected |
Definition at line 19 of file class.ilObjPoll.php.
Referenced by getAccessType().
|
protected |
Definition at line 22 of file class.ilObjPoll.php.
Referenced by getAccessVisibility().
|
protected |
Definition at line 24 of file class.ilObjPoll.php.
Referenced by doCloneObject(), and getImage().
|
protected |
Definition at line 18 of file class.ilObjPoll.php.
Referenced by isOnline().
|
protected |
Definition at line 26 of file class.ilObjPoll.php.
Referenced by getVotingPeriod().
|
protected |
Definition at line 27 of file class.ilObjPoll.php.
Referenced by getVotingPeriodBegin().
|
protected |
Definition at line 28 of file class.ilObjPoll.php.
Referenced by getVotingPeriodEnd().
|
protected |
Definition at line 23 of file class.ilObjPoll.php.
Referenced by getQuestion().
|
protected |
Definition at line 25 of file class.ilObjPoll.php.
Referenced by getViewResults().
const ilObjPoll::VIEW_RESULTS_AFTER_PERIOD = 4 |
Definition at line 33 of file class.ilObjPoll.php.
Referenced by ilObjPollGUI\initEditCustomForm(), ilPollBlock\mayNotResultsYet(), and ilPollBlock\maySeeResults().
const ilObjPoll::VIEW_RESULTS_AFTER_VOTE = 3 |
Definition at line 32 of file class.ilObjPoll.php.
Referenced by ilObjPollGUI\initEditCustomForm(), and ilPollBlock\maySeeResults().
const ilObjPoll::VIEW_RESULTS_ALWAYS = 1 |
Definition at line 30 of file class.ilObjPoll.php.
Referenced by ilObjPollGUI\initEditCustomForm(), and ilPollBlock\maySeeResults().
const ilObjPoll::VIEW_RESULTS_NEVER = 2 |
Definition at line 31 of file class.ilObjPoll.php.
Referenced by ilObjPollGUI\initEditCustomForm(), and ilPollBlock\maySeeResults().