Skip to content

Commit

Permalink
lok3 ILIAS-eLearning#5 (bheyser)
Browse files Browse the repository at this point in the history
  • Loading branch information
Björn Heyser committed Aug 20, 2015
1 parent f84d80d commit 9d14077
Show file tree
Hide file tree
Showing 7 changed files with 21 additions and 6 deletions.
4 changes: 2 additions & 2 deletions Modules/Test/classes/class.ilObjTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -12137,13 +12137,13 @@ public static function ensureParticipantsLastActivePassFinished($testObjId, $use
// end-patch lok
}

public static function isParticipantsLastPassActive($testObjId, $userId)
public static function isParticipantsLastPassActive($testRefId, $userId)
{
global $ilDB, $lng, $ilPluginAdmin;

/* @var ilObjTest $testOBJ */

$testOBJ = ilObjectFactory::getInstanceByRefId($testObjId,false);
$testOBJ = ilObjectFactory::getInstanceByRefId($testRefId,false);


$activeId = $testOBJ->getActiveIdOfUser($userId);
Expand Down
2 changes: 1 addition & 1 deletion Modules/Test/classes/class.ilTestEvaluationGUI.php
Original file line number Diff line number Diff line change
Expand Up @@ -1159,7 +1159,7 @@ function outUserPassDetails()
{
$list_of_answers = $this->getPassListOfAnswers(
$result_array, $active_id, $pass, $this->object->getShowSolutionListComparison(),
false, false, false, true, $objectivesList
false, false, false, true, $objectivesList, $testResultHeaderLabelBuilder
);
$tpl->setVariable("LIST_OF_ANSWERS", $list_of_answers);
}
Expand Down
12 changes: 12 additions & 0 deletions Modules/Test/classes/class.ilTestResultHeaderLabelBuilder.php
Original file line number Diff line number Diff line change
Expand Up @@ -336,4 +336,16 @@ private function getAttemptLabel($attemptNumber)
{
return sprintf($this->lng->txt('tst_res_lo_try_n'), $attemptNumber);
}

public function getListOfAnswersHeaderLabel($attemptNumber)
{
$langVar = 'tst_eval_results_by_pass';

if( $this->getObjectiveOrientedContainerId() )
{
$langVar = 'tst_eval_results_by_pass_lo';
}

return sprintf($this->lng->txt($langVar), $attemptNumber);
}
}
4 changes: 2 additions & 2 deletions Modules/Test/classes/class.ilTestServiceGUI.php
Original file line number Diff line number Diff line change
Expand Up @@ -325,7 +325,7 @@ public function getPassOverview(ilTestSession $testSession, $targetclass = "", $
* @return string HTML code of the list of answers
* @access public
*/
function getPassListOfAnswers(&$result_array, $active_id, $pass, $show_solutions = FALSE, $only_answered_questions = FALSE, $show_question_only = FALSE, $show_reached_points = FALSE, $anchorNav = false, ilTestQuestionRelatedObjectivesList $objectivesList = null)
function getPassListOfAnswers(&$result_array, $active_id, $pass, $show_solutions = FALSE, $only_answered_questions = FALSE, $show_question_only = FALSE, $show_reached_points = FALSE, $anchorNav = false, ilTestQuestionRelatedObjectivesList $objectivesList = null, ilTestResultHeaderLabelBuilder $testResultHeaderLabelBuilder = null)
{
$maintemplate = new ilTemplate("tpl.il_as_tst_list_of_answers.html", TRUE, TRUE, "Modules/Test");

Expand Down Expand Up @@ -401,7 +401,7 @@ function getPassListOfAnswers(&$result_array, $active_id, $pass, $show_solutions
}
}
}
$maintemplate->setVariable("RESULTS_OVERVIEW", sprintf($this->lng->txt("tst_eval_results_by_pass"), $pass + 1));
$maintemplate->setVariable("RESULTS_OVERVIEW", $testResultHeaderLabelBuilder->getListOfAnswersHeaderLabel($pass + 1));
return $maintemplate->get();
}

Expand Down
3 changes: 2 additions & 1 deletion Modules/Test/classes/class.ilTestSessionFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ class ilTestSessionFactory
* @var ilTestSession|ilTestSessionDynamicQuestionSet
*/
private $testSession = array();

/**
* object instance of current test
* @var ilObjTest
Expand All @@ -33,6 +33,7 @@ public function __construct(ilObjTest $testOBJ)
/**
* temporarily bugfix for resetting the state of this singleton
* smeyer
* --> BH: not required anymore
*/
public function reset()
{
Expand Down
1 change: 1 addition & 0 deletions lang/ilias_de.lang
Original file line number Diff line number Diff line change
Expand Up @@ -1153,6 +1153,7 @@ assessment#:#tst_enter_questionpool#:#Bitte geben Sie den Namen eines Fragenpool
assessment#:#tst_eval_no_anonymous_aggregation#:#Der Test wurde bislang noch von niemandem durchgeführt. Es existieren keine anonym aggregierten Ergebnisse.
assessment#:#tst_eval_question_points#:#Fragenergebnisse für Testdurchlauf %s
assessment#:#tst_eval_results_by_pass#:#Detaillierte Testergebnisse für Testdurchlauf %s
assessment#:#tst_eval_results_by_pass_lo#:#Detaillierte Testergebnisse für den %s. Versuch
assessment#:#tst_eval_show_answer#:#Antwort anzeigen
assessment#:#tst_eval_total_finished#:#Gesamtzahl aller beendeten Tests (Benutzer, die maximale Anzahl Passes eingereicht haben.)
assessment#:#tst_eval_total_finished_average_time#:#Mittlere Bearbeitungsdauer aller Tests
Expand Down
1 change: 1 addition & 0 deletions lang/ilias_en.lang
Original file line number Diff line number Diff line change
Expand Up @@ -1004,6 +1004,7 @@ assessment#:#tst_enter_questionpool#:#Please enter a question pool name where th
assessment#:#tst_eval_no_anonymous_aggregation#:#No one has entered the test yet. There are no anonymous aggregated test results available.
assessment#:#tst_eval_question_points#:#Question Results for Pass %s
assessment#:#tst_eval_results_by_pass#:#List of Answers for Pass %s
assessment#:#tst_eval_results_by_pass_lo#:#List of Answers for Attempt %s
assessment#:#tst_eval_show_answer#:#Show Answer
assessment#:#tst_eval_total_finished_average_time#:#Average test processing time
assessment#:#tst_eval_total_finished#:#Total finished tests (Users that used up all possible passes.)
Expand Down

0 comments on commit 9d14077

Please sign in to comment.