ILIAS
release_5-3 Revision v5.3.23-19-g915713cf615
|
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 ($a_tutor=null) | |
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 | |
$user | |
$db | |
$lng | |
$ctrl | |
$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 39 of file class.ilExSubmission.php.
References $DIC, $ilUser, $user_id, ilExAssignmentTeam\getInstanceByUserId(), ilExAssignment\hasTeam(), and user().
ilExSubmission::addResourceObject | ( | $a_wsp_id, | |
$a_text = null |
|||
) |
Add personal resource to assigment.
int | $a_wsp_id | |
string | $a_text |
Definition at line 1045 of file class.ilExSubmission.php.
References $db, $ilDB, $query, isLate(), and ilUtil\now().
Referenced by ilObjPortfolioGUI\linkPortfolioToAssignment(), and updateTextSubmission().
ilExSubmission::canAddFile | ( | ) |
Definition at line 232 of file class.ilExSubmission.php.
References canSubmit(), getAssignment(), and getFiles().
Referenced by uploadFile().
ilExSubmission::canSubmit | ( | ) |
Definition at line 164 of file class.ilExSubmission.php.
References isOwner().
Referenced by canAddFile(), canView(), ilExSubmissionTextGUI\getOverviewContent(), ilExSubmissionFileGUI\getOverviewContent(), ilExSubmissionObjectGUI\getOverviewContentBlog(), and ilExSubmissionObjectGUI\getOverviewContentPortfolio().
ilExSubmission::canView | ( | ) |
Definition at line 171 of file class.ilExSubmission.php.
References $ilUser, $user, canSubmit(), isInTeam(), and isTutor().
Referenced by ilExSubmissionGUI\getOverviewContent().
ilExSubmission::deleteAllFiles | ( | ) |
Definition at line 527 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 1073 of file class.ilExSubmission.php.
Referenced by ilExSubmissionObjectGUI\getOverviewContentBlog(), ilExSubmissionObjectGUI\getOverviewContentPortfolio(), and ilExSubmissionObjectGUI\unlinkPortfolioObject().
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 544 of file class.ilExSubmission.php.
References $db, $filename, $ilDB, $key, $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 596 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 855 of file class.ilExSubmission.php.
References $DIC, $file, $id, $lng, $user, 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 631 of file class.ilExSubmission.php.
References $file, $files, $ilUser, $lng, $user, ilObjUser\_lookupName(), ilObject\_lookupTitle(), array, downloadMultipleFiles(), downloadSingleFile(), getFiles(), getLastDownloadTime(), getUserId(), getUserIds(), ilExAssignment\TYPE_BLOG, ilExAssignment\TYPE_PORTFOLIO, and updateTutorDownloadTime().
|
protected |
Definition at line 760 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 752 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 510 of file class.ilExSubmission.php.
References $DIC, $ilDB, $res, $row, and array.
Referenced by ilPortfolioExerciseGUI\checkExercise(), and ilBlogExerciseGUI\checkExercise().
|
static |
Definition at line 374 of file class.ilExSubmission.php.
References $DIC, $ilDB, $path, $query, $res, $row, and array.
Referenced by ilExAssignmentListTextTableGUI\parse(), and ilExAssignment\recalculateLateSubmissions().
ilExSubmission::getAssignment | ( | ) |
Definition at line 89 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 1125 of file class.ilExSubmission.php.
References $ctrl, $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 142 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 $db, $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 617 of file class.ilExSubmission.php.
References $db, $ilDB, $ilUser, $user, and getAssignment().
Referenced by downloadFiles().
ilExSubmission::getLastSubmission | ( | ) |
Get the date of the last submission of a user for the assignment.
Definition at line 1017 of file class.ilExSubmission.php.
References $db, $ilDB, and ilUtil\getMySQLTimestamp().
Referenced by getDownloadedFilesInfoForTableGUIS(), and ilExSubmissionTeamGUI\getOverviewContent().
ilExSubmission::getPeerReview | ( | ) |
Definition at line 105 of file class.ilExSubmission.php.
References $peer_review.
Referenced by ilExPeerReviewGUI\getOverviewContent().
ilExSubmission::getSelectedObject | ( | ) |
Definition at line 156 of file class.ilExSubmission.php.
References $files, and getFiles().
Referenced by ilBlogExerciseGUI\getExerciseInfo(), ilExSubmissionObjectGUI\getOverviewContentBlog(), and ilExSubmissionObjectGUI\getOverviewContentPortfolio().
ilExSubmission::getSubmissionType | ( | ) |
Definition at line 69 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 97 of file class.ilExSubmission.php.
References $team.
Referenced by ilExSubmissionTeamGUI\getOverviewContent().
ilExSubmission::getUserId | ( | ) |
Definition at line 126 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 131 of file class.ilExSubmission.php.
References array, and hasNoTeamYet().
Referenced by deleteSelectedFiles(), downloadFiles(), getFiles(), isInTeam(), lookupNewFiles(), updateTutorDownloadTime(), and validatePeerReviews().
|
static |
Definition at line 360 of file class.ilExSubmission.php.
References $DIC, $ilDB, $query, and $res.
Referenced by ilExerciseManagementGUI\membersObject().
ilExSubmission::hasNoTeamYet | ( | ) |
Definition at line 200 of file class.ilExSubmission.php.
Referenced by ilExSubmissionFileGUI\getOverviewContent(), and getUserIds().
ilExSubmission::hasPeerReviewAccess | ( | ) |
Definition at line 226 of file class.ilExSubmission.php.
ilExSubmission::hasSubmitted | ( | ) |
Definition at line 151 of file class.ilExSubmission.php.
References getFiles().
Referenced by ilExSubmissionTeamGUI\getOverviewContent(), ilExSubmissionObjectGUI\getOverviewContentBlog(), and ilExSubmissionObjectGUI\getOverviewContentPortfolio().
|
protected |
Definition at line 258 of file class.ilExSubmission.php.
Referenced by deleteSelectedFiles(), downloadMultipleFiles(), downloadSingleFile(), getFiles(), and uploadFile().
ilExSubmission::isInTeam | ( | $a_user_id = null | ) |
Definition at line 209 of file class.ilExSubmission.php.
References $ilUser, $user, and getUserIds().
Referenced by canView().
|
protected |
Definition at line 252 of file class.ilExSubmission.php.
References getUserId(), and time.
Referenced by addResourceObject(), and updateTextSubmission().
ilExSubmission::isOwner | ( | ) |
Definition at line 219 of file class.ilExSubmission.php.
References $ilUser, $user, and getUserId().
Referenced by canSubmit().
ilExSubmission::isTutor | ( | ) |
Definition at line 195 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 489 of file class.ilExSubmission.php.
References $DIC, $ilDB, and $row.
Referenced by ilObjMediaObject\getParentObjectIdForUsage().
ilExSubmission::lookupNewFiles | ( | $a_tutor = null | ) |
Check how much files have been uploaded by the learner after the last download of the tutor.
tutor | integer |
Definition at line 455 of file class.ilExSubmission.php.
References $db, $ilDB, $ilUser, $user, 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 310 of file class.ilExSubmission.php.
References $filename, $key, $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 1090 of file class.ilExSubmission.php.
References $db, $files, $id, $ilDB, addResourceObject(), deleteAllFiles(), getFiles(), isLate(), and ilUtil\now().
ilExSubmission::updateTutorDownloadTime | ( | ) |
Definition at line 727 of file class.ilExSubmission.php.
References $db, $ilDB, $ilUser, $user, $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 267 of file class.ilExSubmission.php.
References $db, $ilDB, $query, canAddFile(), getUserId(), ilFileUtils\getValidFilename(), initStorage(), ilUtil\now(), and ilExAssignmentTeam\TEAM_LOG_ADD_FILE.
Referenced by processUploadedZipFile().
ilExSubmission::validatePeerReviews | ( | ) |
Definition at line 110 of file class.ilExSubmission.php.
References $res, $user_id, $valid, array, and getUserIds().
|
protected |
Definition at line 32 of file class.ilExSubmission.php.
Referenced by getAssignment().
|
protected |
Definition at line 30 of file class.ilExSubmission.php.
Referenced by getDownloadedFilesInfoForTableGUIS().
|
protected |
Definition at line 20 of file class.ilExSubmission.php.
Referenced by addResourceObject(), deleteResourceObject(), deleteSelectedFiles(), getFiles(), getLastDownloadTime(), getLastSubmission(), lookupNewFiles(), updateTextSubmission(), updateTutorDownloadTime(), and uploadFile().
|
protected |
Definition at line 36 of file class.ilExSubmission.php.
Referenced by isTutor().
|
protected |
Definition at line 25 of file class.ilExSubmission.php.
Referenced by downloadAllAssignmentFiles(), downloadFiles(), downloadMultipleFiles(), getDownloadedFilesInfoForTableGUIS(), and processUploadedZipFile().
|
protected |
Definition at line 35 of file class.ilExSubmission.php.
Referenced by getPeerReview().
|
protected |
Definition at line 37 of file class.ilExSubmission.php.
|
protected |
Definition at line 34 of file class.ilExSubmission.php.
Referenced by deleteUser(), and getTeam().
|
protected |
Definition at line 15 of file class.ilExSubmission.php.
Referenced by canView(), downloadAllAssignmentFiles(), downloadFiles(), getLastDownloadTime(), isInTeam(), isOwner(), lookupNewFiles(), and updateTutorDownloadTime().
|
protected |
Definition at line 33 of file class.ilExSubmission.php.
Referenced by __construct(), downloadMultipleFiles(), getUserId(), updateTutorDownloadTime(), and validatePeerReviews().