19 declare(strict_types=1);
    50         ILIAS\
HTTP\Wrapper\WrapperFactory $http_wrapper,
    54         $this->
ctrl = $ilCtrl;
    56         $this->
user = $ilUser;
    57         $this->assignment_object = null;
    63         $this->permissions = null;
    67         $this->tpl->addCss(
"assets/css/ilStudyProgramme.css");
    84         $cmd = $this->
ctrl->getCmd();
    86         if ($cmd === 
"" || $cmd === null) {
    93             case "updateFromCurrentPlan":
    94             case "updateFromInput":
    95                 $cont = $this->$cmd();
    98                 throw new ilException(
"ilObjStudyProgrammeMembersGUI: Command not supported: $cmd");
   101         $this->tpl->setContent($cont);
   106         return $this->http_wrapper->query()->retrieve(
"ass_id", $this->
refinery->kindlyTo()->int());
   111         if ($this->assignment_object === null) {
   113             $this->assignment_object = $this->assignment_repository->get((
int) 
$id);
   118     protected function view(): string
   127                 "may not access individual plan of user"   130         $progress = $ass->getProgressForNode($ass->getRootId());
   132         $gui->setOnlyRelevant(
true);
   134         $tpl = 
new ilTemplate(
"tpl.individual_plan_tree_frame.html", 
false, 
false, 
"components/ILIAS/StudyProgramme");
   148                 "may not access individual plan of user"   152         $this->
ctrl->setParameter($this, 
"ass_id", $ass->getId());
   154         $frame = $this->
buildFrame(
"manage", $table->getHTML());
   155         $this->
ctrl->setParameter($this, 
"ass_id", null);
   168                 "may not access individual plan of user"   171         $msgs = $this->messages->getMessageCollection(
'msg_update_individual_plan');
   172         $this->
object->updatePlanFromRepository(
   174             $this->
user->getId(),
   178         $this->
ctrl->setParameter($this, 
"ass_id", $ass->getId());
   180         $this->
ctrl->redirect($this, 
"manage");
   185         $retrieve = $this->
refinery->kindlyTo()->dictOf($this->
refinery->kindlyTo()->string());
   187         $msgs = $this->messages->getMessageCollection(
'msg_update_individual_plan');
   188         if ($this->http_wrapper->post()->has(self::POST_VAR_DEADLINE)) {
   189             $this->
updateDeadlines($this->http_wrapper->post()->retrieve(self::POST_VAR_DEADLINE, $retrieve), $msgs);
   191         $this->
updateStatus($this->http_wrapper->post()->retrieve(self::POST_VAR_STATUS, $retrieve), $msgs);
   192         if ($this->http_wrapper->post()->has(self::POST_VAR_REQUIRED_POINTS)) {
   193             $this->
updateRequiredPoints($this->http_wrapper->post()->retrieve(self::POST_VAR_REQUIRED_POINTS, $retrieve), $msgs);
   196         if ($msgs->hasAnyMessages()) {
   197             $this->messages->showMessages($msgs);
   201         $this->
ctrl->redirect($this, 
"manage");
   207         $acting_user_id = (
int) $this->
user->getId();
   209         foreach ($progress_updates as $progress_id => $target_status) {
   211             $progress = $ass->getProgressForNode($progress_id);
   212             switch ($target_status) {
   214                     $cur_status = $progress->getStatus();
   216                         $programme->unmarkAccredited($ass->getId(), $acting_user_id, $msgs);
   219                         $programme->markRelevant($ass->getId(), $acting_user_id, $msgs);
   224                     $programme->markAccredited($ass->getId(), $acting_user_id, $msgs);
   228                     $programme->markNotRelevant($ass->getId(), $acting_user_id, $msgs);
   231                 case self::MANUAL_STATUS_NONE:
   235                     $msgs->
add(
false, 
'msg_impossible_target_status', $progress_id);
   243         $acting_user_id = (
int) $this->
user->getId();
   245         foreach ($deadlines as $progress_id => $deadline) {
   247             $progress = $ass->getProgressForNode($progress_id);
   249             if (trim($deadline) === 
'') {
   252                 $deadline = DateTimeImmutable::createFromFormat(
'Y-m-d', $deadline);
   255             $cur_deadline = $progress->getDeadline();
   256             if ($deadline != $cur_deadline) {
   257                 $programme->changeProgressDeadline($ass->getId(), $acting_user_id, $msgs, $deadline);
   265         $acting_user_id = (
int) $this->
user->getId();
   267         foreach ($required_points as $progress_id => $points) {
   268             $points = (
int) $points;
   271                 $msgs->
add(
false, 
'msg_points_must_be_positive', $progress_id);
   275             $progress = $ass->getProgressForNode($progress_id);
   276             $cur_points = $progress->getAmountOfPoints();
   278             if ($points != $cur_points) {
   279                 $programme->changeAmountOfPoints($ass->getId(), $acting_user_id, $msgs, $points);
   286         $this->tpl->setOnScreenMessage(
"success", $this->
lng->txt(
"prg_$lng_var"), 
true);
   289     protected function buildFrame(
string $tab, 
string $content): string
   299         $tpl = 
new ilTemplate(
"tpl.indivdual_plan_frame.html", 
true, 
true, 
"components/ILIAS/StudyProgramme");
   304         foreach ($tabs as $_tab) {
   306             $tpl->
setVariable(
"CLASS", $_tab === $tab ? 
"active" : 
"");
   318         $this->
ctrl->setParameter($this, 
"ass_id", $ass_id);
   319         $lnk = $this->
ctrl->getLinkTarget($this, $tab);
   320         $this->
ctrl->setParameter($this, 
"ass_id", null);
   327         $table->
addCommandButton(
"updateFromCurrentPlan", $this->
lng->txt(
"prg_update_from_current_plan"));
   333         $cl = 
"ilObjStudyProgrammeIndividualPlanGUI";
   334         $this->
ctrl->setParameterByClass($cl, 
"ass_id", $ass_id);
   335         $link = $this->
ctrl->getLinkTargetByClass($cl, 
"view");
   336         $this->
ctrl->setParameterByClass($cl, 
"ass_id", null);
 
const OP_VIEW_INDIVIDUAL_PLAN
 
__construct(ilGlobalTemplateInterface $tpl, ilCtrl $ilCtrl, ilLanguage $lng, ilObjUser $ilUser, ilPRGAssignmentDBRepository $assignment_repository, ilPRGMessagePrinter $messages, ILIAS\HTTP\Wrapper\WrapperFactory $http_wrapper, ILIAS\Refinery\Factory $refinery)
 
setParentGUI(ilObjStudyProgrammeMembersGUI $parent_gui)
 
setFormAction(string $a_form_action, bool $a_multipart=false)
 
buildFrame(string $tab, string $content)
 
ilObjStudyProgrammeMembersGUI $parent_gui
 
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
 
static _lookupFullname(int $a_user_id)
 
appendIndividualPlanActions(ilTable2GUI $table)
 
addCommandButton(string $a_cmd, string $a_text, string $a_onclick='', string $a_id="", string $a_class="")
 
Interface Observer  Contains several chained tasks and infos about them. 
 
showSuccessMessage(string $lng_var)
 
get(string $part=self::DEFAULT_BLOCK)
Renders the given block and returns the html string. 
 
static getInstanceByRefId($ref_id)
 
updateDeadlines(array $deadlines, ilPRGMessageCollection $msgs)
 
ilPRGPermissionsHelper $permissions
 
loadLanguageModule(string $a_module)
Load language module. 
 
setVariable(string $variable, $value='')
Sets the given variable to the given value. 
 
add(bool $success, string $message, string $record_identitifer)
 
getLinkTargetForSubTab(string $tab, int $ass_id)
 
const OP_EDIT_INDIVIDUAL_PLAN
 
updateStatus(array $progress_updates, ilPRGMessageCollection $msgs)
 
ILIAS HTTP Wrapper WrapperFactory $http_wrapper
 
const POST_VAR_REQUIRED_POINTS
 
ilPRGMessagePrinter $messages
 
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
 
updateRequiredPoints(array $required_points, ilPRGMessageCollection $msgs)
 
static specificDicFor(ilObjStudyProgramme $prg)
 
ilObjStudyProgrammeMembersGUI: ilStudyProgrammeRepositorySearchGUI  ilObjStudyProgrammeMembersGUI: il...
 
ilObjStudyProgramme $object
 
const STATUS_NOT_RELEVANT
 
getLinkTargetView(int $ass_id)
 
setCurrentBlock(string $part=self::DEFAULT_BLOCK)
Sets the template to the given block. 
 
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
 
static getInstanceByObjId(int $obj_id)
 
ilPRGAssignmentDBRepository $assignment_repository
 
ilGlobalTemplateInterface $tpl
 
Assignments are relations of users to a PRG; They hold progress-information for (sub-)nodes of the PR...
 
$id
plugin.php for ilComponentBuildPluginInfoObjectiveTest::testAddPlugins 
 
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
 
ilPRGAssignment $assignment_object
 
parseCurrentBlock(string $block_name=self::DEFAULT_BLOCK)
Parses the given block. 
 
Assignments are relations of users to a PRG; They hold progress-information for (sub-)nodes of the PR...
 
ILIAS Refinery Factory $refinery
 
Holds information about multi-actions, mainly in context of member-assignemnts and status changes...