ILIAS
Release_3_10_x_branch Revision 61812
|
Class ilObjExercise. More...
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 () | |
getFiles () | |
checkDate () | |
deliverFile ($a_http_post_files, $user_id, $unzip=false) | |
addUploadedFile ($a_http_post_files, $unzipUploadedFile=false) | |
deleteFiles ($a_files) | |
saveData () | |
cloneObject ($a_target_id, $a_copy_id=0) | |
Clone exercise (no member data) | |
& | getDeliveredFiles ($user_id) |
Returns the delivered files of an user. | |
deleteDeliveredFiles ($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 | |
getMemberListData () | |
get member list data | |
getLastSubmission ($member_id) | |
Get the date of the last submission of a user for the exercise. | |
send ($a_members) | |
send exercise per mail to members | |
_lookupUpdatedSubmission ($exc_id, $member_id) | |
Check whether student has upload new files after tutor has set the exercise to another than notgraded. | |
_lookupAnyExerciseSent ($a_exc_id) | |
Check whether exercise has been sent to any student per mail. | |
_lookupNewFiles ($exc_id, $member_id) | |
Check how much files have been uploaded by the learner after the last download of the tutor. | |
_lookupStatusTime ($exc_id, $member_id) | |
Get time when exercise has been set to solved. | |
_lookupSentTime ($exc_id, $member_id) | |
Get time when exercise has been sent per e-mail to user. | |
_lookupFeedbackTime ($exc_id, $member_id) | |
Get time when feedback mail has been sent. | |
__formatBody () | |
__formatSubject () | |
__formatRecipients ($a_members) | |
_checkCondition ($a_exc_id, $a_operator, $a_value, $a_usr_id=0) | |
processUploadedFile ($fileTmp, $storageMethod, $persistentErrorMessage) | |
processes errorhandling etc for uploaded archive | |
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 | |
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 | |
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 | _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) |
Data Fields | |
$file_obj | |
$members_obj | |
$files | |
$timestamp | |
$hour | |
$minutes | |
$day | |
$month | |
$year | |
$instruction | |
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 |
Class ilObjExercise.
Definition at line 39 of file class.ilObjExercise.php.
ilObjExercise::__formatBody | ( | ) |
Definition at line 575 of file class.ilObjExercise.php.
References ilObject\$lng, ilFormat\formatDate(), getInstruction(), getTimestamp(), and ilObject\getType().
Referenced by send().
ilObjExercise::__formatRecipients | ( | $a_members | ) |
Definition at line 597 of file class.ilObjExercise.php.
References ilObjectFactory\getInstanceByObjId().
Referenced by send().
ilObjExercise::__formatSubject | ( | ) |
Definition at line 592 of file class.ilObjExercise.php.
References ilObject\getDescription(), and ilObject\getTitle().
Referenced by send().
ilObjExercise::_checkCondition | ( | $a_exc_id, | |
$a_operator, | |||
$a_value, | |||
$a_usr_id = 0 |
|||
) |
Definition at line 610 of file class.ilObjExercise.php.
References ilExerciseMembers\_lookupStatus().
|
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 697 of file class.ilObjExercise.php.
Referenced by _fixFilenameArray(), ilExerciseMembers\deleteDeliveredFiles(), ilExerciseMembers\deliverReturnedFiles(), and ilExerciseMembers\downloadSelectedFiles().
|
static |
Iterates an associative array and fixes all fields with the key "filename" using the _fixFilename() method.
Definition at line 711 of file class.ilObjExercise.php.
References _fixFilename().
Referenced by ilExerciseMembers\getAllDeliveredFiles(), and ilExerciseMembers\getDeliveredFiles().
ilObjExercise::_lookupAnyExerciseSent | ( | $a_exc_id | ) |
Check whether exercise has been sent to any student per mail.
Definition at line 469 of file class.ilObjExercise.php.
References DB_FETCHMODE_ASSOC.
ilObjExercise::_lookupFeedbackTime | ( | $exc_id, | |
$member_id | |||
) |
Get time when feedback mail has been sent.
Definition at line 558 of file class.ilObjExercise.php.
References ilObject\$lng, DB_FETCHMODE_ASSOC, and ilUtil\getMySQLTimestamp().
Referenced by ilObjExerciseGUI\membersObject().
ilObjExercise::_lookupNewFiles | ( | $exc_id, | |
$member_id | |||
) |
Check how much files have been uploaded by the learner after the last download of the tutor.
Definition at line 493 of file class.ilObjExercise.php.
References DB_FETCHMODE_ASSOC.
ilObjExercise::_lookupSentTime | ( | $exc_id, | |
$member_id | |||
) |
Get time when exercise has been sent per e-mail to user.
Definition at line 539 of file class.ilObjExercise.php.
References ilObject\$lng, DB_FETCHMODE_ASSOC, and ilUtil\getMySQLTimestamp().
Referenced by ilObjExerciseGUI\membersObject().
ilObjExercise::_lookupStatusTime | ( | $exc_id, | |
$member_id | |||
) |
Get time when exercise has been set to solved.
Definition at line 520 of file class.ilObjExercise.php.
References ilObject\$lng, DB_FETCHMODE_ASSOC, and ilUtil\getMySQLTimestamp().
Referenced by ilObjExerciseGUI\membersObject().
ilObjExercise::_lookupUpdatedSubmission | ( | $exc_id, | |
$member_id | |||
) |
Check whether student has upload new files after tutor has set the exercise to another than notgraded.
Definition at line 436 of file class.ilObjExercise.php.
References ilObject\$lng, and DB_FETCHMODE_ASSOC.
ilObjExercise::addUploadedFile | ( | $a_http_post_files, | |
$unzipUploadedFile = false |
|||
) |
Definition at line 132 of file class.ilObjExercise.php.
References ilObject\$lng, and processUploadedFile().
ilObjExercise::checkDate | ( | ) |
Definition at line 97 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 174 of file class.ilObjExercise.php.
References ilObject\getId(), getInstruction(), and getTimestamp().
ilObjExercise::delete | ( | ) |
delete course and all related data
public
Reimplemented from ilObject.
Definition at line 245 of file class.ilObjExercise.php.
References ilObject\getId().
ilObjExercise::deleteDeliveredFiles | ( | $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 217 of file class.ilObjExercise.php.
ilObjExercise::deleteFiles | ( | $a_files | ) |
Definition at line 149 of file class.ilObjExercise.php.
ilObjExercise::deliverFile | ( | $a_http_post_files, | |
$user_id, | |||
$unzip = false |
|||
) |
Definition at line 107 of file class.ilObjExercise.php.
ilObjExercise::deliverReturnedFiles | ( | $user_id | ) |
Delivers the returned files of an user.
numeric | $user_id | The database id of the user public |
Definition at line 234 of file class.ilObjExercise.php.
& ilObjExercise::getDeliveredFiles | ( | $user_id | ) |
Returns the delivered files of an user.
numeric | $user_id | The database id of the user |
Definition at line 205 of file class.ilObjExercise.php.
ilObjExercise::getFiles | ( | ) |
ilObjExercise::getInstruction | ( | ) |
Definition at line 88 of file class.ilObjExercise.php.
References $instruction.
Referenced by __formatBody(), cloneObject(), saveData(), and update().
ilObjExercise::getLastSubmission | ( | $member_id | ) |
Get the date of the last submission of a user for the exercise.
int | $member_id | User ID of member. |
Definition at line 368 of file class.ilObjExercise.php.
References ilObject\$lng, DB_FETCHMODE_ASSOC, ilObject\getId(), and ilUtil\getMySQLTimestamp().
Referenced by getMemberListData().
ilObjExercise::getMemberListData | ( | ) |
get member list data
Definition at line 328 of file class.ilObjExercise.php.
References ilObject\_exists(), ilObjUser\_lookupLogin(), ilObjUser\_lookupName(), ilObject\_lookupType(), DB_FETCHMODE_ASSOC, ilObject\getId(), and getLastSubmission().
ilObjExercise::getTimestamp | ( | ) |
Definition at line 76 of file class.ilObjExercise.php.
References $timestamp.
Referenced by __formatBody(), cloneObject(), saveData(), and update().
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 59 of file class.ilObjExercise.php.
References ilObject\ilObject().
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 276 of file class.ilObjExercise.php.
ilObjExercise::processUploadedFile | ( | $fileTmp, | |
$storageMethod, | |||
$persistentErrorMessage | |||
) |
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 641 of file class.ilObjExercise.php.
References $filename, ilObject\$lng, ilUtil\delDir(), ilUtil\ilTempnam(), ilUtil\makeDir(), ilFileUtils\processZipFile(), ilFileUtils\recursive_dirscan(), ilUtil\sendInfo(), and ilFileUtils\utf8_encode().
Referenced by addUploadedFile().
ilObjExercise::read | ( | ) |
Definition at line 283 of file class.ilObjExercise.php.
References $res, DB_FETCHMODE_OBJECT, ilObject\getId(), ilObject\getRefId(), setInstruction(), setTimestamp(), and ilUtil\sortArray().
ilObjExercise::saveData | ( | ) |
Definition at line 154 of file class.ilObjExercise.php.
References ilObject\getId(), getInstruction(), and getTimestamp().
ilObjExercise::send | ( | $a_members | ) |
send exercise per mail to members
Definition at line 393 of file class.ilObjExercise.php.
References $_SESSION, $file, $files, __formatBody(), __formatRecipients(), and __formatSubject().
ilObjExercise::setDate | ( | $a_hour, | |
$a_minutes, | |||
$a_day, | |||
$a_month, | |||
$a_year | |||
) |
Definition at line 66 of file class.ilObjExercise.php.
ilObjExercise::setInstruction | ( | $a_instruction | ) |
Definition at line 84 of file class.ilObjExercise.php.
Referenced by read().
ilObjExercise::setTimestamp | ( | $a_timestamp | ) |
Definition at line 80 of file class.ilObjExercise.php.
Referenced by read().
ilObjExercise::update | ( | ) |
update object in db
public
Reimplemented from ilObject.
Definition at line 308 of file class.ilObjExercise.php.
References $res, ilObject\getId(), getInstruction(), and getTimestamp().
ilObjExercise::$day |
Definition at line 48 of file class.ilObjExercise.php.
ilObjExercise::$file_obj |
Definition at line 41 of file class.ilObjExercise.php.
ilObjExercise::$files |
Definition at line 43 of file class.ilObjExercise.php.
Referenced by getFiles(), and send().
ilObjExercise::$hour |
Definition at line 46 of file class.ilObjExercise.php.
ilObjExercise::$instruction |
Definition at line 51 of file class.ilObjExercise.php.
Referenced by getInstruction().
ilObjExercise::$members_obj |
Definition at line 42 of file class.ilObjExercise.php.
ilObjExercise::$minutes |
Definition at line 47 of file class.ilObjExercise.php.
ilObjExercise::$month |
Definition at line 49 of file class.ilObjExercise.php.
ilObjExercise::$timestamp |
Definition at line 45 of file class.ilObjExercise.php.
Referenced by getTimestamp().
ilObjExercise::$year |
Definition at line 50 of file class.ilObjExercise.php.