ILIAS  Release_5_0_x_branch Revision 61816
 All Data Structures Namespaces Files Functions Variables Groups Pages
ilSurveySkillGUI Class Reference

Survey skill service GUI class. More...

+ Collaboration diagram for ilSurveySkillGUI:

Public Member Functions

 __construct (ilObjSurvey $a_survey)
 Constructor.
 executeCommand ()
 Execute command.
 listQuestionAssignment ()
 List question to skill assignment.
 assignSkillToQuestion ()
 Assign skill to question.
 selectSkillForQuestion ()
 Select skill for question.
 removeSkillFromQuestion ()
 Remove skill from question.
 setSubTabs ($a_activate)
 Set subtabs.

Detailed Description

Survey skill service GUI class.

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

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

Constructor & Destructor Documentation

ilSurveySkillGUI::__construct ( ilObjSurvey  $a_survey)

Constructor.

Parameters
object$a_survey

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

{
$this->survey = $a_survey;
}

Member Function Documentation

ilSurveySkillGUI::assignSkillToQuestion ( )

Assign skill to question.

Definition at line 72 of file class.ilSurveySkillGUI.php.

References $ilCtrl, $ilUser, $lng, and $tpl.

{
global $ilUser, $tpl, $ilCtrl, $lng, $ilTabs;
$ilCtrl->saveParameter($this, "q_id");
include_once("./Services/Skill/classes/class.ilSkillSelectorGUI.php");
$sel = new ilSkillSelectorGUI($this, "assignSkillToQuestion", $this, "selectSkillForQuestion");
if (!$sel->handleCommand())
{
$tpl->setContent($sel->getHTML());
}
return;
/*
include_once("./Services/Skill/classes/class.ilSkillTree.php");
$skill_tree = new ilSkillTree();
require_once ("./Modules/Survey/classes/class.ilSurveySkillExplorer.php");
$exp = new ilSurveySkillExplorer($ilCtrl->getLinkTarget($this, "assignSkillToQuestion"));
$exp->setTargetGet("obj_id");
$exp->setExpandTarget($ilCtrl->getLinkTarget($this, "assignSkillToQuestion"));
if ($_GET["skpexpand"] == "")
{
$expanded = $skill_tree->readRootId();
}
else
{
$expanded = $_GET["skpexpand"];
}
$exp->setExpand($expanded);
// build html-output
$exp->setOutput(0);
$output = $exp->getOutput();
// asynchronous output
if ($ilCtrl->isAsynch())
{
echo $output; exit;
}
$tpl->setContent($output); */
}
ilSurveySkillGUI::executeCommand ( )

Execute command.

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

References $cmd, $ilCtrl, and setSubTabs().

{
global $ilCtrl;
$cmd = $ilCtrl->getCmd();
$next_class = $ilCtrl->getNextClass();
switch ($next_class)
{
case 'ilsurveyskillthresholdsgui':
$this->setSubTabs("skill_thresholds");
include_once("./Modules/Survey/classes/class.ilSurveySkillThresholdsGUI.php");
$gui = new ilSurveySkillThresholdsGUI($this->survey);
$ilCtrl->forwardCommand($gui);
break;
default:
if (in_array($cmd, array("listQuestionAssignment",
"assignSkillToQuestion", "selectSkillForQuestion",
"removeSkillFromQuestion")))
{
$this->setSubTabs("survey_skill_assign");
$this->$cmd();
}
break;
}
}

+ Here is the call graph for this function:

ilSurveySkillGUI::listQuestionAssignment ( )

List question to skill assignment.

Definition at line 59 of file class.ilSurveySkillGUI.php.

References $tab, and $tpl.

{
global $tpl;
include_once("./Modules/Survey/classes/class.ilSurveySkillAssignmentTableGUI.php");
$tab = new ilSurveySkillAssignmentTableGUI($this, "listQuestionAssignment",
$this->survey);
$tpl->setContent($tab->getHTML());
}
ilSurveySkillGUI::removeSkillFromQuestion ( )

Remove skill from question.

Definition at line 140 of file class.ilSurveySkillGUI.php.

References $_GET, $ilCtrl, $lng, and ilUtil\sendSuccess().

{
global $ilCtrl, $lng;
include_once("./Modules/Survey/classes/class.ilSurveySkill.php");
$skill_survey = new ilSurveySkill($this->survey);
$skill_survey->removeQuestionSkillAssignment((int) $_GET["q_id"]);
ilUtil::sendSuccess($lng->txt("msg_obj_modified"), true);
$ilCtrl->redirect($this, "listQuestionAssignment");
}

+ Here is the call graph for this function:

ilSurveySkillGUI::selectSkillForQuestion ( )

Select skill for question.

Definition at line 123 of file class.ilSurveySkillGUI.php.

References $_GET, $ilCtrl, $lng, and ilUtil\sendSuccess().

{
global $ilCtrl, $lng;
include_once("./Modules/Survey/classes/class.ilSurveySkill.php");
$skill_survey = new ilSurveySkill($this->survey);
$skill_id_parts = explode(":", $_GET["selected_skill"]);
$skill_survey->addQuestionSkillAssignment((int) $_GET["q_id"],
(int) $skill_id_parts[0], (int) $skill_id_parts[1]);
ilUtil::sendSuccess($lng->txt("msg_obj_modified"), true);
$ilCtrl->redirect($this, "listQuestionAssignment");
}

+ Here is the call graph for this function:

ilSurveySkillGUI::setSubTabs (   $a_activate)

Set subtabs.

Parameters
string$a_activateactivate sub tab (ID)

Definition at line 157 of file class.ilSurveySkillGUI.php.

References $ilCtrl, and $lng.

Referenced by executeCommand().

{
global $ilTabs, $lng, $ilCtrl;
$ilTabs->addSubtab("survey_skill_assign",
$lng->txt("survey_skill_assign"),
$ilCtrl->getLinkTargetByClass("ilsurveyskillgui", "listQuestionAssignment"));
$ilTabs->addSubTab("skill_thresholds",
$lng->txt("survey_skill_thresholds"),
$ilCtrl->getLinkTargetByClass("ilsurveyskillthresholdsgui", "listCompetences"));
$ilTabs->activateSubtab($a_activate);
}

+ Here is the caller graph for this function:


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