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");
84 $text->disableButtons(array(
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());
134 if($this->assignment->getDeadline() < time())
137 $dl =
'<br /><span class="warning">'.sprintf($this->lng->txt(
"exc_late_submission_warning"), $dl).
'</span>';
147 $ilHelp->setScreenIdComponent(
"exc");
148 $ilHelp->setScreenId(
"text_submission");
154 $files = $this->submission->getFiles();
157 $files = array_shift($files);
158 if(trim($files[
"atext"]))
160 $text = $a_form->getItemByPostVar(
"atxt");
167 $this->tpl->setContent($a_form->getHTML());
179 if(!$this->submission->canSubmit())
182 $ilCtrl->redirect($this,
"returnToParent");
189 include_once(
"./Services/AdvancedEditing/classes/class.ilObjAdvancedEditing.php");
190 $rte = $form->getItemByPostVar(
"atxt");
193 if($form->checkInput())
195 $text = trim($form->getInput(
"atxt"));
197 $existing = $this->submission->getFiles();
199 $returned_id = $this->submission->updateTextSubmission(
210 include_once
"Services/MediaObjects/classes/class.ilObjMediaObject.php";
212 foreach(
$mobs as $mob)
229 $ilCtrl->redirect($this,
"returnToParent");
233 $ilCtrl->redirect($this,
"editAssignmentText");
237 $form->setValuesByPost();
243 if(!$this->submission->isTutor())
250 $files = $this->submission->getFiles();
253 $files = array_shift($files);
254 if(trim($files[
"atext"]))
257 !$this->submission->hasPeerReviewAccess())
262 $text = $a_form->getItemByPostVar(
"atxt");
268 $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 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.
static sendFailure($a_info="", $a_keep=false)
Send Failure Message to Screen.
This class represents a non editable value in a property form.
& _getUsedHTMLTags($a_module="")
Returns an array of all allowed HTML tags for text editing.
addProperty($a_name, $a_value, $a_link="")
add a property to current section
This class represents a text area property in a property form.
Object-based submissions (ends up as static file)