ILIAS
release_5-2 Revision v5.2.25-18-g3f80b828510
|
Exercise submission. More...
Public Member Functions | |
__construct (ilExAssignment $a_ass, $a_user_id, ilExAssignmentTeam $a_team=null, $a_is_tutor=false, $a_public_submissions=false) | |
getSubmissionType () | |
getAssignment () | |
getTeam () | |
getPeerReview () | |
validatePeerReviews () | |
getUserId () | |
getUserIds () | |
getFeedbackId () | |
hasSubmitted () | |
getSelectedObject () | |
canSubmit () | |
canView () | |
isTutor () | |
hasNoTeamYet () | |
isInTeam ($a_user_id=null) | |
isOwner () | |
hasPeerReviewAccess () | |
canAddFile () | |
uploadFile ($a_http_post_files, $unzip=false) | |
Save submitted file of user. More... | |
processUploadedZipFile ($fileTmp) | |
processes errorhandling etc for uploaded archive More... | |
getFiles (array $a_file_ids=null, $a_only_valid=false, $a_min_timestamp=null) | |
lookupNewFiles () | |
Check how much files have been uploaded by the learner after the last download of the tutor. More... | |
deleteAllFiles () | |
deleteSelectedFiles (array $file_id_array) | |
Deletes already delivered files. More... | |
downloadFiles (array $a_file_ids=null, $a_only_new=false, $a_peer_review_mask_filename=false) | |
updateTutorDownloadTime () | |
getLastSubmission () | |
Get the date of the last submission of a user for the assignment. More... | |
addResourceObject ($a_wsp_id, $a_text=null) | |
Add personal resource to assigment. More... | |
deleteResourceObject ($a_returned_id) | |
Remove personal resource to assigment. More... | |
updateTextSubmission ($a_text) | |
Handle text assignment submissions. More... | |
getDownloadedFilesInfoForTableGUIS ($a_parent_obj, $a_parent_cmd=null) | |
Static Public Member Functions | |
static | hasAnySubmissions ($a_ass_id) |
static | getAllAssignmentFiles ($a_exc_id, $a_ass_id) |
static | lookupExerciseIdForReturnedId ($a_returned_id) |
Get exercise from submission id (used in ilObjMediaObject) More... | |
static | findUserFiles ($a_user_id, $a_filetitle) |
Check if given file was assigned. More... | |
static | deleteUser ($a_exc_id, $a_user_id) |
Delete all delivered files of user. More... | |
static | downloadAllAssignmentFiles (ilExAssignment $a_ass, array $members) |
Download all submitted files of an assignment (all user) More... | |
Protected Member Functions | |
isLate () | |
initStorage () | |
getLastDownloadTime (array $a_user_ids) | |
downloadSingleFile ($a_user_id, $filename, $filetitle) | |
downloadMultipleFiles ($a_filenames, $a_user_id, $a_multi_user=false) | |
Protected Attributes | |
$assignment | |
$user_id | |
$team | |
$peer_review | |
$is_tutor | |
$public_submissions | |
Exercise submission.
Definition at line 10 of file class.ilExSubmission.php.
ilExSubmission::__construct | ( | ilExAssignment | $a_ass, |
$a_user_id, | |||
ilExAssignmentTeam | $a_team = null , |
||
$a_is_tutor = false , |
|||
$a_public_submissions = false |
|||
) |
Definition at line 19 of file class.ilExSubmission.php.
References $ilUser, $user_id, ilExAssignmentTeam\getInstanceByUserId(), and ilExAssignment\hasTeam().
ilExSubmission::addResourceObject | ( | $a_wsp_id, | |
$a_text = null |
|||
) |
Add personal resource to assigment.
int | $a_wsp_id | |
string | $a_text |
Definition at line 1091 of file class.ilExSubmission.php.
References $ilDB, $query, isLate(), and ilUtil\now().
Referenced by ilObjPortfolioGUI\createPortfolioFromTemplateProcess(), and updateTextSubmission().
ilExSubmission::canAddFile | ( | ) |
Definition at line 225 of file class.ilExSubmission.php.
References canSubmit(), getAssignment(), and getFiles().
Referenced by uploadFile().
ilExSubmission::canSubmit | ( | ) |
Definition at line 151 of file class.ilExSubmission.php.
References isOwner().
Referenced by canAddFile(), canView(), ilExSubmissionFileGUI\getOverviewContent(), ilExSubmissionTextGUI\getOverviewContent(), ilExSubmissionObjectGUI\getOverviewContentBlog(), and ilExSubmissionObjectGUI\getOverviewContentPortfolio().
ilExSubmission::canView | ( | ) |
Definition at line 158 of file class.ilExSubmission.php.
References $ilUser, canSubmit(), isInTeam(), and isTutor().
Referenced by ilExSubmissionGUI\getOverviewContent().
ilExSubmission::deleteAllFiles | ( | ) |
Definition at line 522 of file class.ilExSubmission.php.
References $files, array, deleteSelectedFiles(), and getFiles().
Referenced by updateTextSubmission().
ilExSubmission::deleteResourceObject | ( | $a_returned_id | ) |
Remove personal resource to assigment.
int | $a_returned_id |
Definition at line 1118 of file class.ilExSubmission.php.
References $ilDB.
Referenced by ilExSubmissionObjectGUI\getOverviewContentBlog(), and ilExSubmissionObjectGUI\getOverviewContentPortfolio().
ilExSubmission::deleteSelectedFiles | ( | array | $file_id_array | ) |
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 541 of file class.ilExSubmission.php.
References $filename, $ilDB, $path, $result, $row, array, getUserIds(), initStorage(), and ilExAssignmentTeam\TEAM_LOG_REMOVE_FILE.
Referenced by deleteAllFiles().
|
static |
Delete all delivered files of user.
int | $a_exc_id | excercise id |
int | $a_user_id | user id |
Definition at line 598 of file class.ilExSubmission.php.
References $team, and ilExAssignment\getInstancesByExercise().
Referenced by ilExerciseMembers\deassignMember().
|
static |
Download all submitted files of an assignment (all user)
$members | array of user names, key is user id |
ilExerciseException |
Definition at line 884 of file class.ilExSubmission.php.
References $file, $lng, ilObjUser\_lookupName(), array, ilFSStorageExercise\create(), ilUtil\delDir(), ilUtil\deliverFile(), ilUtil\dirsize(), ilUtil\escapeShellArg(), ilUtil\getASCIIFilename(), ilExAssignmentTeam\getAssignmentTeamMap(), ilExAssignment\getExerciseId(), ilExAssignment\getId(), ilExAssignment\getTitle(), ilExAssignment\getType(), ilExAssignment\hasTeam(), ilUtil\ilTempnam(), ilUtil\makeDir(), ilExAssignment\TYPE_BLOG, ilExAssignment\TYPE_PORTFOLIO, and ilUtil\unzip().
Referenced by ilExerciseManagementGUI\downloadAllObject().
ilExSubmission::downloadFiles | ( | array | $a_file_ids = null , |
$a_only_new = false , |
|||
$a_peer_review_mask_filename = false |
|||
) |
Definition at line 635 of file class.ilExSubmission.php.
References $file, $files, $ilUser, $lng, ilObjUser\_lookupName(), ilObject\_lookupTitle(), array, downloadMultipleFiles(), downloadSingleFile(), getFiles(), getLastDownloadTime(), getUserId(), getUserIds(), ilExAssignment\TYPE_BLOG, ilExAssignment\TYPE_PORTFOLIO, and updateTutorDownloadTime().
|
protected |
Definition at line 775 of file class.ilExSubmission.php.
References $filename, $files, $lng, $path, $user_id, ilObjUser\_lookupName(), array, ilUtil\delDir(), ilUtil\deliverFile(), ilUtil\escapeShellArg(), exit, ilUtil\getASCIIFilename(), ilUtil\ilTempnam(), initStorage(), ilExAssignment\lookupTitle(), and ilUtil\makeDir().
Referenced by downloadFiles().
|
protected |
Definition at line 767 of file class.ilExSubmission.php.
References $filename, ilUtil\deliverFile(), and initStorage().
Referenced by downloadFiles().
|
static |
Check if given file was assigned.
Used in Blog/Portfolio
int | $a_user_id | |
string | $a_filetitle |
Definition at line 506 of file class.ilExSubmission.php.
References $ilDB, $res, $row, and array.
Referenced by ilBlogExerciseGUI\checkExercise(), and ilPortfolioExerciseGUI\checkExercise().
|
static |
Definition at line 375 of file class.ilExSubmission.php.
References $ilDB, $path, $query, $res, $row, and array.
Referenced by ilExAssignmentListTextTableGUI\parse(), and ilExAssignment\recalculateLateSubmissions().
ilExSubmission::getAssignment | ( | ) |
Definition at line 69 of file class.ilExSubmission.php.
References $assignment.
Referenced by ilExSubmissionBaseGUI\__construct(), ilExSubmissionTeamGUI\__construct(), canAddFile(), getFiles(), getLastDownloadTime(), ilExSubmissionObjectGUI\getOverviewContent(), ilExSubmissionTeamGUI\getOverviewContent(), ilExSubmissionGUI\getOverviewContent(), ilExPeerReviewGUI\getOverviewContent(), and lookupNewFiles().
ilExSubmission::getDownloadedFilesInfoForTableGUIS | ( | $a_parent_obj, | |
$a_parent_cmd = null |
|||
) |
Definition at line 1175 of file class.ilExSubmission.php.
References $file, $files, $ilCtrl, $lng, $new, $result, array, ilDatePresentation\formatDate(), getFiles(), getLastSubmission(), getUserId(), IL_CAL_DATETIME, lookupNewFiles(), ilExAssignment\TYPE_BLOG, ilExAssignment\TYPE_PORTFOLIO, ilExAssignment\TYPE_TEXT, ilExAssignment\TYPE_UPLOAD, and ilExAssignment\TYPE_UPLOAD_TEAM.
ilExSubmission::getFeedbackId | ( | ) |
Definition at line 125 of file class.ilExSubmission.php.
References getUserId().
ilExSubmission::getFiles | ( | array | $a_file_ids = null , |
$a_only_valid = false , |
|||
$a_min_timestamp = null |
|||
) |
Definition at line 397 of file class.ilExSubmission.php.
References $ilDB, $path, $result, $row, array, getAssignment(), getUserIds(), initStorage(), ilExAssignment\TYPE_UPLOAD, and ilExAssignment\TYPE_UPLOAD_TEAM.
Referenced by canAddFile(), deleteAllFiles(), ilBlogExerciseGUI\downloadExcSubFile(), downloadFiles(), getDownloadedFilesInfoForTableGUIS(), ilExPeerReviewGUI\getLateSubmissionInfo(), ilExSubmissionFileGUI\getOverviewContent(), getSelectedObject(), ilExPeerReviewGUI\getSubmissionContent(), hasSubmitted(), processUploadedZipFile(), and updateTextSubmission().
|
protected |
Definition at line 622 of file class.ilExSubmission.php.
References $ilDB, $ilUser, and getAssignment().
Referenced by downloadFiles().
ilExSubmission::getLastSubmission | ( | ) |
Get the date of the last submission of a user for the assignment.
Definition at line 1063 of file class.ilExSubmission.php.
References $ilDB, and ilUtil\getMySQLTimestamp().
Referenced by getDownloadedFilesInfoForTableGUIS(), and ilExSubmissionTeamGUI\getOverviewContent().
ilExSubmission::getPeerReview | ( | ) |
Definition at line 85 of file class.ilExSubmission.php.
References $peer_review.
Referenced by ilExPeerReviewGUI\getOverviewContent().
ilExSubmission::getSelectedObject | ( | ) |
Definition at line 142 of file class.ilExSubmission.php.
References $files, and getFiles().
Referenced by ilBlogExerciseGUI\getExerciseInfo(), ilExSubmissionObjectGUI\getOverviewContentBlog(), and ilExSubmissionObjectGUI\getOverviewContentPortfolio().
ilExSubmission::getSubmissionType | ( | ) |
Definition at line 48 of file class.ilExSubmission.php.
References ilExAssignment\TYPE_BLOG, ilExAssignment\TYPE_PORTFOLIO, ilExAssignment\TYPE_TEXT, ilExAssignment\TYPE_UPLOAD, and ilExAssignment\TYPE_UPLOAD_TEAM.
Referenced by ilExSubmissionGUI\getOverviewContent().
ilExSubmission::getTeam | ( | ) |
Definition at line 77 of file class.ilExSubmission.php.
References $team.
Referenced by ilExSubmissionTeamGUI\getOverviewContent().
ilExSubmission::getUserId | ( | ) |
Definition at line 108 of file class.ilExSubmission.php.
References $user_id.
Referenced by downloadFiles(), getDownloadedFilesInfoForTableGUIS(), getFeedbackId(), ilExPeerReviewGUI\getOverviewContent(), ilExSubmissionObjectGUI\getOverviewContentBlog(), ilExSubmissionObjectGUI\getOverviewContentPortfolio(), isLate(), isOwner(), and uploadFile().
ilExSubmission::getUserIds | ( | ) |
Definition at line 113 of file class.ilExSubmission.php.
References array, and hasNoTeamYet().
Referenced by deleteSelectedFiles(), downloadFiles(), getFiles(), isInTeam(), lookupNewFiles(), updateTutorDownloadTime(), and validatePeerReviews().
|
static |
Definition at line 363 of file class.ilExSubmission.php.
References $ilDB, $query, and $res.
Referenced by ilExerciseManagementGUI\membersObject().
ilExSubmission::hasNoTeamYet | ( | ) |
Definition at line 191 of file class.ilExSubmission.php.
Referenced by ilExSubmissionFileGUI\getOverviewContent(), and getUserIds().
ilExSubmission::hasPeerReviewAccess | ( | ) |
Definition at line 219 of file class.ilExSubmission.php.
ilExSubmission::hasSubmitted | ( | ) |
Definition at line 137 of file class.ilExSubmission.php.
References getFiles().
Referenced by ilExSubmissionTeamGUI\getOverviewContent(), ilExSubmissionObjectGUI\getOverviewContentBlog(), and ilExSubmissionObjectGUI\getOverviewContentPortfolio().
|
protected |
Definition at line 253 of file class.ilExSubmission.php.
Referenced by deleteSelectedFiles(), downloadMultipleFiles(), downloadSingleFile(), getFiles(), and uploadFile().
ilExSubmission::isInTeam | ( | $a_user_id = null | ) |
Definition at line 201 of file class.ilExSubmission.php.
References $ilUser, and getUserIds().
Referenced by canView().
|
protected |
Definition at line 247 of file class.ilExSubmission.php.
References getUserId(), and time.
Referenced by addResourceObject(), and updateTextSubmission().
ilExSubmission::isOwner | ( | ) |
Definition at line 212 of file class.ilExSubmission.php.
References $ilUser, and getUserId().
Referenced by canSubmit().
ilExSubmission::isTutor | ( | ) |
Definition at line 186 of file class.ilExSubmission.php.
References $is_tutor.
Referenced by canView().
|
static |
Get exercise from submission id (used in ilObjMediaObject)
int | $a_returned_id |
Definition at line 487 of file class.ilExSubmission.php.
Referenced by ilObjMediaObject\getParentObjectIdForUsage().
ilExSubmission::lookupNewFiles | ( | ) |
Check how much files have been uploaded by the learner after the last download of the tutor.
Definition at line 457 of file class.ilExSubmission.php.
References $ilDB, $ilUser, array, getAssignment(), and getUserIds().
Referenced by getDownloadedFilesInfoForTableGUIS().
ilExSubmission::processUploadedZipFile | ( | $fileTmp | ) |
processes errorhandling etc for uploaded archive
string | $tmpFile | path and filename to uploaded file |
Definition at line 305 of file class.ilExSubmission.php.
References $filename, $lng, $success, ilUtil\delDir(), getFiles(), ilUtil\ilTempnam(), ilUtil\makeDir(), ilFileUtils\processZipFile(), ilFileUtils\recursive_dirscan(), ilUtil\sendFailure(), uploadFile(), and ilFileUtils\utf8_encode().
ilExSubmission::updateTextSubmission | ( | $a_text | ) |
Handle text assignment submissions.
string | $a_text |
Definition at line 1135 of file class.ilExSubmission.php.
References $files, $ilDB, addResourceObject(), deleteAllFiles(), getFiles(), isLate(), and ilUtil\now().
ilExSubmission::updateTutorDownloadTime | ( | ) |
Definition at line 746 of file class.ilExSubmission.php.
References $ilDB, $ilUser, $user_id, array, getUserIds(), and ilUtil\now().
Referenced by downloadFiles().
ilExSubmission::uploadFile | ( | $a_http_post_files, | |
$unzip = false |
|||
) |
Save submitted file of user.
Definition at line 262 of file class.ilExSubmission.php.
References $ilDB, $query, canAddFile(), getUserId(), ilFileUtils\getValidFilename(), initStorage(), ilUtil\now(), and ilExAssignmentTeam\TEAM_LOG_ADD_FILE.
Referenced by processUploadedZipFile().
ilExSubmission::validatePeerReviews | ( | ) |
Definition at line 90 of file class.ilExSubmission.php.
References $res, $user_id, $valid, array, and getUserIds().
|
protected |
Definition at line 12 of file class.ilExSubmission.php.
Referenced by getAssignment().
|
protected |
Definition at line 16 of file class.ilExSubmission.php.
Referenced by isTutor().
|
protected |
Definition at line 15 of file class.ilExSubmission.php.
Referenced by getPeerReview().
|
protected |
Definition at line 17 of file class.ilExSubmission.php.
|
protected |
Definition at line 14 of file class.ilExSubmission.php.
Referenced by deleteUser(), and getTeam().
|
protected |
Definition at line 13 of file class.ilExSubmission.php.
Referenced by __construct(), downloadMultipleFiles(), getUserId(), updateTutorDownloadTime(), and validatePeerReviews().