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
cb4d43f0
Commit
cb4d43f0
authored
4 years ago
by
uhensler
Browse files
Options
Downloads
Patches
Plain Diff
OO-4718: Use utility method (refactoring)
parent
5f86bfa6
No related branches found
Branches containing commit
No related tags found
Tags containing commit
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
+2
-8
2 additions, 8 deletions
...se/assessment/manager/AssessmentNotificationsHandler.java
with
2 additions
and
8 deletions
src/main/java/org/olat/course/assessment/manager/AssessmentNotificationsHandler.java
+
2
−
8
View file @
cb4d43f0
...
@@ -55,6 +55,7 @@ import org.olat.core.id.Identity;
...
@@ -55,6 +55,7 @@ import org.olat.core.id.Identity;
import
org.olat.core.id.context.BusinessControlFactory
;
import
org.olat.core.id.context.BusinessControlFactory
;
import
org.olat.core.logging.AssertException
;
import
org.olat.core.logging.AssertException
;
import
org.olat.core.logging.Tracing
;
import
org.olat.core.logging.Tracing
;
import
org.olat.core.util.DateUtils
;
import
org.olat.core.util.Util
;
import
org.olat.core.util.Util
;
import
org.olat.core.util.nodes.INode
;
import
org.olat.core.util.nodes.INode
;
import
org.olat.course.CourseFactory
;
import
org.olat.course.CourseFactory
;
...
@@ -351,7 +352,7 @@ public class AssessmentNotificationsHandler implements NotificationsHandler {
...
@@ -351,7 +352,7 @@ public class AssessmentNotificationsHandler implements NotificationsHandler {
for
(
CourseNode
test:
testNodes
)
{
for
(
CourseNode
test:
testNodes
)
{
List
<
AssessmentEntry
>
assessments
=
courseNodeAssessmentDao
.
loadAssessmentEntryBySubIdent
(
cgm
.
getCourseEntry
(),
test
.
getIdent
());
List
<
AssessmentEntry
>
assessments
=
courseNodeAssessmentDao
.
loadAssessmentEntryBySubIdent
(
cgm
.
getCourseEntry
(),
test
.
getIdent
());
for
(
AssessmentEntry
assessment:
assessments
)
{
for
(
AssessmentEntry
assessment:
assessments
)
{
Date
modDate
=
getLater
(
assessment
.
getLastUserModified
(),
assessment
.
getLastCoachModified
());
Date
modDate
=
DateUtils
.
getLater
(
assessment
.
getLastUserModified
(),
assessment
.
getLastCoachModified
());
Identity
assessedIdentity
=
assessment
.
getIdentity
();
Identity
assessedIdentity
=
assessment
.
getIdentity
();
if
(
modDate
!=
null
&&
modDate
.
after
(
compareDate
)
&&
(
hasFullAccess
||
coachedUsers
.
contains
(
assessedIdentity
)))
{
if
(
modDate
!=
null
&&
modDate
.
after
(
compareDate
)
&&
(
hasFullAccess
||
coachedUsers
.
contains
(
assessedIdentity
)))
{
BigDecimal
score
=
assessment
.
getScore
();
BigDecimal
score
=
assessment
.
getScore
();
...
@@ -405,13 +406,6 @@ public class AssessmentNotificationsHandler implements NotificationsHandler {
...
@@ -405,13 +406,6 @@ 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
)
{
private
void
checkPublisher
(
Publisher
p
)
{
try
{
try
{
if
(!
NotificationsUpgradeHelper
.
checkCourse
(
p
))
{
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