49 $this->ctrl = $DIC->ctrl();
50 $this->lng = $DIC->language();
51 $this->tpl = $DIC[
"tpl"];
52 $this->toolbar = $DIC->toolbar();
53 $this->
user = $DIC->user();
55 $lng = $DIC->language();
58 $lng->loadLanguageModule(
"skmg");
62 $this->se_id = (int)
$_GET[
"se_id"];
63 $this->sn_id = ((int)
$_POST[
"sn_id"] > 0)
65 : (
int)
$_GET[
"sn_id"];
66 $ilCtrl->setParameter($this,
"sn_id", $this->sn_id);
76 $cmd =
$ilCtrl->getCmd(
"listSelfEvaluations");
101 $ilToolbar->setFormAction(
$ilCtrl->getFormAction($this));
110 include_once(
"./Services/Skill/classes/class.ilSkillTreeNode.php");
112 foreach ($se_nodes as $n_id =>
$title) {
115 include_once(
"./Services/Form/classes/class.ilSelectInputGUI.php");
120 $ilToolbar->addInputItem(
$si,
true);
122 $ilToolbar->addFormButton(
$lng->txt(
"skmg_execute_self_evaluation"),
"startSelfEvaluation");
124 include_once(
"./Services/Skill/classes/class.ilSelfEvaluationTableGUI.php");
140 if (!is_array(
$_POST[
"id"]) || count(
$_POST[
"id"]) == 0) {
142 $ilCtrl->redirect($this,
"listSelfEvaluations");
144 include_once(
"./Services/Skill/classes/class.ilSkillSelfEvaluation.php");
145 include_once(
"./Services/Skill/classes/class.ilSkillTreeNode.php");
146 include_once(
"./Services/Utilities/classes/class.ilConfirmationGUI.php");
148 $cgui->setFormAction(
$ilCtrl->getFormAction($this));
149 $cgui->setHeaderText(
$lng->txt(
"skmg_sure_delete_self_evaluation"));
150 $cgui->setCancel(
$lng->txt(
"cancel"),
"listSelfEvaluations");
151 $cgui->setConfirm(
$lng->txt(
"delete"),
"deleteSelfEvaluation");
157 $cgui->addItem(
"id[]", $i, $se_title .
", " .
$lng->txt(
"created") .
": " .
158 $se->getCreated() .
", " .
$lng->txt(
"last_update") .
": " . $se->getLastUpdate());
161 $tpl->setContent($cgui->getHTML());
177 include_once(
"./Services/Skill/classes/class.ilSkillSelfEvaluation.php");
178 if (is_array(
$_POST[
"id"])) {
181 if ($se->getUserId() ==
$ilUser->getId()) {
187 $ilCtrl->redirect($this,
"listSelfEvaluations");
204 if ($a_mode ==
"edit") {
205 include_once(
"./Services/Skill/classes/class.ilSkillSelfEvaluation.php");
207 $this->sn_id = $se->getTopSkillId();
211 $se_tpl =
new ilTemplate(
"tpl.self_evaluation.html",
true,
true,
"Services/Skill");
212 include_once(
"./Services/Skill/classes/class.ilSkillSelfEvaluation.php");
215 $cstep = (int)
$_GET[
"step"];
216 $ilCtrl->setParameter($this,
"step", $cstep);
217 include_once(
"./Services/Skill/classes/class.ilSkillSelfEvalSkillTableGUI.php");
220 "startSelfEvaluation",
225 $se_tpl->setCurrentBlock(
"se_table");
226 $se_tpl->setVariable(
"SE_TABLE",
$table->getHTML());
227 $se_tpl->parseCurrentBlock();
229 include_once(
"./Services/UIComponent/Toolbar/classes/class.ilToolbarGUI.php");
231 if ($a_mode ==
"edit") {
233 $tb->addFormButton(
"< " .
$lng->txt(
"skmg_previous_step"),
"updateBackSelfEvaluation");
235 if ($cstep < count(
$steps) - 1) {
236 $tb->addFormButton(
$lng->txt(
"skmg_next_step") .
" >",
"updateSelfEvaluation");
237 } elseif ($cstep == count(
$steps) - 1) {
238 $tb->addFormButton(
$lng->txt(
"skmg_save_self_evaluation"),
"updateSelfEvaluation");
241 if ($cstep < count(
$steps) - 1) {
242 $tb->addFormButton(
$lng->txt(
"skmg_next_step") .
" >",
"saveSelfEvaluation");
243 } elseif ($cstep == count(
$steps) - 1) {
244 $tb->addFormButton(
$lng->txt(
"skmg_save_self_evaluation"),
"saveSelfEvaluation");
247 $se_tpl->setVariable(
"FORM_ACTION",
$ilCtrl->getFormAction($this));
248 $se_tpl->setVariable(
"TOOLBAR", $tb->getHTML());
249 $tpl->setContent($se_tpl->get());
264 include_once(
"./Services/Skill/classes/class.ilSkillSelfEvaluation.php");
267 $se->setUserId(
$ilUser->getId());
268 $se->setTopSkillId(
$_GET[
"sn_id"]);
269 if (is_array(
$_POST[
"se_sk"])) {
270 $se->setLevels(
$_POST[
"se_sk"]);
275 $cstep = (int)
$_GET[
"step"];
278 $ilCtrl->setParameter($this,
"step", 1);
279 $ilCtrl->setParameter($this,
"se_id", $se->getId());
280 $ilCtrl->redirect($this,
"editSelfEvaluation");
323 include_once(
"./Services/Skill/classes/class.ilSkillSelfEvaluation.php");
326 if ($se->getUserId() ==
$ilUser->getId()) {
328 $cstep = (int) $_GET[
"step"];
330 if (is_array(
$_POST[
"se_sk"])) {
331 $se->setLevels(
$_POST[
"se_sk"],
true);
336 $ilCtrl->setParameter($this,
"step", (
int) $_GET[
"step"] - 1);
337 $ilCtrl->setParameter($this,
"se_id", $se->getId());
338 $ilCtrl->redirect($this,
"editSelfEvaluation");
339 } elseif (count(
$steps) - 1 > $cstep) {
340 $ilCtrl->setParameter($this,
"step", (
int) $_GET[
"step"] + 1);
341 $ilCtrl->setParameter($this,
"se_id", $se->getId());
342 $ilCtrl->redirect($this,
"editSelfEvaluation");
363 include_once(
"./Services/Skill/classes/class.ilSkillSelfEvaluation.php");
367 foreach ($ses as $se) {
369 $html.= $this->form->getHTML() .
"<br /><br />";
383 include_once(
"Services/Form/classes/class.ilPropertyFormGUI.php");
388 $lng->txt(
"created") .
": " .
392 if ($se[
"created"] != $se[
"last_update"]) {
393 $dates.=
", " .
$lng->txt(
"last_update") .
": " .
401 $levels = $se->getLevels();
403 $this->form->setTitle(
$lng->txt(
"skmg_self_evaluation") . $dates);
405 include_once(
"./Services/Skill/classes/class.ilBasicSkill.php");
406 include_once(
"./Services/Skill/classes/class.ilSkillTree.php");
409 if ($stree->isInTree($se->getTopSkillId())) {
410 $cnode = $stree->getNodeData($se->getTopSkillId());
411 $childs = $stree->getSubTree($cnode);
412 foreach ($childs as $child) {
413 if ($child[
"type"] ==
"skll") {
415 $path = $stree->getPathFull($child[
"child"]);
417 foreach (
$path as $p) {
418 if ($p[
"type"] !=
"skrt") {
419 $title.= $sep . $p[
"title"];
425 $ls = $sk->getLevelData();
428 foreach ($ls as $ld) {
429 if ($ld[
"id"] == $levels[$child[
"child"]]) {
430 $ne->setValue($ld[
"title"]);
433 $this->form->addItem($ne);
static sendSuccess($a_info="", $a_keep=false)
Send Success Message to Screen.
static determineSteps($a_sn_id)
Determine steps.
executeCommand()
Execute command.
static getAllSelfEvaluationsOfUser($a_user, $a_one_per_top_skill=false)
Get all self evaluations.
confirmSelfEvaluationDeletion()
Confirm self_evaluation deletion.
static formatDate(ilDateTime $date, $a_skip_day=false, $a_include_wd=false)
Format a date public.
static getAllSelfEvaluationNodes()
Get all self evaluation nodes.
static setUseRelativeDates($a_status)
set use relative dates
Self evaluation overview table.
updateSelfEvaluation($a_back=false)
Update self evaluation.
saveSelfEvaluation()
Save self evaluation.
updateBackSelfEvaluation()
Update self evaluation and go one step back.
getPresentationView($a_user_id)
Get presentation view.
editSelfEvaluation()
Edit self evaluation.
static sendInfo($a_info="", $a_keep=false)
Send Info Message to Screen.
startSelfEvaluation($a_mode="create")
startSelfEvaluation
Self evaluation application class.
readSelfEvaluation()
Read self_evaluation.
special template class to simplify handling of ITX/PEAR
listSelfEvaluations()
List all self evaluations.
__construct()
Constructor.
Create styles array
The data for the language used.
Self evaluation table for single skill.
static _lookupTitle($a_obj_id, $a_tref_id=0)
Lookup Title.
setSelfEvaluationPresentationForm($se)
Set self evaluation presentation form.
This class represents a non editable value in a property form.
deleteSelfEvaluation()
Delete self_evaluation.
if(empty($password)) $table
if(!isset($_REQUEST['ReturnTo'])) if(!isset($_REQUEST['AuthId'])) $options
Confirmation screen class.