39         $this->
user = $DIC->user();
    40         $this->
help = $DIC[
"ilHelp"];
    47         if (!$this->assignment ||
    49             !$this->submission->canView()) {
    54         $cmd = $ilCtrl->getCmd(
"showassignmenttext");
    58                 $this->{$cmd . 
"Object"}();
    69         $lng = $DIC->language();
    70         $ilCtrl = $DIC->ctrl();
    71         $gui = $DIC->exercise()->internal()->gui();
    75                 $lng->
txt(
"exc_text_assignment_edit"),
    76                 $ilCtrl->getLinkTargetByClass(array(ilAssignmentPresentationGUI::class, 
"ilExSubmissionGUI", 
"ilExSubmissionTextGUI"), 
"editAssignmentText")
    80                 $lng->
txt(
"exc_text_assignment_show"),
    81                 $ilCtrl->getLinkTargetByClass(array(ilAssignmentPresentationGUI::class, 
"ilExSubmissionGUI", 
"ilExSubmissionTextGUI"), 
"showAssignmentText")
    84         $files_str = $link->render();
    95         bool $a_read_only = 
false   101         $form->setTitle($this->
lng->txt(
"exc_assignment") . 
" \"" . $this->assignment->getTitle() . 
"\"");
   106                 $this->mandatory_manager->isMandatoryForUser($this->submission->getAssignment()->getId(), $this->
user->getId())
   109             $text->setMaxNumOfChars($this->assignment->getMaxCharLimit());
   110             $text->setMinNumOfChars($this->assignment->getMinCharLimit());
   112             if ($text->isCharLimited()) {
   114                 if ($this->assignment->getMinCharLimit() !== 0) {
   115                     $char_msg .= 
$lng->
txt(
"exc_min_char_limit") . 
": " . $this->assignment->getMinCharLimit();
   117                 if ($this->assignment->getMaxCharLimit() !== 0) {
   118                     $char_msg .= 
" " . 
$lng->
txt(
"exc_max_char_limit") . 
": " . $this->assignment->getMaxCharLimit();
   120                 $text->setInfo($char_msg);
   123             $form->addItem($text);
   127                 $text->setUseRte(
true);
   128                 $text->setRTESupport($this->submission->getUserId(), 
"exca~", 
"exc_ass");
   131                 $text->disableButtons(array(
   150             $form->setFormAction($ilCtrl->getFormAction($this, 
"updateAssignmentText"));
   151             $form->addCommandButton(
"updateAssignmentTextAndReturn", $this->
lng->txt(
"save_return"));
   152             $form->addCommandButton(
"updateAssignmentText", $this->
lng->txt(
"save"));
   153             $form->addCommandButton(
"returnToParent", $this->
lng->txt(
"cancel"));
   155             $form->setFormAction($ilCtrl->getFormAction($this, 
"returnToParent"));
   157             $form->addItem($text);
   168         if (!$this->submission->canSubmit()) {
   169             $this->tpl->setOnScreenMessage(
'failure', $this->
lng->txt(
"exercise_time_over"), 
true);
   170             $ilCtrl->
redirect($this, 
"returnToParent");
   179         $ilHelp->setScreenId(
"text_submission");
   181         if ($a_form === null) {
   184             $files = $this->submission->getFiles();
   186                 $files = array_shift($files);
   187                 if (trim($files[
"atext"]) !== 
'' && trim($files[
"atext"]) !== 
'0') {
   188                     $text = $a_form->getItemByPostVar(
"atxt");
   195         $this->tpl->setContent($a_form->getHTML());
   208         bool $a_return = 
false   212         if (!$this->submission->canSubmit()) {
   213             $this->tpl->setOnScreenMessage(
'failure', $this->
lng->txt(
"exercise_time_over"), 
true);
   214             $ilCtrl->
redirect($this, 
"returnToParent");
   221         $rte = $form->getItemByPostVar(
"atxt");
   224         if ($form->checkInput()) {
   225             $text = trim($form->getInput(
"atxt"));
   227             $returned_id = $this->submission->updateTextSubmission(
   239                 foreach ($mobs as $mob) {
   249             $this->tpl->setOnScreenMessage(
'success', $this->
lng->txt(
"exc_text_saved"), 
true);
   251                 $ilCtrl->redirect($this, 
"returnToParent");
   253                 $ilCtrl->redirect($this, 
"editAssignmentText");
   257         $form->setValuesByPost();
   263         if (!$this->submission->isTutor()) {
   269         $files = $this->submission->getFiles();
   271             $files = array_shift($files);
   272             if (trim($files[
"atext"]) !== 
'' && trim($files[
"atext"]) !== 
'0') {
   273                 if ($files[
"late"] &&
   274                     !$this->submission->hasPeerReviewAccess()) {
   275                     $this->tpl->setOnScreenMessage(
'failure', $this->
lng->txt(
"exc_late_submission"));
   278                 $text = $a_form->getItemByPostVar(
"atxt");
   283         $this->tpl->setContent($a_form->getHTML());
 static _replaceMediaObjectImageSrc(string $a_text, int $a_direction=0, string $nic='')
Replaces image source from mob image urls with the mob id or replaces mob id with the correct image s...
 
static _getMediaObjects(string $a_text, int $a_direction=0)
Returns all media objects found in the passed string. 
 
handleNewUpload(bool $a_no_notifications=false)
 
updateAssignmentTextObject(bool $a_return=false)
 
ILIAS Exercise InternalGUIService $gui
 
updateAssignmentTextAndReturnObject()
 
txt(string $a_topic, string $a_default_lang_fallback_mod="")
gets the text for a given topic if the topic is not in the list, the topic itself with "-" will be re...
 
static _getRichTextEditor()
Returns the identifier for the Rich Text Editor. 
 
redirect(object $a_gui_obj, string $a_cmd=null, string $a_anchor=null, bool $is_async=false)
 
Exercise submission base gui. 
 
addProperty(string $a_name, string $a_value, string $a_link="")
add a property to current section 
 
static getOverviewContent(ilInfoScreenGUI $a_info, ilExSubmission $a_submission)
 
getNextClass($a_gui_class=null)
 
showAssignmentTextObject()
 
setScreenIdComponent(string $a_comp)
 
__construct(ilObjExercise $a_exercise, ilExSubmission $a_submission)
 
editAssignmentTextObject(ilPropertyFormGUI $a_form=null)
 
This class represents a text area property in a property form. 
 
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
 
initAssignmentTextForm(bool $a_read_only=false)
 
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
 
static _getUsedHTMLTags(string $a_module="")
Returns an array of all allowed HTML tags for text editing.