Class ilExSubmissionGUI.
More...
◆ __construct()
Constructor.
- Parameters
-
- Returns
- object
Definition at line 31 of file class.ilExSubmissionGUI.php.
References $ilCtrl, $ilUser, $lng, $tpl, and time.
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;
Add data(end) time
Method that wraps PHPs time in order to allow simulations with the workflow.
◆ downloadFeedbackFileObject()
ilExSubmissionGUI::downloadFeedbackFileObject |
( |
| ) |
|
Download feedback file.
Definition at line 183 of file class.ilExSubmissionGUI.php.
References $file, $files, $ilUser, ilUtil\deliverFile(), exit, and ilUtil\sendFailure().
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);
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.
if(!file_exists("$old.txt")) if($old===$new) if(file_exists("$new.txt")) $file
◆ downloadFileObject()
ilExSubmissionGUI::downloadFileObject |
( |
| ) |
|
Download assignment file.
Definition at line 250 of file class.ilExSubmissionGUI.php.
References $file, $files, ilUtil\deliverFile(), exit, and ilUtil\sendFailure().
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";
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.
if(!file_exists("$old.txt")) if($old===$new) if(file_exists("$new.txt")) $file
◆ downloadGlobalFeedbackFileObject()
ilExSubmissionGUI::downloadGlobalFeedbackFileObject |
( |
| ) |
|
Definition at line 225 of file class.ilExSubmissionGUI.php.
References $file, $ilCtrl, ilUtil\deliverFile(), and ilExAssignment\FEEDBACK_DATE_DEADLINE.
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();
static deliverFile($a_file, $a_filename, $a_mime='', $isInline=false, $removeAfterDelivery=false, $a_exit_after=true)
deliver file for download via browser.
const FEEDBACK_DATE_DEADLINE
if(!file_exists("$old.txt")) if($old===$new) if(file_exists("$new.txt")) $file
◆ executeCommand()
ilExSubmissionGUI::executeCommand |
( |
| ) |
|
Definition at line 65 of file class.ilExSubmissionGUI.php.
References $cmd, and $ilCtrl.
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"}();
Object-based submissions (ends up as static file)
Object-based submissions (ends up as static file)
◆ getOverviewContent()
Definition at line 123 of file class.ilExSubmissionGUI.php.
References $ilCtrl, ilExSubmission\canView(), ilExSubmission\getAssignment(), ilExSubmissionTeamGUI\getOverviewContent(), and ilExSubmission\getSubmissionType().
Referenced by ilExAssignmentGUI\addSubmission().
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",
"");
static getOverviewContent(ilInfoScreenGUI $a_info, ilExSubmission $a_submission)
◆ listPublicSubmissionsObject()
ilExSubmissionGUI::listPublicSubmissionsObject |
( |
| ) |
|
List all submissions.
Definition at line 152 of file class.ilExSubmissionGUI.php.
References $ilCtrl, $lng, $tab, $tbl, returnToParentObject(), and ilExAssignment\TYPE_TEXT.
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());
◆ returnToParentObject()
ilExSubmissionGUI::returnToParentObject |
( |
| ) |
|
◆ $assignment
ilExSubmissionGUI::$assignment |
|
protected |
◆ $exercise
ilExSubmissionGUI::$exercise |
|
protected |
◆ $submission
ilExSubmissionGUI::$submission |
|
protected |
The documentation for this class was generated from the following file: