ILIAS  Release_4_4_x_branch Revision 61816
 All Data Structures Namespaces Files Functions Variables Groups Pages
ilSurveySkillDeterminationGUI Class Reference

Survey skill determination GUI class. More...

+ Collaboration diagram for ilSurveySkillDeterminationGUI:

Public Member Functions

 __construct (ilObjSurvey $a_survey)
 Constructor.
 executeCommand ()
 Execute command.
 listSkillChanges ()
 List skill changes.
 writeSkills ()
 Write skills.

Detailed Description

Survey skill determination GUI class.

Author
Alex Killing alex..nosp@m.kill.nosp@m.ing@g.nosp@m.mx.d.nosp@m.e
Version
$Id$ ilSurveySkillDeterminationGUI:

Definition at line 13 of file class.ilSurveySkillDeterminationGUI.php.

Constructor & Destructor Documentation

ilSurveySkillDeterminationGUI::__construct ( ilObjSurvey  $a_survey)

Constructor.

Parameters
object$a_survey

Definition at line 20 of file class.ilSurveySkillDeterminationGUI.php.

{
$this->survey = $a_survey;
}

Member Function Documentation

ilSurveySkillDeterminationGUI::executeCommand ( )

Execute command.

Definition at line 28 of file class.ilSurveySkillDeterminationGUI.php.

References $cmd, and $ilCtrl.

{
global $ilCtrl;
$cmd = $ilCtrl->getCmd("listSkillChanges");
//$ilCtrl->saveParameter($this, array("sk_id", "tref_id"));
if (in_array($cmd, array("listSkillChanges", "writeSkills")))
{
$this->$cmd();
}
}
ilSurveySkillDeterminationGUI::listSkillChanges ( )

List skill changes.

Definition at line 45 of file class.ilSurveySkillDeterminationGUI.php.

References $ilCtrl, $lng, and $tpl.

{
global $tpl, $ilToolbar, $lng, $ilCtrl;
include_once("./Modules/Survey/classes/class.ilSurveySkillChangesTableGUI.php");
// $ilToolbar->addButton($lng->txt("survey_write_skills"),
// $ilCtrl->getLinkTarget($this, "writeSkills"));
$apps = $this->survey->getAppraiseesData();
$ctpl = new ilTemplate("tpl.svy_skill_list_changes.html", true, true, "Modules/Survey");
foreach ($apps as $app)
{
$changes_table = new ilSurveySkillChangesTableGUI($this, "listSkillChanges",
$this->survey, $app);
$ctpl->setCurrentBlock("appraisee");
$ctpl->setVariable("LASTNAME", $app["lastname"]);
$ctpl->setVariable("FIRSTNAME", $app["firstname"]);
$ctpl->setVariable("CHANGES_TABLE", $changes_table->getHTML());
$ctpl->parseCurrentBlock();
}
$tpl->setContent($ctpl->get());
}
ilSurveySkillDeterminationGUI::writeSkills ( )

Write skills.

Parameters
@return

Definition at line 79 of file class.ilSurveySkillDeterminationGUI.php.

References $ilCtrl, $lng, ilBasicSkill\ACHIEVED, ilUtil\sendSuccess(), and ilBasicSkill\writeUserSkillLevelStatus().

{
global $lng, $ilCtrl;
return;
include_once("./Modules/Survey/classes/class.ilSurveySkill.php");
$sskill = new ilSurveySkill($this->survey);
$apps = $this->survey->getAppraiseesData();
$ctpl = new ilTemplate("tpl.svy_skill_list_changes.html", true, true, "Modules/Survey");
foreach ($apps as $app)
{
$new_levels = $sskill->determineSkillLevelsForAppraisee($app["user_id"]);
foreach ($new_levels as $nl)
{
if ($nl["new_level_id"] > 0)
{
$app["user_id"], $this->survey->getRefId(), $nl["tref_id"], ilBasicSkill::ACHIEVED);
}
}
}
ilUtil::sendSuccess($lng->txt("msg_obj_modified"), true);
$ilCtrl->redirect($this, "listSkillChanges");
}

+ Here is the call graph for this function:


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