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
48aea7d8
Commit
48aea7d8
authored
4 years ago
by
uhensler
Browse files
Options
Downloads
Patches
Plain Diff
OO-4718: Notify only if really a relevant value was changed
parent
24b2babe
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/assessment/manager/AssessmentNotificationsHandler.java
+9
-2
9 additions, 2 deletions
...se/assessment/manager/AssessmentNotificationsHandler.java
with
9 additions
and
2 deletions
src/main/java/org/olat/course/assessment/manager/AssessmentNotificationsHandler.java
+
9
−
2
View file @
48aea7d8
...
...
@@ -346,9 +346,9 @@ public class AssessmentNotificationsHandler implements NotificationsHandler {
for
(
AssessableCourseNode
test:
testNodes
)
{
List
<
AssessmentEntry
>
assessments
=
courseNodeAssessmentDao
.
loadAssessmentEntryBySubIdent
(
cgm
.
getCourseEntry
(),
test
.
getIdent
());
for
(
AssessmentEntry
assessment:
assessments
)
{
Date
modDate
=
assessment
.
getLastModified
();
Date
modDate
=
getLater
(
assessment
.
getLast
User
Modified
()
,
assessment
.
getLastCoachModified
())
;
Identity
assessedIdentity
=
assessment
.
getIdentity
();
if
(
modDate
.
after
(
compareDate
)
&&
(
hasFullAccess
||
coachedUsers
.
contains
(
assessedIdentity
)))
{
if
(
modDate
!=
null
&&
modDate
.
after
(
compareDate
)
&&
(
hasFullAccess
||
coachedUsers
.
contains
(
assessedIdentity
)))
{
BigDecimal
score
=
assessment
.
getScore
();
if
(
test
instanceof
ScormCourseNode
)
{
ScormCourseNode
scormTest
=
(
ScormCourseNode
)
test
;
...
...
@@ -400,6 +400,13 @@ public class AssessmentNotificationsHandler implements NotificationsHandler {
}
}
private
Date
getLater
(
Date
date1
,
Date
date2
)
{
if
(
date1
==
null
)
return
date2
;
if
(
date2
==
null
)
return
date1
;
return
date1
.
after
(
date2
)?
date1:
date2
;
}
private
void
checkPublisher
(
Publisher
p
)
{
try
{
if
(!
NotificationsUpgradeHelper
.
checkCourse
(
p
))
{
...
...
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