ILIAS
trunk Revision v11.0_alpha-1769-g99a433fe2dc
|
Public Member Functions | |
__construct (int $a_id=0, bool $a_reference=true) | |
setAccessType (int $a_value) | |
getAccessType () | |
setAccessBegin (int $a_value) | |
getAccessBegin () | |
setAccessEnd (int $a_value) | |
getAccessEnd () | |
setAccessVisibility (bool $a_value) | |
getAccessVisibility () | |
setQuestion (string $a_value) | |
getQuestion () | |
setViewResults (int $a_value) | |
getViewResults () | |
setVotingPeriod (bool $a_value) | |
getVotingPeriod () | |
setVotingPeriodBegin (int $a_value) | |
getVotingPeriodBegin () | |
setVotingPeriodEnd (int $a_value) | |
getVotingPeriodEnd () | |
setMaxNumberOfAnswers (int $a_value) | |
getMaxNumberOfAnswers () | |
setSortResultByVotes (bool $a_value) | |
getSortResultByVotes () | |
setNonAnonymous (bool $a_value) | |
getNonAnonymous () | |
setShowComments (bool $a_value) | |
getShowComments () | |
setShowResultsAs (int $a_value) | |
getShowResultsAs () | |
uploadImage (string $file_path, string $file_name) | |
getAnswers () | |
getAnswer (int $a_id) | |
saveAnswer (string $a_text, ?int $a_pos=null) | |
updateAnswer (int $a_id, string $a_text) | |
rebuildAnswerPositions () | |
updateAnswerPositions (array $a_pos) | |
deleteAnswer (int $a_id) | |
deleteAllVotes () | |
saveAnswers (array $a_answers) | |
saveVote (int $a_user_id, array $a_answers) | |
hasUserVoted (int $a_user_id) | |
countVotes () | |
getVotePercentages () | |
getVotesByUsers () | |
![]() | |
__construct (int $a_id=0, bool $a_reference=true) | |
Constructor. More... | |
read () | |
create (bool $a_clone_mode=false) | |
update () | |
delete () | |
cloneMetaData (ilObject $target_obj) | |
cloneObject (int $target_id, int $copy_id=0, bool $omit_tree=false) | |
![]() | |
getObjectProperties () | |
flushObjectProperties () | |
withReferences () | |
determines whether objects are referenced or not (got ref ids or not) More... | |
processAutoRating () | |
read () | |
getId () | |
setId (int $id) | |
setRefId (int $ref_id) | |
getRefId () | |
getType () | |
setType (string $type) | |
getPresentationTitle () | |
get presentation title Normally same as title Overwritten for sessions More... | |
getTitle () | |
getUntranslatedTitle () | |
Get untranslated object title WebDAV needs to access the untranslated title of an object. More... | |
setTitle (string $title) | |
getDescription () | |
setDescription (string $description) | |
getLongDescription () | |
get object long description (stored in object_description) More... | |
getImportId () | |
setImportId (string $import_id) | |
setOfflineStatus (bool $status) | |
getOfflineStatus () | |
supportsOfflineHandling () | |
getOwner () | |
getOwnerName () | |
get full name of object owner More... | |
setOwner (int $usr_id) | |
getCreateDate () | |
Get create date in YYYY-MM-DD HH-MM-SS format. More... | |
getLastUpdateDate () | |
Get last update date in YYYY-MM-DD HH-MM-SS format. More... | |
create () | |
note: title, description and type should be set when this function is called More... | |
update () | |
MDUpdateListener (string $element) | |
Metadata update listener. More... | |
createMetaData () | |
updateMetaData () | |
deleteMetaData () | |
updateOwner () | |
update owner of object in db More... | |
putInTree (int $parent_ref_id) | |
maybe this method should be in tree object!? More... | |
setPermissions (int $parent_ref_id) | |
setParentRolePermissions (int $parent_ref_id) | |
Initialize the permissions of parent roles (local roles of categories, global roles...) This method is overwritten in e.g. More... | |
createReference () | |
creates reference for object More... | |
countReferences () | |
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!! 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. More... | |
applyDidacticTemplate (int $tpl_id) | |
getXMLZip () | |
getHTMLDirectory () | |
appendCopyInfo (int $target_id, int $copy_id) | |
Prepend Copy info if object with same name exists in that container. More... | |
cloneDependencies (int $target_id, int $copy_id) | |
Clone object dependencies. More... | |
cloneMetaData (ilObject $target_obj) | |
Copy meta data. More... | |
selfOrParentWithRatingEnabled () | |
getPossibleSubObjects (bool $filter=true) | |
get all possible sub objects of this type the object can decide which types of sub objects are possible jut in time overwrite if the decision distinguish from standard model More... | |
Static Public Member Functions | |
static | getImageSize () |
![]() | |
static | _lookupObjIdByImportId (string $import_id) |
Get (latest) object id for an import id. More... | |
static | _lookupImportId (int $obj_id) |
static | _lookupOwnerName (int $owner_id) |
Lookup owner name for owner id. More... | |
static | _getIdForImportId (string $import_id) |
static | _getAllReferences (int $id) |
get all reference ids for object ID More... | |
static | _lookupTitle (int $obj_id) |
static | lookupOfflineStatus (int $obj_id) |
Lookup offline status using objectDataCache. More... | |
static | _lookupOwner (int $obj_id) |
Lookup owner user ID for object ID. More... | |
static | _getIdsForTitle (string $title, string $type='', bool $partial_match=false) |
static | _lookupDescription (int $obj_id) |
static | _lookupLastUpdate (int $obj_id, bool $formatted=false) |
static | _getLastUpdateOfObjects (array $obj_ids) |
static | _lookupObjId (int $ref_id) |
static | _setDeletedDate (int $ref_id, int $deleted_by) |
static | setDeletedDates (array $ref_ids, int $user_id) |
static | _resetDeletedDate (int $ref_id) |
static | _lookupDeletedDate (int $ref_id) |
static | _writeTitle (int $obj_id, string $title) |
write title to db (static) More... | |
static | _writeDescription (int $obj_id, string $desc) |
write description to db (static) More... | |
static | _writeImportId (int $obj_id, string $import_id) |
write import id to db (static) More... | |
static | _lookupType (int $id, bool $reference=false) |
static | _isInTrash (int $ref_id) |
static | _hasUntrashedReference (int $obj_id) |
checks whether an object has at least one reference that is not in trash More... | |
static | _lookupObjectId (int $ref_id) |
static | _getObjectsDataForType (string $type, bool $omit_trash=false) |
get all objects of a certain type More... | |
static | _exists (int $id, bool $reference=false, ?string $type=null) |
checks if an object exists in object_data More... | |
static | _getObjectsByType (string $obj_type="", ?int $owner=null) |
static | _prepareCloneSelection (array $ref_ids, string $new_type, bool $show_path=true) |
Prepare copy wizard object selection. More... | |
static | getIconForType (string $type) |
static | _getIcon (int $obj_id=0, string $size="big", string $type="", bool $offline=false) |
Get icon for repository item. More... | |
static | collectDeletionDependencies (array &$deps, int $ref_id, int $obj_id, string $type, int $depth=0) |
Collect deletion dependencies. More... | |
static | getDeletionDependencies (int $obj_id) |
Get deletion dependencies. More... | |
static | getLongDescriptions (array $obj_ids) |
static | getAllOwnedRepositoryObjects (int $user_id) |
static | fixMissingTitles ($type, array &$obj_title_map) |
Try to fix missing object titles. More... | |
static | _lookupCreationDate (int $obj_id) |
static | _getObjectTypeIdByTitle (string $type, ?\ilDBInterface $ilDB=null) |
Data Fields | |
const int | VIEW_RESULTS_ALWAYS = 1 |
const int | VIEW_RESULTS_NEVER = 2 |
const int | VIEW_RESULTS_AFTER_VOTE = 3 |
const int | VIEW_RESULTS_AFTER_PERIOD = 4 |
const int | SHOW_RESULTS_AS_BARCHART = 1 |
const int | SHOW_RESULTS_AS_STACKED_CHART = 2 |
![]() | |
const | TITLE_LENGTH = 255 |
const | DESC_LENGTH = 128 |
const | LONG_DESC_LENGTH = 4000 |
const | TABLE_OBJECT_DATA = "object_data" |
array | $objectList |
string | $untranslatedTitle |
Protected Member Functions | |
initType () | |
doRead () | |
propertiesToDB () | |
doCreate (bool $clone_mode=false) | |
doUpdate () | |
doDelete () | |
doCloneObject (ilObject2 $new_obj, int $a_target_id, ?int $a_copy_id=0) | |
deleteAllAnswers () | |
![]() | |
initType () | |
doRead () | |
doCreate (bool $clone_mode=false) | |
beforeCreate () | |
If overwritten this method should return true, there is currently no "abort" handling for cases where "false" is returned. More... | |
doUpdate () | |
beforeUpdate () | |
doDelete () | |
beforeDelete () | |
doCloneObject (ilObject2 $new_obj, int $a_target_id, ?int $a_copy_id=null) | |
beforeCloneObject () | |
![]() | |
doMDUpdateListener (string $a_element) | |
beforeMDUpdateListener (string $a_element) | |
doCreateMetaData () | |
beforeCreateMetaData () | |
doUpdateMetaData () | |
beforeUpdateMetaData () | |
doDeleteMetaData () | |
beforeDeleteMetaData () | |
handleAutoRating () | |
hasAutoRating () | |
Class ilObjPoll.
Definition at line 33 of file class.ilObjPoll.php.
ilObjPoll::__construct | ( | int | $a_id = 0 , |
bool | $a_reference = true |
||
) |
Definition at line 63 of file class.ilObjPoll.php.
References $DIC, ILIAS\GlobalScreen\Provider\__construct(), setAccessType(), setViewResults(), setVotingPeriod(), and ilObjectActivation\TIMINGS_DEACTIVATED.
ilObjPoll::countVotes | ( | ) |
Definition at line 621 of file class.ilObjPoll.php.
References ilObject\getId().
Referenced by getVotePercentages().
|
protected |
Definition at line 520 of file class.ilObjPoll.php.
References ilObject\$db, $ilDB, deleteAllVotes(), and ilObject\getId().
Referenced by doDelete().
ilObjPoll::deleteAllVotes | ( | ) |
Definition at line 532 of file class.ilObjPoll.php.
References ilObject\$db, $ilDB, and ilObject\getId().
Referenced by deleteAllAnswers().
ilObjPoll::deleteAnswer | ( | int | $a_id | ) |
Definition at line 507 of file class.ilObjPoll.php.
References ilObject\$db, and $ilDB.
Referenced by saveAnswers().
|
protected |
Definition at line 341 of file class.ilObjPoll.php.
References ilCopyWizardOptions\_getInstance(), getAnswers(), ilObject\getId(), getMaxNumberOfAnswers(), getNonAnonymous(), getQuestion(), getShowComments(), getShowResultsAs(), getSortResultByVotes(), getViewResults(), ilObject\setOfflineStatus(), ilObject2\update(), ILIAS\Repository\user(), VIEW_RESULTS_AFTER_PERIOD, and VIEW_RESULTS_ALWAYS.
|
protected |
Definition at line 270 of file class.ilObjPoll.php.
References ilObject\$db, $ilDB, ilObject\getId(), and propertiesToDB().
|
protected |
Definition at line 321 of file class.ilObjPoll.php.
References ilObject\$db, $ilDB, deleteAllAnswers(), ilObjectActivation\deleteAllEntries(), ilObject\getId(), and ILIAS\Repository\user().
|
protected |
Definition at line 223 of file class.ilObjPoll.php.
References ilObject\$db, $ilDB, getAccessType(), ilObject\getId(), ilObjectActivation\getItem(), setAccessBegin(), setAccessEnd(), setAccessType(), setAccessVisibility(), setMaxNumberOfAnswers(), setNonAnonymous(), setQuestion(), setShowComments(), setShowResultsAs(), setSortResultByVotes(), setViewResults(), setVotingPeriod(), setVotingPeriodBegin(), setVotingPeriodEnd(), ilObjectActivation\TIMINGS_ACTIVATION, and ilObjectActivation\TIMINGS_DEACTIVATED.
|
protected |
Definition at line 294 of file class.ilObjPoll.php.
References ilObject\$db, $ilDB, getAccessBegin(), getAccessEnd(), getAccessType(), getAccessVisibility(), ilObject\getId(), ilObject\getRefId(), getShowComments(), and propertiesToDB().
ilObjPoll::getAccessBegin | ( | ) |
Definition at line 98 of file class.ilObjPoll.php.
References $access_begin.
Referenced by doUpdate(), and ilPollStateInfo\isOfflineOrUnavailable().
ilObjPoll::getAccessEnd | ( | ) |
Definition at line 108 of file class.ilObjPoll.php.
References $access_end.
Referenced by doUpdate(), and ilPollStateInfo\isOfflineOrUnavailable().
ilObjPoll::getAccessType | ( | ) |
Definition at line 88 of file class.ilObjPoll.php.
References $access_type.
Referenced by doRead(), doUpdate(), and ilPollStateInfo\isOfflineOrUnavailable().
ilObjPoll::getAccessVisibility | ( | ) |
Definition at line 118 of file class.ilObjPoll.php.
References $access_visibility.
Referenced by doUpdate().
ilObjPoll::getAnswer | ( | int | $a_id | ) |
ilObjPoll::getAnswers | ( | ) |
Definition at line 408 of file class.ilObjPoll.php.
References ilObject\$db, $ilDB, $res, and ilObject\getId().
Referenced by ilPollAnswersHandler\__construct(), doCloneObject(), ilPollStateInfo\hasQuestion(), rebuildAnswerPositions(), and saveAnswers().
|
static |
Definition at line 397 of file class.ilObjPoll.php.
Referenced by ilObjPollGUI\initQuestionForm().
ilObjPoll::getMaxNumberOfAnswers | ( | ) |
Definition at line 178 of file class.ilObjPoll.php.
References $max_number_answers.
Referenced by ilPollAnswersHandler\__construct(), doCloneObject(), and propertiesToDB().
ilObjPoll::getNonAnonymous | ( | ) |
Definition at line 198 of file class.ilObjPoll.php.
References $mode_non_anonymous.
Referenced by doCloneObject(), propertiesToDB(), and ilPollContentRenderer\renderAnswers().
ilObjPoll::getQuestion | ( | ) |
Definition at line 128 of file class.ilObjPoll.php.
References $question.
Referenced by doCloneObject(), propertiesToDB(), and ilPollContentRenderer\render().
ilObjPoll::getShowComments | ( | ) |
Definition at line 208 of file class.ilObjPoll.php.
References $show_comments.
Referenced by doCloneObject(), doUpdate(), and ilPollContentRenderer\render().
ilObjPoll::getShowResultsAs | ( | ) |
Definition at line 218 of file class.ilObjPoll.php.
References $show_results_as.
Referenced by doCloneObject(), propertiesToDB(), and ilPollContentRenderer\renderResults().
ilObjPoll::getSortResultByVotes | ( | ) |
Definition at line 188 of file class.ilObjPoll.php.
References $result_sort_by_votes.
Referenced by ilPollResultsHandler\__construct(), doCloneObject(), and propertiesToDB().
ilObjPoll::getViewResults | ( | ) |
Definition at line 138 of file class.ilObjPoll.php.
References $view_results.
Referenced by ilPollStateInfo\areResultsVisible(), doCloneObject(), propertiesToDB(), and ilPollStateInfo\willResultsBeShown().
ilObjPoll::getVotePercentages | ( | ) |
Definition at line 631 of file class.ilObjPoll.php.
References $id, $res, countVotes(), ilObject\getId(), and ILIAS\Repository\int().
Referenced by ilPollResultsHandler\__construct().
ilObjPoll::getVotesByUsers | ( | ) |
Definition at line 659 of file class.ilObjPoll.php.
References ilObject\$db, $ilDB, $res, $user_id, ilObject\getId(), and ILIAS\Repository\int().
ilObjPoll::getVotingPeriod | ( | ) |
Definition at line 148 of file class.ilObjPoll.php.
References $period.
Referenced by ilPollStateInfo\hasVotingPeriodEnded(), ilPollStateInfo\hasVotingPeriodNotStarted(), and propertiesToDB().
ilObjPoll::getVotingPeriodBegin | ( | ) |
Definition at line 158 of file class.ilObjPoll.php.
References $period_begin.
Referenced by ilPollStateInfo\hasVotingPeriodNotStarted(), propertiesToDB(), and ilPollContentRenderer\render().
ilObjPoll::getVotingPeriodEnd | ( | ) |
Definition at line 168 of file class.ilObjPoll.php.
References $period_end.
Referenced by ilPollStateInfo\hasVotingPeriodEnded(), propertiesToDB(), ilPollContentRenderer\render(), ilPollContentRenderer\renderAnswers(), and ilPollContentRenderer\renderAnswersAndResults().
ilObjPoll::hasUserVoted | ( | int | $a_user_id | ) |
Definition at line 610 of file class.ilObjPoll.php.
References ilObject\getId().
Referenced by ilPollStateInfo\hasUserAlreadyVoted(), and saveVote().
|
protected |
Definition at line 78 of file class.ilObjPoll.php.
|
protected |
Definition at line 255 of file class.ilObjPoll.php.
References getMaxNumberOfAnswers(), getNonAnonymous(), getQuestion(), getShowResultsAs(), getSortResultByVotes(), getViewResults(), getVotingPeriod(), getVotingPeriodBegin(), and getVotingPeriodEnd().
Referenced by doCreate(), and doUpdate().
ilObjPoll::rebuildAnswerPositions | ( | ) |
Definition at line 476 of file class.ilObjPoll.php.
References $id, getAnswers(), ILIAS\Repository\int(), and updateAnswerPositions().
ilObjPoll::saveAnswer | ( | string | $a_text, |
?int | $a_pos = null |
||
) |
Definition at line 434 of file class.ilObjPoll.php.
References ilObject\$db, $id, $ilDB, ilObject\getId(), ILIAS\Repository\int(), and null.
Referenced by saveAnswers().
ilObjPoll::saveAnswers | ( | array | $a_answers | ) |
Definition at line 542 of file class.ilObjPoll.php.
References $id, deleteAnswer(), getAnswers(), ILIAS\Repository\int(), null, saveAnswer(), and updateAnswerPositions().
ilObjPoll::saveVote | ( | int | $a_user_id, |
array | $a_answers | ||
) |
Definition at line 596 of file class.ilObjPoll.php.
References ilObject\getId(), and hasUserVoted().
ilObjPoll::setAccessBegin | ( | int | $a_value | ) |
Definition at line 93 of file class.ilObjPoll.php.
Referenced by doRead().
ilObjPoll::setAccessEnd | ( | int | $a_value | ) |
Definition at line 103 of file class.ilObjPoll.php.
Referenced by doRead().
ilObjPoll::setAccessType | ( | int | $a_value | ) |
Definition at line 83 of file class.ilObjPoll.php.
Referenced by __construct(), and doRead().
ilObjPoll::setAccessVisibility | ( | bool | $a_value | ) |
Definition at line 113 of file class.ilObjPoll.php.
Referenced by doRead().
ilObjPoll::setMaxNumberOfAnswers | ( | int | $a_value | ) |
Definition at line 173 of file class.ilObjPoll.php.
Referenced by doRead().
ilObjPoll::setNonAnonymous | ( | bool | $a_value | ) |
Definition at line 193 of file class.ilObjPoll.php.
Referenced by doRead().
ilObjPoll::setQuestion | ( | string | $a_value | ) |
Definition at line 123 of file class.ilObjPoll.php.
Referenced by doRead().
ilObjPoll::setShowComments | ( | bool | $a_value | ) |
Definition at line 203 of file class.ilObjPoll.php.
Referenced by doRead().
ilObjPoll::setShowResultsAs | ( | int | $a_value | ) |
Definition at line 213 of file class.ilObjPoll.php.
Referenced by doRead().
ilObjPoll::setSortResultByVotes | ( | bool | $a_value | ) |
Definition at line 183 of file class.ilObjPoll.php.
Referenced by doRead().
ilObjPoll::setViewResults | ( | int | $a_value | ) |
Definition at line 133 of file class.ilObjPoll.php.
Referenced by __construct(), and doRead().
ilObjPoll::setVotingPeriod | ( | bool | $a_value | ) |
Definition at line 143 of file class.ilObjPoll.php.
Referenced by __construct(), and doRead().
ilObjPoll::setVotingPeriodBegin | ( | int | $a_value | ) |
Definition at line 153 of file class.ilObjPoll.php.
Referenced by doRead().
ilObjPoll::setVotingPeriodEnd | ( | int | $a_value | ) |
Definition at line 163 of file class.ilObjPoll.php.
Referenced by doRead().
ilObjPoll::updateAnswer | ( | int | $a_id, |
string | $a_text | ||
) |
ilObjPoll::updateAnswerPositions | ( | array | $a_pos | ) |
Definition at line 489 of file class.ilObjPoll.php.
References ilObject\$db, $id, and $ilDB.
Referenced by rebuildAnswerPositions(), and saveAnswers().
ilObjPoll::uploadImage | ( | string | $file_path, |
string | $file_name | ||
) |
Definition at line 384 of file class.ilObjPoll.php.
References ilObject\getId(), and ILIAS\Repository\user().
|
protected |
Definition at line 39 of file class.ilObjPoll.php.
Referenced by getAccessBegin().
|
protected |
Definition at line 40 of file class.ilObjPoll.php.
Referenced by getAccessEnd().
|
protected |
Definition at line 38 of file class.ilObjPoll.php.
Referenced by getAccessType().
|
protected |
Definition at line 41 of file class.ilObjPoll.php.
Referenced by getAccessVisibility().
|
protected |
Definition at line 37 of file class.ilObjPoll.php.
|
protected |
Definition at line 43 of file class.ilObjPoll.php.
|
protected |
Definition at line 49 of file class.ilObjPoll.php.
Referenced by getMaxNumberOfAnswers().
|
protected |
Definition at line 51 of file class.ilObjPoll.php.
Referenced by getNonAnonymous().
|
protected |
Definition at line 36 of file class.ilObjPoll.php.
|
protected |
Definition at line 45 of file class.ilObjPoll.php.
Referenced by getVotingPeriod().
|
protected |
Definition at line 46 of file class.ilObjPoll.php.
Referenced by getVotingPeriodBegin().
|
protected |
Definition at line 47 of file class.ilObjPoll.php.
Referenced by getVotingPeriodEnd().
|
protected |
Definition at line 35 of file class.ilObjPoll.php.
|
protected |
Definition at line 42 of file class.ilObjPoll.php.
Referenced by getQuestion().
|
protected |
Definition at line 50 of file class.ilObjPoll.php.
Referenced by getSortResultByVotes().
|
protected |
Definition at line 52 of file class.ilObjPoll.php.
Referenced by getShowComments().
|
protected |
Definition at line 53 of file class.ilObjPoll.php.
Referenced by getShowResultsAs().
|
protected |
Definition at line 44 of file class.ilObjPoll.php.
Referenced by getViewResults().
const int ilObjPoll::SHOW_RESULTS_AS_BARCHART = 1 |
Definition at line 60 of file class.ilObjPoll.php.
Referenced by ilObjPollGUI\initEditCustomForm().
const int ilObjPoll::SHOW_RESULTS_AS_STACKED_CHART = 2 |
Definition at line 61 of file class.ilObjPoll.php.
Referenced by ilObjPollGUI\initEditCustomForm(), and ilPollResultsRenderer\render().
const int ilObjPoll::VIEW_RESULTS_AFTER_PERIOD = 4 |
Definition at line 58 of file class.ilObjPoll.php.
Referenced by ilPollStateInfo\areResultsVisible(), doCloneObject(), ilObjPollGUI\initEditCustomForm(), ilObjPollGUI\validateCustom(), and ilPollStateInfo\willResultsBeShown().
const int ilObjPoll::VIEW_RESULTS_AFTER_VOTE = 3 |
Definition at line 57 of file class.ilObjPoll.php.
Referenced by ilPollStateInfo\areResultsVisible(), ilPollDataSet\getXmlRecord(), and ilObjPollGUI\initEditCustomForm().
const int ilObjPoll::VIEW_RESULTS_ALWAYS = 1 |
Definition at line 55 of file class.ilObjPoll.php.
Referenced by ilPollStateInfo\areResultsVisible(), doCloneObject(), and ilObjPollGUI\initEditCustomForm().
const int ilObjPoll::VIEW_RESULTS_NEVER = 2 |
Definition at line 56 of file class.ilObjPoll.php.
Referenced by ilPollStateInfo\areResultsVisible(), and ilObjPollGUI\initEditCustomForm().