65 $ilToolbar = $DIC[
'ilToolbar'];
66 $ilLocator = $DIC[
'ilLocator'];
73 $this->ref_id = $a_ref_id;
74 $this->parent_gui = $a_parent_gui;
78 $this->ilLocator = $ilLocator;
80 $this->toolbar = $ilToolbar;
85 $this->assignment_object = null;
89 $lng->loadLanguageModule(
"prg");
91 $this->tpl->addCss(
"Modules/StudyProgramme/templates/css/ilStudyProgramme.css");
95 $cmd = $this->ctrl->getCmd();
104 case "updateFromCurrentPlan":
105 case "updateFromInput":
106 $cont = $this->
$cmd();
109 throw new ilException(
"ilObjStudyProgrammeMembersGUI: ".
110 "Command not supported: $cmd");
113 $this->tpl->setContent($cont);
117 require_once(
"Modules/StudyProgramme/classes/class.ilStudyProgrammeUserAssignment.php");
118 if (!is_numeric(
$_GET[
"ass_id"])) {
119 throw new ilException(
"Expected integer 'ass_id'");
121 return (
int)
$_GET[
"ass_id"];
125 if ($this->assignment_object === null) {
129 return $this->assignment_object;
133 require_once(
"Modules/StudyProgramme/classes/class.ilStudyProgrammeIndividualPlanProgressListGUI.php");
135 $gui->setOnlyRelevant(
true);
137 $tpl =
new ilTemplate(
"tpl.individual_plan_tree_frame.html",
false,
false,
"Modules/StudyProgramme");
138 $tpl->setVariable(
"CONTENT", $gui->getHTML());
143 require_once(
"Modules/StudyProgramme/classes/class.ilStudyProgrammeIndividualPlanTableGUI.php");
145 $this->ctrl->setParameter($this,
"ass_id", $ass->getId());
146 $this->ctrl->setParameter($this,
"cmd",
"manage");
148 $frame = $this->
buildFrame(
"manage", $table->getHTML());
149 $this->ctrl->setParameter($this,
"ass_id", null);
155 $ass->updateFromProgram();
156 $this->ctrl->setParameter($this,
"ass_id", $ass->getId());
158 $this->ctrl->redirect($this,
"manage");
162 require_once(
"Modules/StudyProgramme/classes/class.ilStudyProgrammeUserProgress.php");
172 $this->ctrl->redirect($this,
"manage");
178 foreach ($status_updates as $prgrs_id => $status) {
180 $cur_status = $prgrs->getStatus();
182 $prgrs->unmarkAccredited($this->
user->getId());
186 $prgrs->markRelevant($this->
user->getId());
190 $prgrs->markNotRelevant($this->
user->getId());
194 $prgrs->markAccredited($this->
user->getId());
210 $cur_status = $prgrs->getStatus();
215 if ($required_points < 0) {
216 $required_points = 0;
219 if ($required_points == $prgrs->getAmountOfPoints()) {
223 $prgrs->setRequiredAmountOfPoints($required_points, $this->
user->getId());
229 require_once(
"Services/Utilities/classes/class.ilUtil.php");
235 if (!array_key_exists($post_var,
$_POST)) {
236 throw new ilException(
"Expected array $post_var in POST");
243 if (!array_key_exists($post_var,
$_POST)) {
244 throw new ilException(
"Expected array $post_var in POST");
247 $post_value =
$_POST[$post_var];
248 return (
int)$post_value[$prgrs_id];
253 $tpl =
new ilTemplate(
"tpl.indivdual_plan_frame.html",
true,
true,
"Modules/StudyProgramme");
257 foreach (
array(
"view",
"manage") as $_tab) {
258 $tpl->setCurrentBlock(
"sub_tab");
259 $tpl->setVariable(
"CLASS", $_tab ==
$tab ?
"active" :
"");
261 $tpl->setVariable(
"TITLE", $this->lng->txt(
"prg_$_tab"));
262 $tpl->parseCurrentBlock();
264 $tpl->setVariable(
"CONTENT", $content);
270 $this->ctrl->setParameter($this,
"ass_id", $a_ass_id);
271 $lnk = $this->ctrl->getLinkTarget($this, $a_tab);
272 $this->ctrl->setParameter($this,
"ass_id", null);
278 $a_table->
addCommandButton(
"updateFromCurrentPlan", $this->lng->txt(
"prg_update_from_current_plan"));
291 return "required_points";
295 return self::MANUAL_STATUS_NONE;
299 return self::MANUAL_STATUS_NOT_RELEVANT;
303 return self::MANUAL_STATUS_ACCREDITED;
307 $cl =
"ilObjStudyProgrammeIndividualPlanGUI";
308 $ctrl->setParameterByClass($cl,
"ass_id", $a_ass_id);
309 $link =
$ctrl->getLinkTargetByClass($cl,
"view");
310 $ctrl->setParameterByClass($cl,
"ass_id", null);
static sendSuccess($a_info="", $a_keep=false)
Send Success Message to Screen.
addCommandButton($a_cmd, $a_text, $a_onclick='', $a_id="", $a_class=null)
Add Command button.
Base class for ILIAS Exception handling.
static _lookupFullname($a_user_id)
Lookup Full Name.
getLinkTargetForSubTab($a_tab, $a_ass_id)
const MANUAL_STATUS_NOT_RELEVANT
getRequiredPointsPostVarTitle()
__construct($a_parent_gui, $a_ref_id)
Class ilObjStudyProgrammeIndividualPlanGUI.
Class ilStudyProgrammeIndividualPlanTableGUI.
getRequiredPointsUpdates($prgrs_id)
getManualStatusNotRelevant()
static getLinkTargetView($ctrl, $a_ass_id)
special template class to simplify handling of ITX/PEAR
redirection script todo: (a better solution should control the processing via a xml file) ...
const STATUS_NOT_RELEVANT
Create styles array
The data for the language used.
getManualStatusAccredited()
setFormAction($a_form_action, $a_multipart=false)
Set Form action parameter.
showSuccessMessage($a_lng_var)
appendIndividualPlanActions(ilTable2GUI $a_table)
const MANUAL_STATUS_ACCREDITED
Class ilStudyProgrammeExpandableProgressListGUI.
static getInstance($a_id)
Get an instance.
buildFrame($tab, $content)
getManualStatusPostVarTitle()
updateRequiredPoints($prgrs_id)
static getInstanceById($a_prgrs_id)
Get an instance by progress id.