| ILIAS
    Release_4_1_x_branch Revision 61804
    | 
Class ilObjExercise. More...
 Inheritance diagram for ilObjExercise:
 Inheritance diagram for ilObjExercise: Collaboration diagram for ilObjExercise:
 Collaboration diagram for ilObjExercise:| Public Member Functions | |
| ilObjExercise ($a_id=0, $a_call_by_reference=true) | |
| Constructor  public. | |
| setDate ($a_hour, $a_minutes, $a_day, $a_month, $a_year) | |
| getTimestamp () | |
| setTimestamp ($a_timestamp) | |
| setInstruction ($a_instruction) | |
| getInstruction () | |
| setPassMode ($a_val) | |
| Set pass mode (all | nr) | |
| getPassMode () | |
| Get pass mode (all | nr) | |
| setPassNr ($a_val) | |
| Set number of assignments that must be passed to pass the exercise. | |
| getPassNr () | |
| Get number of assignments that must be passed to pass the exercise. | |
| setShowSubmissions ($a_val) | |
| Set whether submissions of learners should be shown to other learners after deadline. | |
| getShowSubmissions () | |
| Get whether submissions of learners should be shown to other learners after deadline. | |
| checkDate () | |
| deliverFile ($a_http_post_files, $a_ass_id, $user_id, $unzip=false) | |
| Save submitted file of user. | |
| addUploadedFile ($a_http_post_files, $unzipUploadedFile=false) | |
| Upload assigment files. | |
| deleteFiles ($a_files) | |
| saveData () | |
| cloneObject ($a_target_id, $a_copy_id=0) | |
| Clone exercise (no member data) | |
| deleteDeliveredFiles ($a_exc_id, $a_ass_id, $file_id_array, $user_id) | |
| Deletes already delivered files. | |
| deliverReturnedFiles ($user_id) | |
| Delivers the returned files of an user. | |
| delete () | |
| delete course and all related data | |
| notify ($a_event, $a_ref_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. | |
| read () | |
| update () | |
| update object in db | |
| sendAssignment ($a_exc_id, $a_ass_id, $a_members) | |
| send exercise per mail to members | |
| _lookupStatusTime ($exc_id, $member_id) | |
| Get time when exercise has been set to solved. | |
| __formatBody ($a_ass_id) | |
| __formatSubject () | |
| __formatRecipients ($a_members) | |
| _checkCondition ($a_exc_id, $a_operator, $a_value, $a_usr_id=0) | |
| processUploadedFile ($fileTmp, $storageMethod, $persistentErrorMessage, $a_ass_id) | |
| processes errorhandling etc for uploaded archive | |
| determinStatusOfUser ($a_user_id=0) | |
| Determine status of user. | |
| updateUserStatus ($a_user_id=0) | |
| Update exercise status of user. | |
| updateAllUsersStatus () | |
| Update status of all users. | |
| exportGradesExcel () | |
| Exports grades as excel. | |
| sendFeedbackFileNotification ($a_feedback_file, $a_user_id, $a_ass_id) | |
| Send feedback file notification to user. | |
|  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) | |
| read ($a_force_db=false) | |
| read object data from db into object | |
| 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 | |
| _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 | |
| getDiskUsage () | |
| Gets the disk usage of the object in bytes. | |
| 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) | |
| _lookupOwner ($a_id) | |
| lookup object owner | |
| _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. | |
| _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 | |
| _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 | |
| 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 () | |
| 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. | |
| Static Public Member Functions | |
| static | _fixFilename ($a_filename) | 
| This function fixes filenames. | |
| static | _fixFilenameArray ($a_array) | 
| Iterates an associative array and fixes all fields with the key "filename" using the _fixFilename() method. | |
|  Static Public Member Functions inherited from ilObject | |
| static | _getAllReferences ($a_id) | 
| get all reference ids of object | |
| static | _lookupTitle ($a_id) | 
| lookup object title | |
| static | _getIdsForTitle ($title, $type= '', $partialmatch=false) | 
| static | _lookupObjId ($a_id) | 
| static | _lookupType ($a_id, $a_reference=false) | 
| lookup object type | |
| _exists ($a_id, $a_reference=false) | |
| checks if an object exists in object_data | |
| static | _getObjectsByType ($a_obj_type="", $a_owner="") | 
| 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) | 
| Get icon for repository item. | |
| 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. | |
| Data Fields | |
| $file_obj | |
| $members_obj | |
| $files | |
| $timestamp | |
| $hour | |
| $minutes | |
| $day | |
| $month | |
| $year | |
| $instruction | |
|  Data Fields inherited from ilObject | |
| const | TITLE_LENGTH = 128 | 
| max length of object title | |
| $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 | |
Class ilObjExercise.
Definition at line 19 of file class.ilObjExercise.php.
| ilObjExercise::__formatBody | ( | $a_ass_id | ) | 
Definition at line 487 of file class.ilObjExercise.php.
References ilObject\$lng, ilFormat\formatDate(), and ilObject\getType().
Referenced by sendAssignment().
 Here is the call graph for this function:
 Here is the call graph for this function: Here is the caller graph for this function:
 Here is the caller graph for this function:| ilObjExercise::__formatRecipients | ( | $a_members | ) | 
Definition at line 512 of file class.ilObjExercise.php.
References ilObjectFactory\getInstanceByObjId().
Referenced by sendAssignment().
 Here is the call graph for this function:
 Here is the call graph for this function: Here is the caller graph for this function:
 Here is the caller graph for this function:| ilObjExercise::__formatSubject | ( | ) | 
Definition at line 507 of file class.ilObjExercise.php.
References ilObject\getDescription(), and ilObject\getTitle().
Referenced by sendAssignment().
 Here is the call graph for this function:
 Here is the call graph for this function: Here is the caller graph for this function:
 Here is the caller graph for this function:| ilObjExercise::_checkCondition | ( | $a_exc_id, | |
| $a_operator, | |||
| $a_value, | |||
| $a_usr_id = 0 | |||
| ) | 
Definition at line 525 of file class.ilObjExercise.php.
References ilExerciseMembers\_lookupStatus().
 Here is the call graph for this function:
 Here is the call graph for this function:| 
 | static | 
This function fixes filenames.
Prior to ILIAS 3.10.0 filenames have been stored with full path in exc_returned.filename, e.g. /opt/ilias/my_client/exercise/547/157/20070813113926_README.doc
Problems occur, if the server is moved from one location to another. We do the following: The filename will be parsed and if it contains the string "/exercise/" we truncate everything before "/exercise/" and replace it with the current CLIENT_DATA_DIR.
Definition at line 614 of file class.ilObjExercise.php.
Referenced by _fixFilenameArray().
 Here is the caller graph for this function:
 Here is the caller graph for this function:| 
 | static | 
Iterates an associative array and fixes all fields with the key "filename" using the _fixFilename() method.
Definition at line 628 of file class.ilObjExercise.php.
References _fixFilename().
 Here is the call graph for this function:
 Here is the call graph for this function:| ilObjExercise::_lookupStatusTime | ( | $exc_id, | |
| $member_id | |||
| ) | 
Get time when exercise has been set to solved.
Definition at line 469 of file class.ilObjExercise.php.
References $ilDB, ilObject\$lng, and ilUtil\getMySQLTimestamp().
 Here is the call graph for this function:
 Here is the call graph for this function:| ilObjExercise::addUploadedFile | ( | $a_http_post_files, | |
| $unzipUploadedFile = false | |||
| ) | 
Upload assigment files.
Definition at line 190 of file class.ilObjExercise.php.
References ilObject\$lng, and processUploadedFile().
 Here is the call graph for this function:
 Here is the call graph for this function:| ilObjExercise::checkDate | ( | ) | 
Definition at line 140 of file class.ilObjExercise.php.
| ilObjExercise::cloneObject | ( | $a_target_id, | |
| $a_copy_id = 0 | |||
| ) | 
Clone exercise (no member data)
public
| int | target ref_id | 
| int | copy id | 
Reimplemented from ilObject.
Definition at line 241 of file class.ilObjExercise.php.
References $ilDB, ilExAssignment\cloneAssignmentsOfExercise(), ilObject\getId(), getInstruction(), getPassMode(), getPassNr(), getShowSubmissions(), and getTimestamp().
 Here is the call graph for this function:
 Here is the call graph for this function:| ilObjExercise::delete | ( | ) | 
delete course and all related data
public
Reimplemented from ilObject.
Definition at line 304 of file class.ilObjExercise.php.
References $ilDB, ilObject\getId(), ilNotification\removeForObject(), and ilNotification\TYPE_EXERCISE_SUBMISSION.
 Here is the call graph for this function:
 Here is the call graph for this function:| ilObjExercise::deleteDeliveredFiles | ( | $a_exc_id, | |
| $a_ass_id, | |||
| $file_id_array, | |||
| $user_id | |||
| ) | 
Deletes already delivered files.
| array | $file_id_array | An array containing database ids of the delivered files | 
| numeric | $user_id | The database id of the user public | 
Definition at line 277 of file class.ilObjExercise.php.
References ilExAssignment\getDeliveredFiles(), and ilExAssignment\updateStatusReturnedForUser().
 Here is the call graph for this function:
 Here is the call graph for this function:| ilObjExercise::deleteFiles | ( | $a_files | ) | 
Definition at line 207 of file class.ilObjExercise.php.
| ilObjExercise::deliverFile | ( | $a_http_post_files, | |
| $a_ass_id, | |||
| $user_id, | |||
| $unzip = false | |||
| ) | 
Save submitted file of user.
Definition at line 153 of file class.ilObjExercise.php.
References $ilDB, $query, ilExerciseMembers\_writeReturned(), ilObject\getId(), ilUtil\now(), and ilExAssignment\updateStatusReturnedForUser().
Referenced by exportGradesExcel().
 Here is the call graph for this function:
 Here is the call graph for this function: Here is the caller graph for this function:
 Here is the caller graph for this function:| ilObjExercise::deliverReturnedFiles | ( | $user_id | ) | 
Delivers the returned files of an user.
| numeric | $user_id | The database id of the user public | 
Definition at line 293 of file class.ilObjExercise.php.
| ilObjExercise::determinStatusOfUser | ( | $a_user_id = 0 | ) | 
Determine status of user.
Definition at line 647 of file class.ilObjExercise.php.
References $ret, ilExAssignment\getAssignmentDataOfExercise(), ilObject\getId(), getPassMode(), getPassNr(), and ilExAssignment\lookupStatusOfUser().
Referenced by updateUserStatus().
 Here is the call graph for this function:
 Here is the call graph for this function: Here is the caller graph for this function:
 Here is the caller graph for this function:| ilObjExercise::exportGradesExcel | ( | ) | 
Exports grades as excel.
Definition at line 771 of file class.ilObjExercise.php.
References $d, $data, ilExcelUtils\_convert_text(), ilLPMarks\_lookupMark(), ilObjUser\_lookupName(), ilExerciseMembers\_lookupStatus(), deliverFile(), ilUtil\getASCIIFilename(), ilExAssignment\getAssignmentDataOfExercise(), ilObject\getId(), ilObject\getTitle(), ilUtil\ilTempnam(), ilExAssignment\lookupMarkOfUser(), ilExAssignment\lookupStatusOfUser(), and ilUtil\sortArray().
 Here is the call graph for this function:
 Here is the call graph for this function:| ilObjExercise::getInstruction | ( | ) | 
Definition at line 69 of file class.ilObjExercise.php.
References $instruction.
Referenced by cloneObject(), saveData(), and update().
 Here is the caller graph for this function:
 Here is the caller graph for this function:| ilObjExercise::getPassMode | ( | ) | 
Get pass mode (all | nr)
Definition at line 89 of file class.ilObjExercise.php.
Referenced by cloneObject(), determinStatusOfUser(), saveData(), and update().
 Here is the caller graph for this function:
 Here is the caller graph for this function:| ilObjExercise::getPassNr | ( | ) | 
Get number of assignments that must be passed to pass the exercise.
Definition at line 109 of file class.ilObjExercise.php.
Referenced by cloneObject(), determinStatusOfUser(), saveData(), and update().
 Here is the caller graph for this function:
 Here is the caller graph for this function:| ilObjExercise::getShowSubmissions | ( | ) | 
Get whether submissions of learners should be shown to other learners after deadline.
Definition at line 129 of file class.ilObjExercise.php.
Referenced by cloneObject(), saveData(), and update().
 Here is the caller graph for this function:
 Here is the caller graph for this function:| ilObjExercise::getTimestamp | ( | ) | 
Definition at line 57 of file class.ilObjExercise.php.
References $timestamp.
Referenced by cloneObject(), saveData(), and update().
 Here is the caller graph for this function:
 Here is the caller graph for this function:| ilObjExercise::ilObjExercise | ( | $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 39 of file class.ilObjExercise.php.
References ilObject\ilObject(), and setPassMode().
 Here is the call graph for this function:
 Here is the call graph for this function:| ilObjExercise::notify | ( | $a_event, | |
| $a_ref_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.
public
| string | event | 
| integer | reference id of object where the event occured | 
| array | passes optional paramters if required | 
Definition at line 339 of file class.ilObjExercise.php.
| ilObjExercise::processUploadedFile | ( | $fileTmp, | |
| $storageMethod, | |||
| $persistentErrorMessage, | |||
| $a_ass_id | |||
| ) | 
processes errorhandling etc for uploaded archive
| string | $tmpFile | path and filename to uploaded file | 
| string | $storageMethod | deliverFile or storeUploadedFile | 
| boolean | $persistentErrorMessage | Defines whether sendInfo will be persistent or not | 
Definition at line 556 of file class.ilObjExercise.php.
References $filename, ilObject\$lng, ilExerciseMembers\_writeReturned(), ilUtil\delDir(), ilObject\getId(), ilUtil\ilTempnam(), ilUtil\makeDir(), ilFileUtils\processZipFile(), ilFileUtils\recursive_dirscan(), ilUtil\sendFailure(), ilUtil\sendSuccess(), and ilFileUtils\utf8_encode().
Referenced by addUploadedFile().
 Here is the call graph for this function:
 Here is the call graph for this function: Here is the caller graph for this function:
 Here is the caller graph for this function:| ilObjExercise::read | ( | ) | 
Definition at line 346 of file class.ilObjExercise.php.
References $ilDB, $query, $res, $row, ilObject\getId(), setInstruction(), setPassNr(), setShowSubmissions(), and setTimestamp().
 Here is the call graph for this function:
 Here is the call graph for this function:| ilObjExercise::saveData | ( | ) | 
Definition at line 212 of file class.ilObjExercise.php.
References $ilDB, ilObject\getId(), getInstruction(), getPassMode(), getPassNr(), getShowSubmissions(), and getTimestamp().
 Here is the call graph for this function:
 Here is the call graph for this function:| ilObjExercise::sendAssignment | ( | $a_exc_id, | |
| $a_ass_id, | |||
| $a_members | |||
| ) | 
send exercise per mail to members
Definition at line 422 of file class.ilObjExercise.php.
References $_SESSION, $file, $files, __formatBody(), __formatRecipients(), __formatSubject(), and ilExAssignment\updateStatusSentForUser().
 Here is the call graph for this function:
 Here is the call graph for this function:| ilObjExercise::sendFeedbackFileNotification | ( | $a_feedback_file, | |
| $a_user_id, | |||
| $a_ass_id | |||
| ) | 
Send feedback file notification to user.
Definition at line 888 of file class.ilObjExercise.php.
References ilObject\getRefId(), and ilExerciseMailNotification\TYPE_FEEDBACK_FILE_ADDED.
 Here is the call graph for this function:
 Here is the call graph for this function:| ilObjExercise::setDate | ( | $a_hour, | |
| $a_minutes, | |||
| $a_day, | |||
| $a_month, | |||
| $a_year | |||
| ) | 
Definition at line 47 of file class.ilObjExercise.php.
| ilObjExercise::setInstruction | ( | $a_instruction | ) | 
Definition at line 65 of file class.ilObjExercise.php.
Referenced by read().
 Here is the caller graph for this function:
 Here is the caller graph for this function:| ilObjExercise::setPassMode | ( | $a_val | ) | 
Set pass mode (all | nr)
| string | pass mode | 
Definition at line 79 of file class.ilObjExercise.php.
Referenced by ilObjExercise().
 Here is the caller graph for this function:
 Here is the caller graph for this function:| ilObjExercise::setPassNr | ( | $a_val | ) | 
Set number of assignments that must be passed to pass the exercise.
| integer | pass nr | 
Definition at line 99 of file class.ilObjExercise.php.
Referenced by read().
 Here is the caller graph for this function:
 Here is the caller graph for this function:| ilObjExercise::setShowSubmissions | ( | $a_val | ) | 
Set whether submissions of learners should be shown to other learners after deadline.
| boolean | show submissions | 
Definition at line 119 of file class.ilObjExercise.php.
Referenced by read().
 Here is the caller graph for this function:
 Here is the caller graph for this function:| ilObjExercise::setTimestamp | ( | $a_timestamp | ) | 
Definition at line 61 of file class.ilObjExercise.php.
Referenced by read().
 Here is the caller graph for this function:
 Here is the caller graph for this function:| ilObjExercise::update | ( | ) | 
update object in db
public
Reimplemented from ilObject.
Definition at line 380 of file class.ilObjExercise.php.
References $ilDB, ilObject\getId(), getInstruction(), getPassMode(), getPassNr(), getShowSubmissions(), getTimestamp(), and updateAllUsersStatus().
 Here is the call graph for this function:
 Here is the call graph for this function:| ilObjExercise::updateAllUsersStatus | ( | ) | 
Update status of all users.
Definition at line 754 of file class.ilObjExercise.php.
References updateUserStatus().
Referenced by update().
 Here is the call graph for this function:
 Here is the call graph for this function: Here is the caller graph for this function:
 Here is the caller graph for this function:| ilObjExercise::updateUserStatus | ( | $a_user_id = 0 | ) | 
Update exercise status of user.
Definition at line 735 of file class.ilObjExercise.php.
References ilExerciseMembers\_writeStatus(), determinStatusOfUser(), and ilObject\getId().
Referenced by updateAllUsersStatus(), and ilExAssignment\updateStatusOfUser().
 Here is the call graph for this function:
 Here is the call graph for this function: Here is the caller graph for this function:
 Here is the caller graph for this function:| ilObjExercise::$day | 
Definition at line 28 of file class.ilObjExercise.php.
| ilObjExercise::$file_obj | 
Definition at line 21 of file class.ilObjExercise.php.
| ilObjExercise::$files | 
Definition at line 23 of file class.ilObjExercise.php.
Referenced by sendAssignment().
| ilObjExercise::$hour | 
Definition at line 26 of file class.ilObjExercise.php.
| ilObjExercise::$instruction | 
Definition at line 31 of file class.ilObjExercise.php.
Referenced by getInstruction().
| ilObjExercise::$members_obj | 
Definition at line 22 of file class.ilObjExercise.php.
| ilObjExercise::$minutes | 
Definition at line 27 of file class.ilObjExercise.php.
| ilObjExercise::$month | 
Definition at line 29 of file class.ilObjExercise.php.
| ilObjExercise::$timestamp | 
Definition at line 25 of file class.ilObjExercise.php.
Referenced by getTimestamp().
| ilObjExercise::$year | 
Definition at line 30 of file class.ilObjExercise.php.