64 $this->
user = $DIC->user();
66 $ilTabs = $DIC->tabs();
67 $lng = $DIC->language();
75 $this->assignment = $a_ass;
76 $this->exercise = $a_exercise;
77 $this->user_id = $a_user_id;
82 if (!$this->exercise->members_obj->isAssigned($a_user_id)) {
83 $this->exercise->members_obj->assignMember($a_user_id);
87 $public_submissions =
false;
88 if ($this->exercise->getShowSubmissions() &&
89 $this->exercise->getTimestamp() - time() <= 0) {
90 $public_submissions =
true;
92 $this->submission =
new ilExSubmission($a_ass, $a_user_id, null,
false, $public_submissions);
96 $this->tabs_gui = $ilTabs;
105 $class =
$ilCtrl->getNextClass($this);
106 $cmd =
$ilCtrl->getCmd(
"listPublicSubmissions");
109 case "ilexsubmissionteamgui":
112 $this->tabs_gui->clearTargets();
113 $this->tabs_gui->setBackTarget(
114 $this->lng->txt(
"back"),
115 $this->ctrl->getLinkTarget($this,
"returnToParent")
120 $this->tabs_gui->addTab(
122 $this->lng->txt(
"exc_submission"),
123 $this->ctrl->getLinkTargetByClass(
"ilexsubmission" . $this->submission->getSubmissionType() .
"gui",
"")
131 case "ilexsubmissiontextgui":
136 case "ilexsubmissionfilegui":
141 case "ilexsubmissionobjectgui":
146 case "ilexpeerreviewgui":
147 $this->tabs_gui->clearTargets();
148 $this->tabs_gui->setBackTarget(
149 $this->lng->txt(
"back"),
150 $this->ctrl->getLinkTarget($this,
"returnToParent")
154 $this->ctrl->forwardCommand($peer_gui);
161 if ($this->type_guis->isExAssTypeGUIClass($class)) {
162 $type_gui = $this->type_guis->getByClassName($class);
163 $type_gui->setSubmission($this->submission);
164 $type_gui->setExercise($this->exercise);
165 return $ilCtrl->forwardCommand($type_gui);
168 $this->{$cmd .
"Object"}();
186 if (!$a_submission->
canView()) {
190 $ilCtrl->setParameterByClass(
"ilExSubmissionGUI",
"ass_id", $a_submission->
getAssignment()->getId());
200 $class =
"ilExSubmission" . $submission_type .
"GUI";
201 $class::getOverviewContent($a_info, $a_submission);
204 $ilCtrl->getHTML($sub_gui, array(
205 "mode" => self::MODE_OVERVIEW_CONTENT,
207 "submission" => $a_submission
211 $ilCtrl->setParameterByClass(
"ilExSubmissionGUI",
"ass_id",
"");
222 switch ($par[
"mode"]) {
224 case self::MODE_OVERVIEW_CONTENT:
225 $type_gui = $this->type_guis->getById($par[
"submission"]->getAssignment()->getType());
226 return $type_gui->getOverviewContent($par[
"info"], $par[
"submission"]);
241 if (!$this->exercise->getShowSubmissions()) {
245 $ilTabs->clearTargets();
246 $ilTabs->setBackTarget(
248 $ilCtrl->getLinkTarget($this,
"returnToParent")
253 $this->tpl->setContent(
$tab->getHTML());
257 $this->tpl->setContent($tbl->getHTML());
268 $file = $_REQUEST[
"file"];
272 $this->ctrl->redirect($this,
"view");
279 foreach ($files as $fb_file) {
280 if ($fb_file == $file) {
286 echo
"FILE DOES NOT EXIST";
291 if (!$this->assignment->notStartedYet()) {
293 $p = $storage->getFeedbackFilePath($this->submission->getFeedbackId(), $file);
308 if (!$state->isGlobalFeedbackFileAccessible($this->submission)) {
309 $ilCtrl->redirect($this,
"returnToParent");
313 $file = (is_file($this->assignment->getGlobalFeedbackFilePath()))
314 ? $this->assignment->getGlobalFeedbackFilePath()
315 : $this->assignment->getGlobalFeedbackFileStoragePath() . $this->assignment->getFeedbackFile();
325 $file = $_REQUEST[
"file"];
329 $this->ctrl->redirect($this,
"view");
334 if ($state->areInstructionsVisible()) {
336 $files = $this->assignment->getFiles();
338 foreach ($files as $lfile) {
339 if ($lfile[
"name"] == $file) {
346 echo
"FILE DOES NOT EXIST";
356 $this->ctrl->returnToParent($this);
downloadFileObject()
Download assignment file.
downloadFeedbackFileObject()
Download feedback file.
static getOverviewContent(ilInfoScreenGUI $a_info, ilExSubmission $a_submission, ilObjExercise $a_exc)
listPublicSubmissionsObject()
List all submissions.
getFeedbackFiles($a_user_id)
Get number of feedback files.
static getInstance()
Get instance.
static getInstanceByIds($a_ass_id, $a_user_id=0)
Get instance by IDs (recommended for consumer code)
__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 MODE_OVERVIEW_CONTENT
downloadGlobalFeedbackFileObject()
static getOverviewContent(ilInfoScreenGUI $a_info, ilExSubmission $a_submission)
Exercise submission //TODO: This class has to much static methods related to delivered "files"...
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.