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
6c4ad5e6
Commit
6c4ad5e6
authored
12 years ago
by
srosse
Browse files
Options
Downloads
Patches
Plain Diff
OO-291: fox some after merge issue, upgrade calendar web service to BusinessGroupService...
parent
6988e78a
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/main/java/org/olat/commons/calendar/restapi/CalendarWebService.java
+8
-9
8 additions, 9 deletions
...org/olat/commons/calendar/restapi/CalendarWebService.java
src/test/java/org/olat/restapi/CoursesTest.java
+1
-3
1 addition, 3 deletions
src/test/java/org/olat/restapi/CoursesTest.java
with
9 additions
and
12 deletions
src/main/java/org/olat/commons/calendar/restapi/CalendarWebService.java
+
8
−
9
View file @
6c4ad5e6
...
...
@@ -66,9 +66,8 @@ import org.olat.course.nodes.CalCourseNode;
import
org.olat.course.nodes.cal.CourseCalendars
;
import
org.olat.course.run.userview.CourseTreeVisitor
;
import
org.olat.group.BusinessGroup
;
import
org.olat.group.BusinessGroupManager
;
import
org.olat.group.BusinessGroupManagerImpl
;
import
org.olat.group.SearchBusinessGroupParams
;
import
org.olat.group.BusinessGroupService
;
import
org.olat.group.model.SearchBusinessGroupParams
;
import
org.olat.repository.RepositoryEntry
;
import
org.olat.repository.RepositoryManager
;
import
org.olat.repository.SearchRepositoryEntryParameters
;
...
...
@@ -293,8 +292,9 @@ public class CalendarWebService {
KalendarRenderWrapper
wrapper
=
null
;
if
(
"group"
.
equals
(
type
))
{
Long
groupId
=
Long
.
parseLong
(
id
);
BusinessGroup
group
=
BusinessGroupManagerImpl
.
getInstance
().
loadBusinessGroup
(
groupId
,
false
);
if
(
BusinessGroupManagerImpl
.
getInstance
().
isIdentityInBusinessGroup
(
ureq
.
getIdentity
(),
group
))
{
BusinessGroupService
bgs
=
CoreSpringFactory
.
getImpl
(
BusinessGroupService
.
class
);
BusinessGroup
group
=
bgs
.
loadBusinessGroup
(
groupId
);
if
(
bgs
.
isIdentityInBusinessGroup
(
ureq
.
getIdentity
(),
group
))
{
CollaborationManager
collaborationManager
=
CoreSpringFactory
.
getImpl
(
CollaborationManager
.
class
);
wrapper
=
collaborationManager
.
getCalendar
(
group
,
ureq
,
false
);
}
...
...
@@ -365,11 +365,10 @@ public class CalendarWebService {
CollaborationManager
collaborationManager
=
CoreSpringFactory
.
getImpl
(
CollaborationManager
.
class
);
//start found forums in groups
BusinessGroupManager
bgm
=
BusinessGroupManagerImpl
.
getInstance
();
SearchBusinessGroupParams
params
=
new
SearchBusinessGroupParams
();
params
.
addTypes
(
BusinessGroup
.
TYPE_BUDDYGROUP
,
BusinessGroup
.
TYPE_LEARNINGROUP
,
BusinessGroup
.
TYPE_RIGHTGROUP
);
BusinessGroupService
bgm
=
CoreSpringFactory
.
getImpl
(
BusinessGroupService
.
class
);
SearchBusinessGroupParams
params
=
new
SearchBusinessGroupParams
(
retrievedUser
,
true
,
true
);
params
.
addTools
(
CollaborationTools
.
TOOL_CALENDAR
);
List
<
BusinessGroup
>
groups
=
bgm
.
findBusinessGroups
(
params
,
retrievedUser
,
true
,
true
,
null
,
0
,
-
1
);
List
<
BusinessGroup
>
groups
=
bgm
.
findBusinessGroups
(
params
,
null
,
0
,
-
1
);
for
(
BusinessGroup
group:
groups
)
{
KalendarRenderWrapper
wrapper
=
collaborationManager
.
getCalendar
(
group
,
ureq
,
false
);
calVisitor
.
visit
(
wrapper
);
...
...
This diff is collapsed.
Click to expand it.
src/test/java/org/olat/restapi/CoursesTest.java
+
1
−
3
View file @
6c4ad5e6
...
...
@@ -195,9 +195,7 @@ public class CoursesTest extends OlatJerseyTestCase {
HttpResponse
response
=
conn
.
execute
(
method
);
assertTrue
(
response
.
getStatusLine
().
getStatusCode
()
==
200
||
response
.
getStatusLine
().
getStatusCode
()
==
201
);
InputStream
body
=
response
.
getEntity
().
getContent
();
CourseVO
vo
=
parse
(
body
,
CourseVO
.
class
);
CourseVO
vo
=
conn
.
parse
(
response
,
CourseVO
.
class
);
assertNotNull
(
vo
);
assertNotNull
(
vo
.
getRepoEntryKey
());
assertNotNull
(
vo
.
getKey
());
...
...
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