-
Notifications
You must be signed in to change notification settings - Fork 372
T&A Bugfix #0042396: Fix Test Scoring Settings for Import/Export #8412
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
81e0a88
Fix Test Scoring Settings for Import/Export
fhelfer 2891483
Fix Show Pass Details defaulting to true in Import
fhelfer 7a895bc
Remove passDetails unit test
fhelfer 802f662
Fix Copyright ilObjTestTest
fhelfer 928b4f2
Remove local ilObjTest setter score_reporting & results_presentation
fhelfer File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,5 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
/** | ||
* This file is part of ILIAS, a powerful learning management system | ||
* published by ILIAS open source e-Learning e.V. | ||
|
@@ -18,6 +16,8 @@ | |
* | ||
*********************************************************************/ | ||
|
||
declare(strict_types=1); | ||
|
||
/** | ||
* Class ilObjTestTest | ||
* @author Marvin Beym <[email protected]> | ||
|
@@ -165,15 +165,6 @@ public function testSetPostponingEnabled(): void | |
$this->assertTrue($this->testObj->isPostponingEnabled()); | ||
} | ||
|
||
public function testScoreReporting(): void | ||
{ | ||
$this->testObj->setScoreReporting(0); | ||
$this->assertEquals(0, $this->testObj->getScoreReporting()); | ||
|
||
$this->testObj->setScoreReporting(1); | ||
$this->assertEquals(1, $this->testObj->getScoreReporting()); | ||
} | ||
|
||
public function testInstantFeedbackSolution(): void | ||
{ | ||
$this->testObj->setInstantFeedbackSolution(0); | ||
|
@@ -210,27 +201,6 @@ public function testAnswerFeedbackPoints(): void | |
$this->assertEquals(1, $this->testObj->getAnswerFeedbackPoints()); | ||
} | ||
|
||
public function testIsScoreReportingEnabled(): void | ||
{ | ||
$this->testObj->setScoreReporting(ilObjTest::SCORE_REPORTING_FINISHED); | ||
$this->assertTrue($this->testObj->isScoreReportingEnabled()); | ||
|
||
$this->testObj->setScoreReporting(ilObjTest::SCORE_REPORTING_IMMIDIATLY); | ||
$this->assertTrue($this->testObj->isScoreReportingEnabled()); | ||
|
||
$this->testObj->setScoreReporting(ilObjTest::SCORE_REPORTING_DATE); | ||
$this->assertTrue($this->testObj->isScoreReportingEnabled()); | ||
|
||
$this->testObj->setScoreReporting(ilObjTest::SCORE_REPORTING_AFTER_PASSED); | ||
$this->assertTrue($this->testObj->isScoreReportingEnabled()); | ||
|
||
$this->testObj->setScoreReporting(ilObjTest::SCORE_REPORTING_DISABLED); | ||
$this->assertFalse($this->testObj->isScoreReportingEnabled()); | ||
|
||
$this->testObj->setScoreReporting(999); | ||
$this->assertFalse($this->testObj->isScoreReportingEnabled()); | ||
} | ||
|
||
public function testBlockPassesAfterPassedEnabled(): void | ||
{ | ||
$this->testObj->setBlockPassesAfterPassedEnabled(false); | ||
|
@@ -425,16 +395,4 @@ public function testListOfQuestions(): void | |
$this->testObj->setListOfQuestions(1); | ||
$this->assertTrue($this->testObj->getListOfQuestions()); | ||
} | ||
|
||
public function testResultsPresentation(): void | ||
{ | ||
$this->testObj->setResultsPresentation(0); | ||
$this->assertEquals(0, $this->testObj->getResultsPresentation()); | ||
|
||
$this->testObj->setResultsPresentation(1); | ||
$this->assertEquals(1, $this->testObj->getResultsPresentation()); | ||
|
||
$this->testObj->setResultsPresentation(22); | ||
$this->assertEquals(22, $this->testObj->getResultsPresentation()); | ||
} | ||
} |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
By default, the value of
results_presentation
in thetst_tests
table is set to3
if it is not specified. This results inshowPassDetails()
always being true.Subsequently,
result_presentation
will be set to the corresponding import value (in my case,0
). However, due to this lineILIAS/Modules/Test/classes/ScoreReporting/class.ilObjTestScoreSettingsDatabaseRepository.php
Lines 126 to 128 in a54812f
, it will always be set to
1
. The reason for this is that PassDetails is true because it inherits the still-existing default value of 3 from the database.@nhaagen, you seem to be the author of this feature. Please take a look at this and see if there is a better solution.
Best,
@fhelfer
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This seems to also be an issue for newer releases