29     protected \ILIAS\Exercise\Submission\SubmissionManager 
$sub_manager;
    40         $this->
user = $DIC->user();
    41         $this->
help = $DIC[
"ilHelp"];
    42         $this->sub_manager = $DIC->exercise()->internal()->domain()->submission(
    51         if (!$this->assignment ||
    53             !$this->submission->canView()) {
    58         $cmd = $ilCtrl->getCmd(
"showassignmenttext");
    62                 $this->{$cmd . 
"Object"}();
    73         $lng = $DIC->language();
    74         $ilCtrl = $DIC->ctrl();
    75         $gui = $DIC->exercise()->internal()->gui();
    79                 $lng->
txt(
"exc_text_assignment_edit"),
    80                 $ilCtrl->getLinkTargetByClass(array(ilAssignmentPresentationGUI::class, 
"ilExSubmissionGUI", 
"ilExSubmissionTextGUI"), 
"editAssignmentText")
    84                 $lng->
txt(
"exc_text_assignment_show"),
    85                 $ilCtrl->getLinkTargetByClass(array(ilAssignmentPresentationGUI::class, 
"ilExSubmissionGUI", 
"ilExSubmissionTextGUI"), 
"showAssignmentText")
    88         $files_str = $link->render();
    99         bool $a_read_only = 
false   105         $form->setTitle($this->
lng->txt(
"exc_assignment") . 
" \"" . $this->assignment->getTitle() . 
"\"");
   110                 $this->mandatory_manager->isMandatoryForUser($this->submission->getAssignment()->getId(), $this->
user->getId())
   113             $text->setMaxNumOfChars($this->assignment->getMaxCharLimit());
   114             $text->setMinNumOfChars($this->assignment->getMinCharLimit());
   116             if (
$text->isCharLimited()) {
   118                 if ($this->assignment->getMinCharLimit() !== 0) {
   119                     $char_msg .= 
$lng->
txt(
"exc_min_char_limit") . 
": " . $this->assignment->getMinCharLimit();
   121                 if ($this->assignment->getMaxCharLimit() !== 0) {
   122                     $char_msg .= 
" " . 
$lng->
txt(
"exc_max_char_limit") . 
": " . $this->assignment->getMaxCharLimit();
   124                 $text->setInfo($char_msg);
   127             $form->addItem(
$text);
   130                 $text->setUseRte(
true);
   131                 $text->setRteTagSet(
"mini");
   134             $form->setFormAction($ilCtrl->getFormAction($this, 
"updateAssignmentText"));
   135             $form->addCommandButton(
"updateAssignmentTextAndReturn", $this->
lng->txt(
"save_return"));
   136             $form->addCommandButton(
"updateAssignmentText", $this->
lng->txt(
"save"));
   137             $form->addCommandButton(
"returnToParent", $this->
lng->txt(
"cancel"));
   139             $form->setFormAction($ilCtrl->getFormAction($this, 
"returnToParent"));
   141             $form->addItem(
$text);
   152         if (!$this->submission->canSubmit()) {
   153             $this->tpl->setOnScreenMessage(
'failure', $this->
lng->txt(
"exercise_time_over"), 
true);
   154             $ilCtrl->
redirect($this, 
"returnToParent");
   163         $ilHelp->setScreenId(
"text_submission");
   165         if ($a_form === null) {
   168             $sub = $this->sub_manager->getSubmissionsOfUser($this->submission->getUserId())->current();
   170                 if (trim($sub->getText()) !== 
'' && trim($sub->getText()) !== 
'0') {
   171                     $text = $a_form->getItemByPostVar(
"atxt");
   178         $this->tpl->setContent($a_form->getHTML());
   191         bool $a_return = 
false   195         if (!$this->submission->canSubmit()) {
   196             $this->tpl->setOnScreenMessage(
'failure', $this->
lng->txt(
"exercise_time_over"), 
true);
   197             $ilCtrl->
redirect($this, 
"returnToParent");
   204         $rte = $form->getItemByPostVar(
"atxt");
   207         if ($form->checkInput()) {
   208             $text = trim($form->getInput(
"atxt"));
   210             $returned_id = $this->submission->updateTextSubmission(
   222                 foreach ($mobs as $mob) {
   232             $this->tpl->setOnScreenMessage(
'success', $this->
lng->txt(
"exc_text_saved"), 
true);
   234                 $ilCtrl->redirect($this, 
"returnToParent");
   236                 $ilCtrl->redirect($this, 
"editAssignmentText");
   240         $form->setValuesByPost();
   246         if (!$this->submission->isTutor()) {
   252         $sub = $this->sub_manager->getSubmissionsOfUser($this->submission->getUserId())->current();
   254             if (trim($sub->getText()) !== 
'' && trim($sub->getText()) !== 
'0') {
   255                 if ($sub->getLate() &&
   256                     !$this->submission->hasPeerReviewAccess()) {
   257                     $this->tpl->setOnScreenMessage(
'failure', $this->
lng->txt(
"exc_late_submission"));
   260                 $text = $a_form->getItemByPostVar(
"atxt");
   265         $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)
 
ILIAS Exercise Submission SubmissionManager $sub_manager
 
getNextClass($a_gui_class=null)
 
showAssignmentTextObject()
 
setScreenIdComponent(string $a_comp)
 
__construct(ilObjExercise $a_exercise, ilExSubmission $a_submission)
 
editAssignmentTextObject(ilPropertyFormGUI $a_form=null)
 
__construct(Container $dic, ilPlugin $plugin)
 
This class represents a text area property in a property form. 
 
Exercise submission //TODO: This class has many static methods related to delivered "files"...
 
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.