4 include_once
"Modules/Exercise/classes/class.ilExSubmissionBaseGUI.php";
5 include_once
"Modules/Exercise/classes/class.ilExSubmission.php";
60 $this->
user = $DIC->user();
62 $ilTabs = $DIC->tabs();
63 $lng = $DIC->language();
71 $this->assignment = $a_ass;
72 $this->exercise = $a_exercise;
75 if (!$this->exercise->members_obj->isAssigned($a_user_id)) {
76 $this->exercise->members_obj->assignMember($a_user_id);
80 $public_submissions =
false;
81 if ($this->exercise->getShowSubmissions() &&
82 $this->exercise->getTimestamp() -
time() <= 0) {
83 $public_submissions =
true;
85 $this->submission =
new ilExSubmission($a_ass, $a_user_id, null,
false, $public_submissions);
89 $this->tabs_gui = $ilTabs;
98 $class =
$ilCtrl->getNextClass($this);
99 $cmd =
$ilCtrl->getCmd(
"listPublicSubmissions");
102 case "ilexsubmissionteamgui":
105 $this->tabs_gui->clearTargets();
106 $this->tabs_gui->setBackTarget(
107 $this->lng->txt(
"back"),
108 $this->ctrl->getLinkTarget($this,
"returnToParent")
111 $this->tabs_gui->addTab(
113 $this->lng->txt(
"exc_submission"),
114 $this->ctrl->getLinkTargetByClass(
"ilexsubmission" . $this->submission->getSubmissionType() .
"gui",
"")
117 include_once
"Modules/Exercise/classes/class.ilExSubmissionTeamGUI.php";
122 case "ilexsubmissiontextgui":
123 include_once
"Modules/Exercise/classes/class.ilExSubmissionTextGUI.php";
128 case "ilexsubmissionfilegui":
129 include_once
"Modules/Exercise/classes/class.ilExSubmissionFileGUI.php";
134 case "ilexsubmissionobjectgui":
135 include_once
"Modules/Exercise/classes/class.ilExSubmissionObjectGUI.php";
140 case "ilexpeerreviewgui":
141 $this->tabs_gui->clearTargets();
142 $this->tabs_gui->setBackTarget(
143 $this->lng->txt(
"back"),
144 $this->ctrl->getLinkTarget($this,
"returnToParent")
147 include_once(
"./Modules/Exercise/classes/class.ilExPeerReviewGUI.php");
149 $this->ctrl->forwardCommand($peer_gui);
153 $this->{$cmd .
"Object"}();
164 if (!$a_submission->
canView()) {
168 $ilCtrl->setParameterByClass(
"ilExSubmissionGUI",
"ass_id", $a_submission->
getAssignment()->getId());
171 include_once
"Modules/Exercise/classes/class.ilExSubmissionTeamGUI.php";
176 $class =
"ilExSubmission" . $submission_type .
"GUI";
177 include_once
"Modules/Exercise/classes/class." . $class .
".php";
178 $class::getOverviewContent($a_info, $a_submission);
180 $ilCtrl->setParameterByClass(
"ilExSubmissionGUI",
"ass_id",
"");
193 if (!$this->exercise->getShowSubmissions()) {
197 $ilTabs->clearTargets();
198 $ilTabs->setBackTarget(
200 $ilCtrl->getLinkTarget($this,
"returnToParent")
204 include_once(
"./Modules/Exercise/classes/class.ilPublicSubmissionsTableGUI.php");
206 $this->tpl->setContent(
$tab->getHTML());
209 include_once
"Modules/Exercise/classes/class.ilExAssignmentListTextTableGUI.php";
211 $this->tpl->setContent(
$tbl->getHTML());
222 $file = $_REQUEST[
"file"];
226 $this->ctrl->redirect($this,
"view");
230 include_once(
"./Modules/Exercise/classes/class.ilFSStorageExercise.php");
232 $files = $storage->getFeedbackFiles($this->submission->getFeedbackId());
234 foreach ($files as $fb_file) {
235 if ($fb_file ==
$file) {
241 echo
"FILE DOES NOT EXIST";
246 if (!$this->assignment->notStartedYet()) {
248 $p = $storage->getFeedbackFilePath($this->submission->getFeedbackId(),
$file);
261 if (!$this->assignment ||
262 !$this->assignment->getFeedbackFile() ||
263 ($needs_dl && !$this->assignment->afterDeadlineStrict()) ||
264 (!$needs_dl && !$this->submission->hasSubmitted())) {
265 $ilCtrl->redirect($this,
"returnToParent");
269 $file = (is_file($this->assignment->getGlobalFeedbackFilePath()))
270 ? $this->assignment->getGlobalFeedbackFilePath()
271 : $this->assignment->getGlobalFeedbackFileStoragePath() . $this->assignment->getFeedbackFile();
281 $file = $_REQUEST[
"file"];
285 $this->ctrl->redirect($this,
"view");
289 if (!$this->assignment->notStartedYet()) {
291 $files = $this->assignment->getFiles();
293 foreach (
$files as $lfile) {
294 if ($lfile[
"name"] ==
$file) {
301 echo
"FILE DOES NOT EXIST";
311 $this->ctrl->returnToParent($this);
downloadFileObject()
Download assignment file.
downloadFeedbackFileObject()
Download feedback file.
listPublicSubmissionsObject()
List all submissions.
__construct(ilObjExercise $a_exercise, ilExAssignment $a_ass, $a_user_id=null)
Constructor.
static sendFailure($a_info="", $a_keep=false)
Send Failure Message to Screen.
const FEEDBACK_DATE_DEADLINE
downloadGlobalFeedbackFileObject()
static getOverviewContent(ilInfoScreenGUI $a_info, ilExSubmission $a_submission)
static getOverviewContent(ilInfoScreenGUI $a_info, ilExSubmission $a_submission)
Add data(end) time
Method that wraps PHPs time in order to allow simulations with the workflow.
if(!file_exists("$old.txt")) if($old===$new) if(file_exists("$new.txt")) $file
Object-based submissions (ends up as static file)
Object-based submissions (ends up as static file)
static deliverFile( $a_file, $a_filename, $a_mime='', $isInline=false, $removeAfterDelivery=false, $a_exit_after=true)
deliver file for download via browser.