18 if(!$this->assignment ||
20 !$this->submission->canView())
25 $class = $ilCtrl->getNextClass($this);
26 $cmd = $ilCtrl->getCmd(
"showassignmenttext");
31 $this->{
$cmd.
"Object"}();
43 $button->setPrimary(
true);
44 $button->setCaption(
"exc_text_assignment_edit");
45 $button->setUrl($ilCtrl->getLinkTargetByClass(
array(
"ilExSubmissionGUI",
"ilExSubmissionTextGUI"),
"editAssignmentText"));
46 $files_str = $button->render();
51 $button->setCaption(
"exc_text_assignment_show");
52 $button->setUrl($ilCtrl->getLinkTargetByClass(
array(
"ilExSubmissionGUI",
"ilExSubmissionTextGUI"),
"showAssignmentText"));
53 $files_str = $button->render();
56 $a_info->
addProperty($lng->txt(
"exc_files_returned_text"), $files_str);
68 include_once
"Services/Form/classes/class.ilPropertyFormGUI.php";
70 $form->setTitle($this->lng->txt(
"exc_assignment").
" \"".$this->assignment->getTitle().
"\"");
75 $text->setRequired((
bool)$this->submission->getAssignment()->getMandatory());
77 $form->addItem(
$text);
80 $text->setUseRte(
true);
81 $text->setRTESupport($this->submission->getUserId(),
"exca~",
"exc_ass");
101 $form->setFormAction($ilCtrl->getFormAction($this,
"updateAssignmentText"));
102 $form->addCommandButton(
"updateAssignmentTextAndReturn", $this->lng->txt(
"save_return"));
103 $form->addCommandButton(
"updateAssignmentText", $this->lng->txt(
"save"));
107 $form->setFormAction($ilCtrl->getFormAction($this,
"returnToParent"));
109 $form->addItem(
$text);
111 $form->addCommandButton(
"returnToParent", $this->lng->txt(
"cancel"));
120 if(!$this->submission->canSubmit())
123 $ilCtrl->redirect($this,
"returnToParent");
126 $deadline = max($this->assignment->getDeadline(), $this->assignment->getExtendedDeadline());
129 $deadline = $this->assignment->getPersonalDeadline($ilUser->getId());
136 if($deadline <
time())
139 $dl =
'<br /><span class="warning">'.sprintf($this->lng->txt(
"exc_late_submission_warning"), $dl).
'</span>';
149 $ilHelp->setScreenIdComponent(
"exc");
150 $ilHelp->setScreenId(
"text_submission");
156 $files = $this->submission->getFiles();
162 $text = $a_form->getItemByPostVar(
"atxt");
169 $this->tpl->setContent($a_form->getHTML());
181 if(!$this->submission->canSubmit())
184 $ilCtrl->redirect($this,
"returnToParent");
191 include_once(
"./Services/AdvancedEditing/classes/class.ilObjAdvancedEditing.php");
192 $rte = $form->getItemByPostVar(
"atxt");
195 if($form->checkInput())
197 $text = trim($form->getInput(
"atxt"));
199 $existing = $this->submission->getFiles();
201 $returned_id = $this->submission->updateTextSubmission(
212 include_once
"Services/MediaObjects/classes/class.ilObjMediaObject.php";
214 foreach(
$mobs as $mob)
231 $ilCtrl->redirect($this,
"returnToParent");
235 $ilCtrl->redirect($this,
"editAssignmentText");
239 $form->setValuesByPost();
245 if(!$this->submission->isTutor())
252 $files = $this->submission->getFiles();
259 !$this->submission->hasPeerReviewAccess())
264 $text = $a_form->getItemByPostVar(
"atxt");
270 $this->tpl->setContent($a_form->getHTML());
static _getMediaObjects($a_text, $a_direction=0)
Returns all media objects found in the passed string.
static sendSuccess($a_info="", $a_keep=false)
Send Success Message to Screen.
updateAssignmentTextAndReturnObject()
updateAssignmentTextObject($a_return=false)
Exercise submission base gui.
static _getUsedHTMLTags($a_module="")
Returns an array of all allowed HTML tags for text editing.
static getOverviewContent(ilInfoScreenGUI $a_info, ilExSubmission $a_submission)
initAssignmentTextForm($a_read_only=false)
static _replaceMediaObjectImageSrc($a_text, $a_direction=0, $nic=IL_INST_ID)
Replaces image source from mob image urls with the mob id or replaces mob id with the correct image s...
static sendInfo($a_info="", $a_keep=false)
Send Info Message to Screen.
handleNewUpload($a_no_notifications=false)
showAssignmentTextObject()
editAssignmentTextObject(ilPropertyFormGUI $a_form=null)
static formatDate(ilDateTime $date)
Format a date public.
Create styles array
The data for the language used.
static sendFailure($a_info="", $a_keep=false)
Send Failure Message to Screen.
This class represents a non editable value in a property form.
addProperty($a_name, $a_value, $a_link="")
add a property to current section
This class represents a text area property in a property form.
Add data(end) time
Method that wraps PHPs time in order to allow simulations with the workflow.
Object-based submissions (ends up as static file)