ILIAS  release_9 Revision v9.13-25-g2c18ec4c24f
ilExSubmissionObjectGUI Class Reference

Object-based submissions (ends up as static file) More...

+ Inheritance diagram for ilExSubmissionObjectGUI:
+ Collaboration diagram for ilExSubmissionObjectGUI:

Public Member Functions

 __construct (ilObjExercise $a_exercise, ilExSubmission $a_submission)
 
 executeCommand ()
 
 submitBlog (int $a_blog_id)
 Submit blog for assignment. More...
 
 submitPortfolio (int $a_portfolio_id)
 Submit portfolio for assignment. More...
 
- Public Member Functions inherited from ilExSubmissionBaseGUI
 __construct (ilObjExercise $a_exercise, ilExSubmission $a_submission)
 
 returnToParentObject ()
 

Static Public Member Functions

static getOverviewContent (ilInfoScreenGUI $a_info, ilExSubmission $a_submission)
 
static initGUIForSubmit (int $a_ass_id, int $a_user_id=null)
 
- Static Public Member Functions inherited from ilExSubmissionBaseGUI
static getOverviewContent (ilInfoScreenGUI $a_info, ilExSubmission $a_submission)
 

Protected Member Functions

 renderResourceSelection (string $a_title, string $a_info, string $a_cmd, string $a_explorer_cmd, array $a_items=null)
 
 createBlogObject ()
 
 selectBlogObject ()
 
 saveBlogObject ()
 
 setSelectedBlogObject ()
 
 renderWorkspaceExplorer (string $a_cmd)
 
 selectPortfolioObject ()
 
 initPortfolioTemplateForm (array $a_templates)
 
 createPortfolioFromAssignmentObject ()
 
 createPortfolioTemplateObject (ilPropertyFormGUI $a_form=null)
 
 setSelectedPortfolioTemplateObject ()
 
 createPortfolioObject ()
 
 setSelectedPortfolioObject ()
 
 askUnlinkPortfolioObject ()
 
 unlinkPortfolioObject ()
 
 askUnlinkBlogObject ()
 
 unlinkBlogObject ()
 
 askDirectSubmissionObject ()
 
 directSubmitObject ()
 
- Protected Member Functions inherited from ilExSubmissionBaseGUI
 handleTabs ()
 
 handleNewUpload (bool $a_no_notifications=false)
 
 handleRemovedUpload ()
 
 triggerAssignmentTool ()
 

Static Protected Member Functions

static getOverviewContentBlog (ilInfoScreenGUI $a_info, ilExSubmission $a_submission)
 
static getOverviewContentPortfolio (ilInfoScreenGUI $a_info, ilExSubmission $a_submission)
 

Protected Attributes

 $selected_wsp_obj_id
 
- Protected Attributes inherited from ilExSubmissionBaseGUI
ILIAS Exercise Notification NotificationManager $notification
 
ILIAS Exercise InternalDomainService $domain
 
ILIAS Exercise InternalGUIService $gui
 
ilCtrl $ctrl
 
ilTabsGUI $tabs_gui
 
ilLanguage $lng
 
ilGlobalTemplateInterface $tpl
 
ilObjExercise $exercise
 
ilExSubmission $submission
 
ilExAssignment $assignment
 
MandatoryAssignmentsManager $mandatory_manager
 
ContextServices $tool_context
 
ilExAssignmentTypesGUI $type_guis
 
int $requested_ref_id
 
GUIRequest $request
 

Detailed Description

Object-based submissions (ends up as static file)

Author
Jörg Lützenkirchen luetz.nosp@m.enki.nosp@m.rchen.nosp@m.@lei.nosp@m.fos.c.nosp@m.om
Alexander Killing killi.nosp@m.ng@l.nosp@m.eifos.nosp@m..de

ilExSubmissionObjectGUI:

Definition at line 29 of file class.ilExSubmissionObjectGUI.php.

Constructor & Destructor Documentation

◆ __construct()

ilExSubmissionObjectGUI::__construct ( ilObjExercise  $a_exercise,
ilExSubmission  $a_submission 
)
Exceptions
ilExcUnknownAssignmentTypeException

Definition at line 36 of file class.ilExSubmissionObjectGUI.php.

References ILIAS\MetaData\Repository\Validation\Data\__construct().

39  {
40  parent::__construct($a_exercise, $a_submission);
41  $this->selected_wsp_obj_id = $this->request->getSelectedWspObjId();
42  }
__construct(VocabulariesInterface $vocabularies)
+ Here is the call graph for this function:

Member Function Documentation

◆ askDirectSubmissionObject()

ilExSubmissionObjectGUI::askDirectSubmissionObject ( )
protected

Definition at line 685 of file class.ilExSubmissionObjectGUI.php.

References ilExSubmissionBaseGUI\$tpl, $txt, ILIAS\Repository\ctrl(), ILIAS\Repository\lng(), ilExSubmissionBaseGUI\returnToParentObject(), ilGlobalTemplateInterface\setContent(), and ilGlobalTemplateInterface\setOnScreenMessage().

685  : void
686  {
687  $tpl = $this->tpl;
688 
689  if (!$this->submission->canSubmit()) {
690  $this->tpl->setOnScreenMessage('info', $this->lng->txt("exercise_time_over"), true);
691  $this->returnToParentObject();
692  }
693 
694  $conf = new ilConfirmationGUI();
695 
696  if ($this->request->getBlogId() > 0) {
697  $this->ctrl->setParameter($this, "blog_id", $this->request->getBlogId());
698  $txt = $this->lng->txt("exc_direct_submit_blog");
699  } else {
700  $this->ctrl->setParameter($this, "prtf_id", $this->request->getPortfolioId());
701  $txt = $this->lng->txt("exc_direct_submit_portfolio");
702  }
703  $conf->setFormAction($this->ctrl->getFormAction($this, "directSubmit"));
704 
705  $conf->setHeaderText($txt);
706  $conf->setConfirm($this->lng->txt("exc_direct_submit"), "directSubmit");
707  $conf->setCancel($this->lng->txt("exc_direct_no_submit"), "returnToParent");
708 
709  $tpl->setContent($conf->getHTML());
710  }
setOnScreenMessage(string $type, string $a_txt, bool $a_keep=false)
Set a message to be displayed to the user.
ilGlobalTemplateInterface $tpl
setContent(string $a_html)
Sets content for standard template.
$txt
Definition: error.php:14
+ Here is the call graph for this function:

◆ askUnlinkBlogObject()

ilExSubmissionObjectGUI::askUnlinkBlogObject ( )
protected

Definition at line 652 of file class.ilExSubmissionObjectGUI.php.

References ilExSubmissionBaseGUI\$submission, ilExSubmissionBaseGUI\$tpl, ILIAS\Repository\ctrl(), ilUtil\getImagePath(), ilExSubmission\getSelectedObject(), ILIAS\Repository\lng(), ilWorkspaceTree\lookupObjectId(), and ilGlobalTemplateInterface\setContent().

652  : void
653  {
654  $tpl = $this->tpl;
655 
656  $conf = new ilConfirmationGUI();
657  $conf->setFormAction($this->ctrl->getFormAction($this, "unlinkBlog"));
658  $conf->setHeaderText($this->lng->txt("exc_sure_unlink_blog"));
659  $conf->setConfirm($this->lng->txt("confirm"), "unlinkBlog");
660  $conf->setCancel($this->lng->txt("cancel"), "returnToParent");
661 
662  $submission = $this->submission->getSelectedObject();
663  $wstree = new ilWorkspaceTree($this->submission->getUserId());
664  $object_id = $wstree->lookupObjectId((int) $submission["filetitle"]);
665  $port = new ilObjBlog($object_id, false);
666 
667  $conf->addItem("id[]", "", $port->getTitle(), ilUtil::getImagePath("standard/icon_blog.svg"));
668 
669  $tpl->setContent($conf->getHTML());
670  }
static getImagePath(string $img, string $module_path="", string $mode="output", bool $offline=false)
get image path (for images located in a template directory)
ilGlobalTemplateInterface $tpl
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
setContent(string $a_html)
Sets content for standard template.
Class ilObjBlog.
lookupObjectId(int $a_node_id)
Get object id for node id.
+ Here is the call graph for this function:

◆ askUnlinkPortfolioObject()

ilExSubmissionObjectGUI::askUnlinkPortfolioObject ( )
protected

Definition at line 617 of file class.ilExSubmissionObjectGUI.php.

References ilExSubmissionBaseGUI\$submission, ilExSubmissionBaseGUI\$tpl, ILIAS\Repository\ctrl(), ilUtil\getImagePath(), ilExSubmission\getSelectedObject(), ILIAS\Repository\lng(), and ilGlobalTemplateInterface\setContent().

617  : void
618  {
619  $tpl = $this->tpl;
620 
621  $conf = new ilConfirmationGUI();
622  $conf->setFormAction($this->ctrl->getFormAction($this, "unlinkPortfolio"));
623  $conf->setHeaderText($this->lng->txt("exc_sure_unlink_portfolio", "sure_unlink_portfolio"));
624  $conf->setConfirm($this->lng->txt("confirm"), "unlinkPortfolio");
625  $conf->setCancel($this->lng->txt("cancel"), "returnToParent");
626 
627  $submission = $this->submission->getSelectedObject();
628  $port = new ilObjPortfolio((int) $submission["filetitle"], false);
629 
630  $conf->addItem("id[]", "", $port->getTitle(), ilUtil::getImagePath("standard/icon_prtf.svg"));
631 
632  $tpl->setContent($conf->getHTML());
633  }
static getImagePath(string $img, string $module_path="", string $mode="output", bool $offline=false)
get image path (for images located in a template directory)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
ilGlobalTemplateInterface $tpl
setContent(string $a_html)
Sets content for standard template.
+ Here is the call graph for this function:

◆ createBlogObject()

ilExSubmissionObjectGUI::createBlogObject ( )
protected

Definition at line 311 of file class.ilExSubmissionObjectGUI.php.

References ilExSubmissionBaseGUI\handleTabs(), and renderResourceSelection().

Referenced by saveBlogObject().

311  : void
312  {
313  $this->handleTabs();
314 
316  "exc_create_blog",
317  "exc_create_blog_select_info",
318  "saveBlog",
319  "createBlog"
320  );
321  }
renderResourceSelection(string $a_title, string $a_info, string $a_cmd, string $a_explorer_cmd, array $a_items=null)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ createPortfolioFromAssignmentObject()

ilExSubmissionObjectGUI::createPortfolioFromAssignmentObject ( )
protected

Definition at line 476 of file class.ilExSubmissionObjectGUI.php.

References ilExSubmissionBaseGUI\$ctrl, $DIC, ilObject\_lookupObjectId(), createPortfolioTemplateObject(), ilObjPortfolioTemplate\getAvailablePortfolioTemplates(), ilCtrl\redirectByClass(), and ilCtrl\setParameterByClass().

476  : void
477  {
478  global $DIC;
479 
480  $ctrl = $DIC->ctrl();
481 
483 
484  //template id is stored in the DB with the ref_id.
485  $template_id = $this->assignment->getPortfolioTemplateId();
486  //get the object id to compare with a list of template objects.
487  $template_object_id = ilObject::_lookupObjectId($template_id);
488 
489  // select a template, if available
490  if ($templates !== [] && $template_object_id == 0) {
492  return;
493  }
494 
495  $title = $this->exercise->getTitle() . " - " . $this->assignment->getTitle();
496  $ctrl->setParameterByClass("ilObjPortfolioGUI", "exc_id", $this->exercise->getRefId());
497  $ctrl->setParameterByClass("ilObjPortfolioGUI", "ass_id", $this->assignment->getId());
498  $ctrl->setParameterByClass("ilObjPortfolioGUI", "pt", $title);
499 
500  if ($template_object_id > 0) {
501  $ctrl->setParameterByClass("ilObjPortfolioGUI", "prtt", $template_object_id);
502  }
503  $ctrl->setParameterByClass("ilobjportfoliogui", "exc_back_ref_id", $this->requested_ref_id);
504  $ctrl->redirectByClass(array("ildashboardgui", "ilPortfolioRepositoryGUI", "ilObjPortfolioGUI"), "createPortfolioFromAssignment");
505  }
redirectByClass( $a_class, string $a_cmd=null, string $a_anchor=null, bool $is_async=false)
setParameterByClass(string $a_class, string $a_parameter, $a_value)
createPortfolioTemplateObject(ilPropertyFormGUI $a_form=null)
static getAvailablePortfolioTemplates(string $a_permission="read")
global $DIC
Definition: feed.php:28
static _lookupObjectId(int $ref_id)
+ Here is the call graph for this function:

◆ createPortfolioObject()

ilExSubmissionObjectGUI::createPortfolioObject ( )
protected
Exceptions
ilExcUnknownAssignmentTypeException
ilExerciseException

Definition at line 569 of file class.ilExSubmissionObjectGUI.php.

References ILIAS\Repository\ctrl(), ilExSubmissionBaseGUI\handleRemovedUpload(), ILIAS\Repository\lng(), and ilExSubmissionBaseGUI\returnToParentObject().

Referenced by setSelectedPortfolioTemplateObject().

569  : void
570  {
571  if (!$this->submission->canSubmit()) {
572  $this->tpl->setOnScreenMessage('info', $this->lng->txt("exercise_time_over"), true);
573  $this->returnToParentObject();
574  }
575 
576  $portfolio = new ilObjPortfolio();
577  $portfolio->setTitle($this->exercise->getTitle() . " - " . $this->assignment->getTitle());
578  $portfolio->create();
579 
580  $this->submission->deleteAllFiles();
581  $this->handleRemovedUpload();
582 
583  $this->submission->addResourceObject($portfolio->getId());
584 
585  $this->tpl->setOnScreenMessage('success', $this->lng->txt("exc_portfolio_created"), true);
586  $this->ctrl->setParameterByClass(ilObjPortfolioGUI::class, "prt_id", $portfolio->getId());
587  $this->ctrl->redirectByClass(array("ildashboardgui", "ilPortfolioRepositoryGUI", "ilObjPortfolioGUI"), "view");
588  }
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ createPortfolioTemplateObject()

ilExSubmissionObjectGUI::createPortfolioTemplateObject ( ilPropertyFormGUI  $a_form = null)
protected

Definition at line 507 of file class.ilExSubmissionObjectGUI.php.

References ilObjPortfolioTemplate\getAvailablePortfolioTemplates(), initPortfolioTemplateForm(), ILIAS\Repository\lng(), and ilExSubmissionBaseGUI\returnToParentObject().

Referenced by createPortfolioFromAssignmentObject(), and setSelectedPortfolioTemplateObject().

509  : void {
510  if (!$this->submission->canSubmit()) {
511  $this->tpl->setOnScreenMessage('info', $this->lng->txt("exercise_time_over"), true);
512  $this->returnToParentObject();
513  }
514 
516  if ($templates === []) {
517  $this->returnToParentObject();
518  }
519 
520  if ($a_form === null) {
521  $a_form = $this->initPortfolioTemplateForm($templates);
522  }
523 
524  $this->tpl->setContent($a_form->getHTML());
525  }
static getAvailablePortfolioTemplates(string $a_permission="read")
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ directSubmitObject()

ilExSubmissionObjectGUI::directSubmitObject ( )
protected
Exceptions
ilException
ilFileUtilsException

Definition at line 716 of file class.ilExSubmissionObjectGUI.php.

References ILIAS\Repository\ctrl(), ILIAS\Repository\lng(), ilExSubmissionBaseGUI\returnToParentObject(), submitBlog(), and submitPortfolio().

716  : void
717  {
718  if (!$this->submission->canSubmit()) {
719  $this->tpl->setOnScreenMessage('info', $this->lng->txt("exercise_time_over"), true);
720  $this->returnToParentObject();
721  }
722 
723  $success = false;
724 
725  // submit current version of blog
726  if ($this->request->getBlogId() > 0) {
727  $success = $this->submitBlog($this->request->getBlogId());
728  $this->ctrl->setParameter($this, "blog_id", "");
729  }
730  // submit current version of portfolio
731  elseif ($this->request->getPortfolioId() > 0) {
732  $success = $this->submitPortfolio($this->request->getPortfolioId());
733  $this->ctrl->setParameter($this, "prtf_id", "");
734  }
735 
736  if ($success) {
737  $this->tpl->setOnScreenMessage('success', $this->lng->txt("settings_saved"), true);
738  } else {
739  $this->tpl->setOnScreenMessage('failure', $this->lng->txt("msg_failed"), true);
740  }
741  $this->ctrl->redirectByClass([ilExerciseHandlerGUI::class, ilObjExerciseGUI::class, ilAssignmentPresentationGUI::class, ilExSubmissionGUI::class, ilExSubmissionObjectGUI::class], "returnToParent");
742  }
submitBlog(int $a_blog_id)
Submit blog for assignment.
submitPortfolio(int $a_portfolio_id)
Submit portfolio for assignment.
+ Here is the call graph for this function:

◆ executeCommand()

ilExSubmissionObjectGUI::executeCommand ( )

Definition at line 44 of file class.ilExSubmissionObjectGUI.php.

References ilExSubmissionBaseGUI\$ctrl, and ilExSubmissionBaseGUI\returnToParentObject().

44  : void
45  {
46  $ilCtrl = $this->ctrl;
47 
48  if (!$this->submission->canView()) {
49  $this->returnToParentObject();
50  }
51 
52  $class = $ilCtrl->getNextClass($this);
53  $cmd = $ilCtrl->getCmd();
54 
55  switch ($class) {
56  default:
57  $this->{$cmd . "Object"}();
58  break;
59  }
60  }
+ Here is the call graph for this function:

◆ getOverviewContent()

static ilExSubmissionObjectGUI::getOverviewContent ( ilInfoScreenGUI  $a_info,
ilExSubmission  $a_submission 
)
static

Definition at line 62 of file class.ilExSubmissionObjectGUI.php.

References ilExSubmission\getAssignment(), ilExAssignment\TYPE_BLOG, and ilExAssignment\TYPE_PORTFOLIO.

65  : void {
66  switch ($a_submission->getAssignment()->getType()) {
68  self::getOverviewContentBlog($a_info, $a_submission);
69  break;
70 
72  self::getOverviewContentPortfolio($a_info, $a_submission);
73  break;
74  }
75  }
+ Here is the call graph for this function:

◆ getOverviewContentBlog()

static ilExSubmissionObjectGUI::getOverviewContentBlog ( ilInfoScreenGUI  $a_info,
ilExSubmission  $a_submission 
)
staticprotected

Definition at line 77 of file class.ilExSubmissionObjectGUI.php.

References $DIC, ilExSubmissionBaseGUI\$gui, ilExSubmissionBaseGUI\$lng, ilInfoScreenGUI\addProperty(), ilExSubmission\canSubmit(), ilWorkspaceTree\createTreeForUser(), ilExSubmission\deleteResourceObject(), ilExSubmission\getSelectedObject(), ilExSubmission\getUserId(), ilExSubmission\hasSubmitted(), ILIAS\Repository\int(), and ilLanguage\txt().

80  : void {
81  global $DIC;
82 
83  $lng = $DIC->language();
84  $ilCtrl = $DIC->ctrl();
85  $gui = $DIC->exercise()->internal()->gui();
86 
87  $wsp_tree = new ilWorkspaceTree($a_submission->getUserId());
88 
89  // #12939
90  if (!$wsp_tree->getRootId()) {
91  $wsp_tree->createTreeForUser($a_submission->getUserId());
92  }
93 
94  $files_str = "";
95  $buttons_str = "";
96  $valid_blog = false;
97  $selected_blog = $a_submission->getSelectedObject();
98  if ($selected_blog) {
99  $blog_id = (int) $selected_blog["filetitle"];
100  $node = $wsp_tree->getNodeData($blog_id);
101  if ($node["title"]) {
102  // #10116
103  $ilCtrl->setParameterByClass("ilobjbloggui", "wsp_id", $blog_id);
104  $blog_link = $ilCtrl->getLinkTargetByClass(array("ildashboardgui", "ilpersonalworkspacegui", "ilobjbloggui"), "");
105  $ilCtrl->setParameterByClass("ilobjbloggui", "wsp_id", "");
106  $files_str = '<a href="' . $blog_link . '">' .
107  $node["title"] . '</a>';
108  $valid_blog = true;
109  }
110  // remove invalid resource if no upload yet (see download below)
111  elseif (substr($selected_blog["filename"], -1) == "/") {
112  // #16887
113  $a_submission->deleteResourceObject();
114  }
115  }
116  if ($a_submission->canSubmit()) {
117  if (!$valid_blog) {
118  $button = $gui->button(
119  $lng->txt("exc_create_blog"),
120  $ilCtrl->getLinkTargetByClass(array(ilAssignmentPresentationGUI::class, "ilExSubmissionGUI", "ilExSubmissionObjectGUI"), "createBlog")
121  );
122  $buttons_str .= $button->render();
123  }
124  // #10462
125  $blogs = count($wsp_tree->getObjectsFromType("blog"));
126  if ((!$valid_blog && $blogs)
127  || ($valid_blog && $blogs > 1)) {
128  $link = $gui->link(
129  $lng->txt("exc_select_blog" . ($valid_blog ? "_change" : "")),
130  $ilCtrl->getLinkTargetByClass(array(ilAssignmentPresentationGUI::class, "ilExSubmissionGUI", "ilExSubmissionObjectGUI"), "selectBlog")
131  )->emphasised();
132  $buttons_str .= " " . $link->render();
133  }
134  }
135 
136  // todo: move this to ks somehow
137  if ($buttons_str != "") {
138  $files_str .= "<p>" . $buttons_str . "</p>";
139  }
140 
141 
142  if ($files_str) {
143  $a_info->addProperty($lng->txt("exc_blog_returned"), $files_str);
144  }
145  if ($a_submission->hasSubmitted()) {
146  $ilCtrl->setParameterByClass("ilExSubmissionFileGUI", "delivered", $selected_blog["returned_id"]);
147  $dl_link = $ilCtrl->getLinkTargetByClass(array("ilExSubmissionGUI", "ilExSubmissionFileGUI"), "download");
148  $ilCtrl->setParameterByClass("ilExSubmissionFileGUI", "delivered", "");
149 
150  $button = $gui->button(
151  $lng->txt("download"),
152  $dl_link
153  );
154 
155  $a_info->addProperty($lng->txt("exc_files_returned"), $button->render());
156  }
157  }
ILIAS Exercise InternalGUIService $gui
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...
addProperty(string $a_name, string $a_value, string $a_link="")
add a property to current section
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
global $DIC
Definition: feed.php:28
createTreeForUser(int $a_user_id)
Create personal workspace tree for user.
+ Here is the call graph for this function:

◆ getOverviewContentPortfolio()

static ilExSubmissionObjectGUI::getOverviewContentPortfolio ( ilInfoScreenGUI  $a_info,
ilExSubmission  $a_submission 
)
staticprotected

Definition at line 159 of file class.ilExSubmissionObjectGUI.php.

References $DIC, ilExSubmissionBaseGUI\$gui, ilExSubmissionBaseGUI\$lng, $ref_id, ilExSubmissionBaseGUI\$request, ilObject\_exists(), ilInfoScreenGUI\addProperty(), ilExSubmission\canSubmit(), ilExSubmission\deleteResourceObject(), ilObjPortfolio\getPortfoliosOfUser(), ilExSubmission\getSelectedObject(), ilExSubmission\getUserId(), ilExSubmission\hasSubmitted(), ILIAS\Repository\int(), and ilLanguage\txt().

159  : void
160  {
161  global $DIC;
162 
163  $back_ref_id = $DIC->http()->wrapper()->query()->retrieve(
164  "ref_id",
165  $DIC->refinery()->kindlyTo()->int()
166  ) ?? 0;
167 
168  $request = $DIC->exercise()->internal()->gui()->request();
169  $gui = $DIC->exercise()->internal()->gui();
170 
171 
172  $lng = $DIC->language();
173  $ilCtrl = $DIC->ctrl();
174 
175  $files_str = "";
176  $buttons_str = "";
177  $valid_prtf = false;
178  $selected_prtf = $a_submission->getSelectedObject();
179  if ($selected_prtf) {
180  $portfolio_id = (int) $selected_prtf["filetitle"];
181 
182  // #11746
183  if (ilObject::_exists($portfolio_id, false, "prtf")) {
184  $portfolio = new ilObjPortfolio($portfolio_id, false);
185  if ($portfolio->getTitle()) {
186  // #10116 / #12791
187  $ilCtrl->setParameterByClass("ilobjportfoliogui", "prt_id", $portfolio_id);
188 
189  $ref_id = $request->getRefId();
190  $ilCtrl->setParameterByClass("ilobjportfoliogui", "ref_id", $ref_id);
191  $ilCtrl->setParameterByClass("ilobjportfoliogui", "exc_back_ref_id", $back_ref_id);
192 
193  $prtf_link = $ilCtrl->getLinkTargetByClass(array("ildashboardgui", "ilportfoliorepositorygui", "ilobjportfoliogui"), "view");
194  $ilCtrl->setParameterByClass("ilobjportfoliogui", "prt_id", "");
195  $ilCtrl->setParameterByClass("ilobjportfoliogui", "ref_id", "");
196 
197 
198  $files_str = '<a href="' . $prtf_link .
199  '">' . $portfolio->getTitle() . '</a>';
200  $valid_prtf = true;
201  }
202  }
203  // remove invalid resource if no upload yet (see download below)
204  elseif (substr($selected_prtf["filename"], -1) == "/") {
205  // #16887
206  $a_submission->deleteResourceObject();
207  }
208  }
209  if ($a_submission->canSubmit()) {
210  if (!$valid_prtf) {
211  $button = $gui->button(
212  $lng->txt("exc_create_portfolio"),
213  $ilCtrl->getLinkTargetByClass(array(ilAssignmentPresentationGUI::class, "ilExSubmissionGUI", "ilExSubmissionObjectGUI"), "createPortfolioFromAssignment")
214  );
215 
216  $buttons_str .= $button->render();
217  }
218  // #10462
219  //selectPortfolio ( remove it? )
220  $prtfs = count(ilObjPortfolio::getPortfoliosOfUser($a_submission->getUserId()));
221  if ((!$valid_prtf && $prtfs)
222  || ($valid_prtf && $prtfs > 1)) {
223  $link = $gui->link(
224  $lng->txt("exc_select_portfolio" . ($valid_prtf ? "_change" : "")),
225  $ilCtrl->getLinkTargetByClass(array(ilAssignmentPresentationGUI::class, "ilExSubmissionGUI", "ilExSubmissionObjectGUI"), "selectPortfolio")
226  )->emphasised();
227 
228  $buttons_str .= " " . $link->render();
229  }
230  if ($valid_prtf) {
231  $link = $gui->link(
232  $lng->txt("exc_select_portfolio_unlink"),
233  $ilCtrl->getLinkTargetByClass(array(ilAssignmentPresentationGUI::class, "ilExSubmissionGUI", "ilExSubmissionObjectGUI"), "askUnlinkPortfolio")
234  )->emphasised();
235  $buttons_str .= " " . $link->render();
236  }
237  }
238  // todo: move this to ks somehow
239  if ($buttons_str != "") {
240  $files_str .= "<p>" . $buttons_str . "</p>";
241  }
242  if ($files_str) {
243  $a_info->addProperty($lng->txt("exc_portfolio_returned"), $files_str);
244  }
245  if ($a_submission->hasSubmitted()) {
246  $ilCtrl->setParameterByClass("ilExSubmissionFileGUI", "delivered", $selected_prtf["returned_id"]);
247  $dl_link = $ilCtrl->getLinkTargetByClass(array(ilAssignmentPresentationGUI::class, "ilExSubmissionGUI", "ilExSubmissionFileGUI"), "download");
248  $ilCtrl->setParameterByClass("ilExSubmissionFileGUI", "delivered", "");
249 
250  $button = $gui->button(
251  $lng->txt("download"),
252  $dl_link
253  );
254 
255  $a_info->addProperty($lng->txt("exc_files_returned"), $button->render());
256  }
257  }
ILIAS Exercise InternalGUIService $gui
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...
addProperty(string $a_name, string $a_value, string $a_link="")
add a property to current section
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
global $DIC
Definition: feed.php:28
static _exists(int $id, bool $reference=false, ?string $type=null)
checks if an object exists in object_data
$ref_id
Definition: ltiauth.php:67
static getPortfoliosOfUser(int $a_user_id)
Get portfolios of user.
+ Here is the call graph for this function:

◆ initGUIForSubmit()

static ilExSubmissionObjectGUI::initGUIForSubmit ( int  $a_ass_id,
int  $a_user_id = null 
)
static
Exceptions
ilExcUnknownAssignmentTypeException

Definition at line 844 of file class.ilExSubmissionObjectGUI.php.

References $DIC, and ilObject\_getAllReferences().

Referenced by ilBlogExerciseGUI\finalize(), and ilPortfolioExerciseGUI\finalize().

848  global $DIC;
849 
850  $ilUser = $DIC->user();
851 
852  if (!$a_user_id) {
853  $a_user_id = $ilUser->getId();
854  }
855 
856  $ass = new ilExAssignment($a_ass_id);
857  $sub = new ilExSubmission($ass, $a_user_id);
858  $exc_id = $ass->getExerciseId();
859 
860  // #11173 - ref_id is needed for notifications
861  $ref_ids = ilObject::_getAllReferences($exc_id);
862  $exc_ref_id = current($ref_ids);
863  $exc = new ilObjExercise($exc_ref_id, true);
864 
865  return new self($exc, $sub);
866  }
Exercise assignment.
static _getAllReferences(int $id)
get all reference ids for object ID
global $DIC
Definition: feed.php:28
Class ilObjExercise.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
Object-based submissions (ends up as static file)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ initPortfolioTemplateForm()

ilExSubmissionObjectGUI::initPortfolioTemplateForm ( array  $a_templates)
protected

Definition at line 454 of file class.ilExSubmissionObjectGUI.php.

References $id, ILIAS\Repository\ctrl(), ILIAS\Repository\lng(), and ilFormPropertyGUI\setRequired().

Referenced by createPortfolioTemplateObject(), and setSelectedPortfolioTemplateObject().

457  $form = new ilPropertyFormGUI();
458  $form->setTitle($this->lng->txt("exc_create_portfolio") . ": " . $this->assignment->getTitle());
459  $form->setFormAction($this->ctrl->getFormAction($this, "setSelectedPortfolioTemplate"));
460 
461  $prtt = new ilRadioGroupInputGUI($this->lng->txt("obj_prtt"), "prtt");
462  $prtt->setRequired(true);
463  $prtt->addOption(new ilRadioOption($this->lng->txt("exc_create_portfolio_no_template"), -1));
464  foreach ($a_templates as $id => $title) {
465  $prtt->addOption(new ilRadioOption('"' . $title . '"', $id));
466  }
467  $prtt->setValue(-1);
468  $form->addItem($prtt);
469 
470  $form->addCommandButton("setSelectedPortfolioTemplate", $this->lng->txt("save"));
471  $form->addCommandButton("returnToParent", $this->lng->txt("cancel"));
472 
473  return $form;
474  }
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
This class represents a property in a property form.
setRequired(bool $a_required)
$id
plugin.php for ilComponentBuildPluginInfoObjectiveTest::testAddPlugins
Definition: plugin.php:23
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ renderResourceSelection()

ilExSubmissionObjectGUI::renderResourceSelection ( string  $a_title,
string  $a_info,
string  $a_cmd,
string  $a_explorer_cmd,
array  $a_items = null 
)
protected

Definition at line 259 of file class.ilExSubmissionObjectGUI.php.

References Vendor\Package\$f, $r, ilExSubmissionBaseGUI\$tpl, ILIAS\Repository\ctrl(), ilGlobalTemplateInterface\get(), ILIAS\Repository\lng(), ilGlobalTemplateInterface\parseCurrentBlock(), renderWorkspaceExplorer(), ilExSubmissionBaseGUI\returnToParentObject(), ilGlobalTemplateInterface\setCurrentBlock(), and ilGlobalTemplateInterface\setVariable().

Referenced by createBlogObject(), selectBlogObject(), and selectPortfolioObject().

265  : void {
266  if (!$this->submission->canSubmit()) {
267  $this->tpl->setOnScreenMessage('info', $this->lng->txt("exercise_time_over"), true);
268  $this->returnToParentObject();
269  }
270 
271  $html = "";
272  $tpl = new ilTemplate("tpl.exc_select_resource.html", true, true, "Modules/Exercise");
273 
274  if (is_array($a_items)) {
275  $tpl->setCurrentBlock("item");
276  foreach ($a_items as $item_id => $item_title) {
277  $tpl->setVariable("ITEM_ID", $item_id);
278  $tpl->setVariable("ITEM_TITLE", $item_title);
280  }
281  $tpl->setVariable("FORM_ACTION", $this->ctrl->getFormAction($this));
282  $tpl->setVariable("TXT_SUBMIT", $this->lng->txt("save"));
283  $tpl->setVariable("TXT_CANCEL", $this->lng->txt("cancel"));
284  $tpl->setVariable("CMD_SUBMIT", $a_cmd);
285  $tpl->setVariable("CMD_CANCEL", "returnToParent");
286  $html = $tpl->get();
287  } elseif ($a_explorer_cmd) {
288  $html = $this->renderWorkspaceExplorer($a_explorer_cmd);
289  }
290 
291 
292  $this->tpl->setOnScreenMessage('info', $this->lng->txt($a_info));
293 
294  $title = $this->lng->txt($a_title) . ": " . $this->assignment->getTitle();
295 
296  $f = $this->gui->ui()->factory();
297  $r = $this->gui->ui()->renderer();
298  $p = $f->panel()->standard(
299  $title,
300  $f->legacy($html)
301  );
302 
303  $this->tpl->setContent($r->render($p));
304  }
get(string $part=self::DEFAULT_BLOCK)
Renders the given block and returns the html string.
setVariable(string $variable, $value='')
Sets the given variable to the given value.
ilGlobalTemplateInterface $tpl
setCurrentBlock(string $part=self::DEFAULT_BLOCK)
Sets the template to the given block.
parseCurrentBlock(string $block_name=self::DEFAULT_BLOCK)
Parses the given block.
$r
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ renderWorkspaceExplorer()

ilExSubmissionObjectGUI::renderWorkspaceExplorer ( string  $a_cmd)
protected

Definition at line 407 of file class.ilExSubmissionObjectGUI.php.

References exit, and ilTreeExplorerGUI\setTypeWhiteList().

Referenced by renderResourceSelection().

409  : string {
410  $exp2 = null;
411  switch ($a_cmd) {
412  case "selectBlog":
413  $exp2 = new ilWorkspaceExplorerGUI($this->submission->getUserId(), $this, $a_cmd, $this, "setSelectedBlog");
414  $exp2->setTypeWhiteList(array("blog", "wsrt", "wfld"));
415  $exp2->setSelectableTypes(array("blog"));
416  break;
417 
418  case "createBlog":
419  $exp2 = new ilWorkspaceExplorerGUI($this->submission->getUserId(), $this, $a_cmd, $this, "saveBlog");
420  $exp2->setTypeWhiteList(array("wsrt", "wfld"));
421  $exp2->setSelectableTypes(array("wsrt", "wfld"));
422  break;
423  }
424  if (!$exp2->handleCommand()) {
425  return $exp2->getHTML();
426  }
427  exit;
428  }
exit
Definition: login.php:29
setTypeWhiteList(array $a_val)
Set type white list.
Explorer for selecting a personal workspace item.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ saveBlogObject()

ilExSubmissionObjectGUI::saveBlogObject ( )
protected
Exceptions
ilExcUnknownAssignmentTypeException
ilExerciseException

Definition at line 339 of file class.ilExSubmissionObjectGUI.php.

References $selected_wsp_obj_id, createBlogObject(), ILIAS\Repository\ctrl(), ilExSubmissionBaseGUI\handleRemovedUpload(), ilWorkspaceTree\insertObject(), ILIAS\Repository\lng(), and ilExSubmissionBaseGUI\returnToParentObject().

339  : void
340  {
341  if (!$this->submission->canSubmit()) {
342  $this->tpl->setOnScreenMessage('info', $this->lng->txt("exercise_time_over"), true);
343  $this->returnToParentObject();
344  }
345 
346  if ($this->selected_wsp_obj_id == 0) {
347  $this->tpl->setOnScreenMessage('failure', $this->lng->txt("select_one"));
348  $this->createBlogObject();
349  return;
350  }
351 
352  $parent_node = $this->selected_wsp_obj_id;
353 
354  $blog = new ilObjBlog();
355  $blog->setTitle($this->exercise->getTitle() . " - " . $this->assignment->getTitle());
356  $blog->create();
357 
358  $tree = new ilWorkspaceTree($this->submission->getUserId()); // #15993
359 
360  $node_id = $tree->insertObject($parent_node, $blog->getId());
361 
362  $access_handler = new ilWorkspaceAccessHandler($tree);
363  $access_handler->setPermissions($parent_node, $node_id);
364 
365  $this->submission->deleteAllFiles();
366  $this->handleRemovedUpload();
367 
368  $this->submission->addResourceObject($node_id);
369 
370  $this->tpl->setOnScreenMessage('success', $this->lng->txt("exc_blog_created"), true);
371  $this->ctrl->setParameterByClass(ilObjBlogGUI::class, "wsp_id", $node_id);
372  $this->ctrl->redirectByClass(
373  [ilDashboardGUI::class, ilPersonalWorkspaceGUI::class, ilObjBlogGUI::class],
374  ""
375  );
376  }
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
Class ilObjBlog.
insertObject(int $a_parent_node_id, int $a_object_id)
Add object to tree.
+ Here is the call graph for this function:

◆ selectBlogObject()

ilExSubmissionObjectGUI::selectBlogObject ( )
protected

Definition at line 323 of file class.ilExSubmissionObjectGUI.php.

References ilExSubmissionBaseGUI\handleTabs(), and renderResourceSelection().

Referenced by setSelectedBlogObject().

323  : void
324  {
325  $this->handleTabs();
326 
328  "exc_select_blog",
329  "exc_select_blog_info",
330  "setSelectedBlog",
331  "selectBlog"
332  );
333  }
renderResourceSelection(string $a_title, string $a_info, string $a_cmd, string $a_explorer_cmd, array $a_items=null)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ selectPortfolioObject()

ilExSubmissionObjectGUI::selectPortfolioObject ( )
protected

Definition at line 435 of file class.ilExSubmissionObjectGUI.php.

References ilObjPortfolio\getPortfoliosOfUser(), ilExSubmissionBaseGUI\handleTabs(), and renderResourceSelection().

Referenced by setSelectedPortfolioObject().

435  : void
436  {
437  $this->handleTabs();
438 
439  $items = array();
440  $portfolios = ilObjPortfolio::getPortfoliosOfUser($this->submission->getUserId());
441  foreach ($portfolios as $portfolio) {
442  $items[$portfolio["id"]] = $portfolio["title"];
443  }
444 
446  "exc_select_portfolio",
447  "exc_select_portfolio_info",
448  "setSelectedPortfolio",
449  "",
450  $items
451  );
452  }
static getPortfoliosOfUser(int $a_user_id)
Get portfolios of user.
renderResourceSelection(string $a_title, string $a_info, string $a_cmd, string $a_explorer_cmd, array $a_items=null)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ setSelectedBlogObject()

ilExSubmissionObjectGUI::setSelectedBlogObject ( )
protected
Exceptions
ilExcUnknownAssignmentTypeException
ilExerciseException

Definition at line 382 of file class.ilExSubmissionObjectGUI.php.

References ILIAS\Repository\ctrl(), ilTree\getNodeData(), ilExSubmissionBaseGUI\handleRemovedUpload(), ILIAS\Repository\lng(), ilExSubmissionBaseGUI\returnToParentObject(), and selectBlogObject().

382  : void
383  {
384  if (!$this->submission->canSubmit()) {
385  $this->tpl->setOnScreenMessage('info', $this->lng->txt("exercise_time_over"), true);
386  $this->returnToParentObject();
387  }
388 
389  if ($this->selected_wsp_obj_id > 0) {
390  $tree = new ilWorkspaceTree($this->submission->getUserId());
391  $node = $tree->getNodeData($this->selected_wsp_obj_id);
392  if ($node && $node["type"] == "blog") {
393  $this->submission->deleteAllFiles();
394  $this->handleRemovedUpload();
395 
396  $this->submission->addResourceObject($node["wsp_id"]);
397 
398  $this->tpl->setOnScreenMessage('success', $this->lng->txt("exc_blog_selected"), true);
399  $this->ctrl->setParameter($this, "blog_id", $node["wsp_id"]);
400  $this->ctrl->redirect($this, "askDirectSubmission");
401  }
402  }
403 
404  $this->selectBlogObject();
405  }
getNodeData(int $a_node_id, ?int $a_tree_pk=null)
get all information of a node.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
+ Here is the call graph for this function:

◆ setSelectedPortfolioObject()

ilExSubmissionObjectGUI::setSelectedPortfolioObject ( )
protected
Exceptions
ilExcUnknownAssignmentTypeException
ilExerciseException

Definition at line 594 of file class.ilExSubmissionObjectGUI.php.

References ILIAS\Repository\ctrl(), ilExSubmissionBaseGUI\handleRemovedUpload(), ILIAS\Repository\lng(), ilExSubmissionBaseGUI\returnToParentObject(), and selectPortfolioObject().

594  : void
595  {
596  if (!$this->submission->canSubmit()) {
597  $this->tpl->setOnScreenMessage('info', $this->lng->txt("exercise_time_over"), true);
598  $this->returnToParentObject();
599  }
600 
601  $prtf_id = $this->request->getResourceObjectId();
602  if ($prtf_id > 0) {
603  $this->submission->deleteAllFiles();
604  $this->handleRemovedUpload();
605 
606  $this->submission->addResourceObject($prtf_id);
607 
608  $this->tpl->setOnScreenMessage('success', $this->lng->txt("exc_portfolio_selected"), true);
609  $this->ctrl->setParameter($this, "prtf_id", $prtf_id);
610  $this->ctrl->redirect($this, "askDirectSubmission");
611  }
612 
613  $this->tpl->setOnScreenMessage('failure', $this->lng->txt("select_one"));
614  $this->selectPortfolioObject();
615  }
+ Here is the call graph for this function:

◆ setSelectedPortfolioTemplateObject()

ilExSubmissionObjectGUI::setSelectedPortfolioTemplateObject ( )
protected
Exceptions
ilExcUnknownAssignmentTypeException
ilExerciseException

Definition at line 531 of file class.ilExSubmissionObjectGUI.php.

References createPortfolioObject(), createPortfolioTemplateObject(), ILIAS\Repository\ctrl(), ilObjPortfolioTemplate\getAvailablePortfolioTemplates(), initPortfolioTemplateForm(), ILIAS\Repository\lng(), and ilExSubmissionBaseGUI\returnToParentObject().

531  : void
532  {
533  if (!$this->submission->canSubmit()) {
534  $this->tpl->setOnScreenMessage('info', $this->lng->txt("exercise_time_over"), true);
535  $this->returnToParentObject();
536  }
537 
539  if ($templates === []) {
540  $this->ctrl->redirect($this, "returnToParent");
541  }
542 
543  $form = $this->initPortfolioTemplateForm($templates);
544  if ($form->checkInput()) {
545  $prtt = $form->getInput("prtt");
546  if ($prtt > 0 && array_key_exists($prtt, $templates)) {
547  $title = $this->exercise->getTitle() . " - " . $this->assignment->getTitle();
548  $this->ctrl->setParameterByClass("ilObjPortfolioGUI", "exc_id", $this->exercise->getRefId());
549  $this->ctrl->setParameterByClass("ilObjPortfolioGUI", "ass_id", $this->assignment->getId());
550  $this->ctrl->setParameterByClass("ilObjPortfolioGUI", "pt", $title);
551  $this->ctrl->setParameterByClass("ilObjPortfolioGUI", "prtt", $prtt);
552  $this->ctrl->setParameterByClass("ilobjportfoliogui", "exc_back_ref_id", $this->requested_ref_id);
553  $this->ctrl->redirectByClass(array("ildashboardgui", "ilPortfolioRepositoryGUI", "ilObjPortfolioGUI"), "createPortfolioFromTemplate");
554  } else {
555  // do not use template
556  $this->createPortfolioObject();
557  return;
558  }
559  }
560 
561  $form->setValuesByPost();
562  $this->createPortfolioTemplateObject($form);
563  }
createPortfolioTemplateObject(ilPropertyFormGUI $a_form=null)
static getAvailablePortfolioTemplates(string $a_permission="read")
+ Here is the call graph for this function:

◆ submitBlog()

ilExSubmissionObjectGUI::submitBlog ( int  $a_blog_id)

Submit blog for assignment.

Exceptions
ilFileUtilsException
ilException

Definition at line 749 of file class.ilExSubmissionObjectGUI.php.

References ilExSubmissionBaseGUI\handleNewUpload(), and ilObject2GUI\WORKSPACE_NODE_ID.

Referenced by directSubmitObject().

751  : bool {
752  if (!$this->submission->canSubmit()) {
753  return false;
754  }
755 
756  $blog_id = $a_blog_id;
757 
758  $blog_gui = new ilObjBlogGUI($blog_id, ilObject2GUI::WORKSPACE_NODE_ID);
759  if ($blog_gui->getObject()) {
760  $file = $blog_gui->buildExportFile();
761  $size = filesize($file);
762  if ($size) {
763  $this->submission->deleteAllFiles();
764 
765  $meta = array(
766  "name" => $blog_id . ".zip",
767  "tmp_name" => $file,
768  "size" => $size
769  );
770  $this->submission->uploadFile($meta, true);
771 
772  // print version
773  $file = $file = $blog_gui->buildExportFile(false, true);
774  $size = filesize($file);
775  if ($size) {
776  $meta = array(
777  "name" => $blog_id . "print.zip",
778  "tmp_name" => $file,
779  "size" => $size
780  );
781  $this->submission->uploadFile($meta, true);
782  }
783 
784  $this->handleNewUpload();
785  return true;
786  }
787  }
788  return false;
789  }
handleNewUpload(bool $a_no_notifications=false)
Class ilObjBlogGUI.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ submitPortfolio()

ilExSubmissionObjectGUI::submitPortfolio ( int  $a_portfolio_id)

Submit portfolio for assignment.

Exceptions
ilFileUtilsException

Definition at line 795 of file class.ilExSubmissionObjectGUI.php.

References ilExSubmissionBaseGUI\handleNewUpload().

Referenced by directSubmitObject().

797  : bool {
798  if (!$this->submission->canSubmit()) {
799  return false;
800  }
801 
802  $prtf_id = $a_portfolio_id;
803 
804  $prtf = new ilObjPortfolio($prtf_id, false);
805  if ($prtf->getTitle()) {
806  $port_gui = new ilObjPortfolioGUI($prtf_id);
807  $port_export = new PortfolioHtmlExport($port_gui);
808  $file = $port_export->exportHtml();
809 
810  $size = filesize($file);
811  if ($size) {
812  $this->submission->deleteAllFiles();
813 
814  $meta = array(
815  "name" => $prtf_id . ".zip",
816  "tmp_name" => $file,
817  "size" => $size
818  );
819  $this->submission->uploadFile($meta, true);
820 
821  // print version
822  $port_export->setPrintVersion(true);
823  $file = $port_export->exportHtml();
824  $size = filesize($file);
825  if ($size) {
826  $meta = array(
827  "name" => $prtf_id . "print.zip",
828  "tmp_name" => $file,
829  "size" => $size
830  );
831  $this->submission->uploadFile($meta, true);
832  }
833 
834  $this->handleNewUpload();
835  return true;
836  }
837  }
838  return false;
839  }
handleNewUpload(bool $a_no_notifications=false)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
Portfolio view gui class.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ unlinkBlogObject()

ilExSubmissionObjectGUI::unlinkBlogObject ( )
protected

Definition at line 672 of file class.ilExSubmissionObjectGUI.php.

References ILIAS\Repository\ctrl(), and ILIAS\Repository\lng().

672  : void
673  {
674  $this->submission->deleteResourceObject();
675 
676  $this->tpl->setOnScreenMessage('success', $this->lng->txt("exc_blog_unlinked_from_assignment"), true);
677 
678  $this->ctrl->redirect($this, "returnToParent");
679  }
+ Here is the call graph for this function:

◆ unlinkPortfolioObject()

ilExSubmissionObjectGUI::unlinkPortfolioObject ( )
protected

Definition at line 635 of file class.ilExSubmissionObjectGUI.php.

References $DIC, ILIAS\Repository\ctrl(), and ILIAS\Repository\lng().

635  : void
636  {
637  global $DIC;
638 
639  $user = $DIC->user();
640 
641  //$portfolio = $this->submission->getSelectedObject();
642  //$port_id = $portfolio["returned_id"];
643 
644  //$ilsub = new ilExSubmission($this->assignment, $user->getId());
645  $this->submission->deleteResourceObject();
646 
647  $this->tpl->setOnScreenMessage('success', $this->lng->txt("exc_portfolio_unlinked_from_assignment"), true);
648 
649  $this->ctrl->redirect($this, "returnToParent");
650  }
global $DIC
Definition: feed.php:28
+ Here is the call graph for this function:

Field Documentation

◆ $selected_wsp_obj_id

ilExSubmissionObjectGUI::$selected_wsp_obj_id
protected

Definition at line 31 of file class.ilExSubmissionObjectGUI.php.

Referenced by saveBlogObject().


The documentation for this class was generated from the following file: