diff --git a/classes/controllers/abstract.ilXTSFControllerGUI.php b/classes/controllers/abstract.ilXTSFControllerGUI.php index b7d82c9f5ff133d8f4740f1cf0f14564dc47ebd0..163004033980e61a84edf4bc74f6407f835b6bad 100644 --- a/classes/controllers/abstract.ilXTSFControllerGUI.php +++ b/classes/controllers/abstract.ilXTSFControllerGUI.php @@ -269,9 +269,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 f428153f2bce6493c69e732ad09144de0b0428a7..daa9d8058b26ea60c5b17bfa40e42cb1bae1dc66 100644 --- a/classes/controllers/class.ilFormATestOutputGUI.php +++ b/classes/controllers/class.ilFormATestOutputGUI.php @@ -400,7 +400,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(); @@ -482,4 +488,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 f8992f08d253e09a71297eafaf0c3f582a469ad0..176fa253b23b611149ce86172671c27c15cc4632 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"), @@ -414,14 +425,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