4 include_once
"Modules/Exercise/classes/class.ilExSubmissionBaseGUI.php";
5 include_once
"Modules/Exercise/classes/class.ilExSubmission.php";
37 $a_user_id = $ilUser->getId();
40 $this->assignment = $a_ass;
41 $this->exercise = $a_exercise;
44 if (!$this->exercise->members_obj->isAssigned($a_user_id))
46 $this->exercise->members_obj->assignMember($a_user_id);
50 $public_submissions =
false;
51 if ($this->exercise->getShowSubmissions() &&
52 $this->exercise->getTimestamp() -
time() <= 0)
54 $public_submissions =
true;
56 $this->submission =
new ilExSubmission($a_ass, $a_user_id, null,
false, $public_submissions);
60 $this->tabs_gui = $ilTabs;
69 $class = $ilCtrl->getNextClass($this);
70 $cmd = $ilCtrl->getCmd(
"listPublicSubmissions");
74 case "ilexsubmissionteamgui":
77 $this->tabs_gui->clearTargets();
78 $this->tabs_gui->setBackTarget($this->lng->txt(
"back"),
79 $this->ctrl->getLinkTarget($this,
"returnToParent"));
81 $this->tabs_gui->addTab(
"submission", $this->lng->txt(
"exc_submission"),
82 $this->ctrl->getLinkTargetByClass(
"ilexsubmission".$this->submission->getSubmissionType().
"gui",
""));
84 include_once
"Modules/Exercise/classes/class.ilExSubmissionTeamGUI.php";
86 $ilCtrl->forwardCommand($gui);
89 case "ilexsubmissiontextgui":
90 include_once
"Modules/Exercise/classes/class.ilExSubmissionTextGUI.php";
92 $ilCtrl->forwardCommand($gui);
95 case "ilexsubmissionfilegui":
96 include_once
"Modules/Exercise/classes/class.ilExSubmissionFileGUI.php";
98 $ilCtrl->forwardCommand($gui);
101 case "ilexsubmissionobjectgui":
102 include_once
"Modules/Exercise/classes/class.ilExSubmissionObjectGUI.php";
104 $ilCtrl->forwardCommand($gui);
107 case "ilexpeerreviewgui":
108 $this->tabs_gui->clearTargets();
109 $this->tabs_gui->setBackTarget($this->lng->txt(
"back"),
110 $this->ctrl->getLinkTarget($this,
"returnToParent"));
112 include_once(
"./Modules/Exercise/classes/class.ilExPeerReviewGUI.php");
114 $this->ctrl->forwardCommand($peer_gui);
118 $this->{
$cmd.
"Object"}();
132 $ilCtrl->setParameterByClass(
"ilExSubmissionGUI",
"ass_id", $a_submission->
getAssignment()->getId());
136 include_once
"Modules/Exercise/classes/class.ilExSubmissionTeamGUI.php";
141 $class =
"ilExSubmission".$submission_type.
"GUI";
142 include_once
"Modules/Exercise/classes/class.".$class.
".php";
143 $class::getOverviewContent($a_info, $a_submission);
145 $ilCtrl->setParameterByClass(
"ilExSubmissionGUI",
"ass_id",
"");
156 if(!$this->exercise->getShowSubmissions())
161 $ilTabs->clearTargets();
162 $ilTabs->setBackTarget($lng->txt(
"back"),
163 $ilCtrl->getLinkTarget($this,
"returnToParent"));
167 include_once(
"./Modules/Exercise/classes/class.ilPublicSubmissionsTableGUI.php");
169 $this->tpl->setContent(
$tab->getHTML());
174 include_once
"Modules/Exercise/classes/class.ilExAssignmentListTextTableGUI.php";
176 $this->tpl->setContent(
$tbl->getHTML());
187 $file = $_REQUEST[
"file"];
192 $this->ctrl->redirect($this,
"view");
196 include_once(
"./Modules/Exercise/classes/class.ilFSStorageExercise.php");
198 $files = $storage->getFeedbackFiles($this->submission->getFeedbackId());
200 foreach($files as $fb_file)
202 if($fb_file ==
$file)
210 echo "FILE DOES NOT EXIST";
215 if (!$this->assignment->notStartedYet())
218 $p = $storage->getFeedbackFilePath($this->submission->getFeedbackId(),
$file);
231 if(!$this->assignment ||
232 !$this->assignment->getFeedbackFile() ||
233 ($needs_dl && !$this->assignment->afterDeadlineStrict()) ||
234 (!$needs_dl && !$this->submission->hasSubmitted()))
236 $ilCtrl->redirect($this,
"returnToParent");
240 $file = (is_file($this->assignment->getGlobalFeedbackFilePath()))
241 ? $this->assignment->getGlobalFeedbackFilePath()
242 : $this->assignment->getGlobalFeedbackFileStoragePath().$this->assignment->getFeedbackFile();
252 $file = $_REQUEST[
"file"];
257 $this->ctrl->redirect($this,
"view");
261 if (!$this->assignment->notStartedYet())
264 $files = $this->assignment->getFiles();
268 if($lfile[
"name"] ==
$file)
277 echo "FILE DOES NOT EXIST";
287 $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 deliverFile($a_file, $a_filename, $a_mime='', $isInline=false, $removeAfterDelivery=false, $a_exit_after=true)
deliver file for download via browser.
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)