Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
OLAT CI-CD Testing Project
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Requirements
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Deploy
Package Registry
Container Registry
Model registry
Operate
Terraform modules
Monitor
Service Desk
Analyze
Contributor analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Lars Oliver Dam
OLAT CI-CD Testing Project
Commits
bccaaa7d
Commit
bccaaa7d
authored
4 years ago
by
srosse
Browse files
Options
Downloads
Patches
Plain Diff
OO-5258: compare the data from assessment entry without default value
parent
a3c47bd3
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/main/java/org/olat/course/nodes/CheckListCourseNode.java
+11
-6
11 additions, 6 deletions
src/main/java/org/olat/course/nodes/CheckListCourseNode.java
with
11 additions
and
6 deletions
src/main/java/org/olat/course/nodes/CheckListCourseNode.java
+
11
−
6
View file @
bccaaa7d
...
...
@@ -457,7 +457,7 @@ public class CheckListCourseNode extends AbstractAccessableCourseNode {
}
}
ScoreEvaluation
sceval
=
new
ScoreEvaluation
(
score
,
new
Boolean
(
passed
));
ScoreEvaluation
sceval
=
new
ScoreEvaluation
(
score
,
Boolean
.
valueOf
(
passed
));
CourseAssessmentService
courseAssessmentService
=
CoreSpringFactory
.
getImpl
(
CourseAssessmentService
.
class
);
courseAssessmentService
.
saveScoreEvaluation
(
this
,
identity
,
sceval
,
assessedUserCourseEnv
,
false
,
by
);
...
...
@@ -475,7 +475,7 @@ public class CheckListCourseNode extends AbstractAccessableCourseNode {
CourseAssessmentService
courseAssessmentService
=
CoreSpringFactory
.
getImpl
(
CourseAssessmentService
.
class
);
ScoreEvaluation
currentEval
=
courseAssessmentService
.
getAssessmentEvaluation
(
this
,
assessedUserCourseEnv
);
ScoreEvaluation
sceval
=
new
ScoreEvaluation
(
new
Float
(
score
),
currentEval
.
getPassed
());
ScoreEvaluation
sceval
=
new
ScoreEvaluation
(
Float
.
valueOf
(
score
),
currentEval
.
getPassed
());
courseAssessmentService
.
saveScoreEvaluation
(
this
,
identity
,
sceval
,
assessedUserCourseEnv
,
false
,
by
);
}
...
...
@@ -558,10 +558,15 @@ public class CheckListCourseNode extends AbstractAccessableCourseNode {
private
void
updateScorePassedOnPublish
(
Identity
assessedIdentity
,
Identity
coachIdentity
,
CheckboxManager
checkboxManager
,
ICourse
course
)
{
AssessmentManager
am
=
course
.
getCourseEnvironment
().
getAssessmentManager
();
Float
currentScore
=
am
.
getNodeScore
(
this
,
assessedIdentity
);
Boolean
currentPassed
=
am
.
getNodePassed
(
this
,
assessedIdentity
);
Float
currentScore
=
null
;
Boolean
currentPassed
=
null
;
AssessmentEntry
ae
=
am
.
getAssessmentEntry
(
this
,
assessedIdentity
);
if
(
ae
!=
null
)
{
currentScore
=
ae
.
getScore
()
==
null
?
null
:
ae
.
getScore
().
floatValue
();
currentPassed
=
ae
.
getPassed
();
}
Float
updatedScore
=
null
;
Float
updatedScore
;
Boolean
updatedPassed
=
null
;
ModuleConfiguration
config
=
getModuleConfiguration
();
...
...
@@ -616,7 +621,7 @@ public class CheckListCourseNode extends AbstractAccessableCourseNode {
||
(
currentScore
!=
null
&&
updatedScore
==
null
)
||
(
currentScore
!=
null
&&
!
currentScore
.
equals
(
updatedScore
)))
{
needUpdate
=
true
;
}
}
if
(
needUpdate
)
{
ScoreEvaluation
scoreEval
=
new
ScoreEvaluation
(
updatedScore
,
updatedPassed
);
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment