diff --git a/classes/controllers/abstract.ilXTSFControllerGUI.php b/classes/controllers/abstract.ilXTSFControllerGUI.php index c4f5d2e37c712a1ecaf244aad5ceb16293b26e36..861ff84842e3bdb6bc5e94a99ef33a349d4b2f02 100644 --- a/classes/controllers/abstract.ilXTSFControllerGUI.php +++ b/classes/controllers/abstract.ilXTSFControllerGUI.php @@ -260,9 +260,11 @@ abstract class ilXTSFControllerGUI { * * @return string */ - protected function generateJumpToNodeLink($finish_set, $node, $params = array()) + protected function generateJumpToNodeLink($finish_set, $node, $params = array(), $step = 0) { $this->ctrl->setParameter($this->controller, "node_id", $node["id"]); + $this->ctrl->setParameter($this->controller, "node_step", $step); + if ($finish_set) { $this->ctrl->setParameter($this->controller, "finished", 1); diff --git a/classes/controllers/class.ilFormATestOutputGUI.php b/classes/controllers/class.ilFormATestOutputGUI.php index 353aac71d037004c14155f49d6763f09b430acf2..359f0dab50a762de2e82d16bc2e68f6e80b83645 100644 --- a/classes/controllers/class.ilFormATestOutputGUI.php +++ b/classes/controllers/class.ilFormATestOutputGUI.php @@ -402,7 +402,13 @@ class ilFormATestOutputGUI extends ilXTSFControllerGUI else { $left_template->setCurrentBlock("linked_line"); - $left_template->setVariable("LINK", $this->generateJumpToNodeLink($finish_set, $node, array("xtsf_token" => $this->session->getToken()))); + $left_template->setVariable("LINK", $this->generateJumpToNodeLink( + $finish_set, + $node, + array("xtsf_token" => $this->session->getToken()), + $step + )); + //$template->setVariable("QUESTION_INDEX", $node["question_index"]); $left_template->setVariable("QUESTION_TITLE", $title); $left_template->parseCurrentBlock(); @@ -484,4 +490,3 @@ class ilFormATestOutputGUI extends ilXTSFControllerGUI return $show_question_inline_score; } } - \ No newline at end of file diff --git a/classes/controllers/class.ilFormATestPlayerControllerGUI.php b/classes/controllers/class.ilFormATestPlayerControllerGUI.php index dc14bb95618312ae86347d0a9140d963b115993b..ebbab8e8f1efab70a299c3a38dfcffeba9deb0f1 100644 --- a/classes/controllers/class.ilFormATestPlayerControllerGUI.php +++ b/classes/controllers/class.ilFormATestPlayerControllerGUI.php @@ -198,6 +198,17 @@ class ilFormATestPlayerControllerGUI extends ilXTSFControllerGUI } else { + $inTestStep = 1; + if (true === isset($_GET["node_step"])) { + $inTestStep = $_GET["node_step"]; + $int = (int) $inTestStep; + if ((string) $int !== (string) $inTestStep) { + throw new ilException('"node_step" MUST be an integer value', 403); + } + + $inTestStep = $inTestStep + 1; + } + $this->renderConfirmationScreen( "ilFormATestPlayerControllerGUI.resumeTest", "ilFormATestPlayerControllerGUI.prev", @@ -205,7 +216,7 @@ class ilFormATestPlayerControllerGUI extends ilXTSFControllerGUI array( "name" => "n_id[]", "id" => $this->session->getNodeId(), - "text" => $this->plugin->txt("header_step"). ": ". $this->session->getStep() + "text" => $this->plugin->txt("header_step"). ": ". $inTestStep ) ), $this->plugin->txt("confirm_walk_back"), @@ -416,14 +427,24 @@ class ilFormATestPlayerControllerGUI extends ilXTSFControllerGUI } else { + $inTestStep = 0; + if (true === isset($_GET["node_step"])) { + $inTestStep = $_GET["node_step"]; + $int = (int) $inTestStep; + if ((string) $int !== (string) $inTestStep) { + throw new ilException('"node_step" MUST be an integer value', 403); + } + } + $steps = $this->session->getStepsToDelete($node); $items = array(); foreach($steps as $step) { + $inTestStep++; $items[] = array( "name" => "n_id[]", "id" => $step["id"], - "text" => $this->plugin->txt("header_step"). ": ". $step["step"] + "text" => $this->plugin->txt("header_step"). ": ". $inTestStep ); } $cancel = "ilFormATestPlayerControllerGUI.back"; diff --git a/classes/controllers/class.ilFormATestResultOuputGUI.php b/classes/controllers/class.ilFormATestResultOuputGUI.php index 5aa2913454ae4a9a715d614a0a2d2618e0c726e4..7404904638b508e2173218ad20b2206b405f2207 100644 --- a/classes/controllers/class.ilFormATestResultOuputGUI.php +++ b/classes/controllers/class.ilFormATestResultOuputGUI.php @@ -154,8 +154,8 @@ class ilFormATestResultOuputGUI extends ilXTSFControllerGUI $this->template->setCurrentBlock('path_overview_question'); $this->template->parseCurrentBlock(); } - // - + + $step = 1; foreach($data as $item) { if($current_node_id == null || $current_node_id != $item["id"]) @@ -177,7 +177,8 @@ class ilFormATestResultOuputGUI extends ilXTSFControllerGUI $question_title = "(Q ". $item["question_index"]. ") ". $item["question_title"]; if($this->modus == self::MODUS_PARTICIPANTS) { - $question_title = $set["title"] . " - " . $this->plugin->txt("header_step"). ": ". $item["step"]; + $question_title = $set["title"] . " - " . $this->plugin->txt("header_step"). ": ". $step; + $step++; } $gui = assQuestion::instantiateQuestionGUI($item["question_fi"]); @@ -317,4 +318,3 @@ class ilFormATestResultOuputGUI extends ilXTSFControllerGUI } } } - \ No newline at end of file