Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
ARSnova Backend
Manage
Activity
Members
Labels
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Operate
Environments
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Help
Help
Support
GitLab documentation
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Privacy
Imprint
Contact
Snippets
Groups
Projects
Show more breadcrumbs
Paul-Christian Volkmer
ARSnova Backend
Commits
06d6e6f1
Commit
06d6e6f1
authored
12 years ago
by
Paul-Christian Volkmer
Browse files
Options
Downloads
Patches
Plain Diff
Removed obsolete method
parent
025a0295
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/main/java/de/thm/arsnova/controller/CourseController.java
+3
-29
3 additions, 29 deletions
...main/java/de/thm/arsnova/controller/CourseController.java
with
3 additions
and
29 deletions
src/main/java/de/thm/arsnova/controller/CourseController.java
+
3
−
29
View file @
06d6e6f1
...
@@ -18,7 +18,6 @@
...
@@ -18,7 +18,6 @@
*/
*/
package
de.thm.arsnova.controller
;
package
de.thm.arsnova.controller
;
import
java.util.ArrayList
;
import
java.util.List
;
import
java.util.List
;
import
org.slf4j.Logger
;
import
org.slf4j.Logger
;
...
@@ -31,7 +30,7 @@ import org.springframework.web.bind.annotation.ResponseBody;
...
@@ -31,7 +30,7 @@ import org.springframework.web.bind.annotation.ResponseBody;
import
de.thm.arsnova.connector.client.ConnectorClient
;
import
de.thm.arsnova.connector.client.ConnectorClient
;
import
de.thm.arsnova.connector.model.Course
;
import
de.thm.arsnova.connector.model.Course
;
import
de.thm.arsnova.e
ntities.Sess
ion
;
import
de.thm.arsnova.e
xceptions.NotFoundExcept
ion
;
import
de.thm.arsnova.exceptions.UnauthorizedException
;
import
de.thm.arsnova.exceptions.UnauthorizedException
;
import
de.thm.arsnova.services.ISessionService
;
import
de.thm.arsnova.services.ISessionService
;
import
de.thm.arsnova.services.IUserService
;
import
de.thm.arsnova.services.IUserService
;
...
@@ -61,33 +60,8 @@ public class CourseController extends AbstractController {
...
@@ -61,33 +60,8 @@ public class CourseController extends AbstractController {
if
(
connectorClient
==
null
)
{
if
(
connectorClient
==
null
)
{
throw
new
NotFoundException
();
throw
new
NotFoundException
();
}
return
connectorClient
.
getCourses
(
username
).
getCourse
();
}
@RequestMapping
(
value
=
"/mycoursesessions"
,
method
=
RequestMethod
.
GET
)
@ResponseBody
public
final
List
<
Session
>
myCourseSessions
()
{
String
username
=
userService
.
getCurrentUser
().
getUsername
();
if
(
username
==
null
)
{
throw
new
UnauthorizedException
();
}
List
<
Session
>
sessions
=
sessionService
.
getMySessions
(
username
);
List
<
Course
>
courses
=
this
.
myCourses
();
List
<
Session
>
result
=
new
ArrayList
<
Session
>();
for
(
Session
session
:
sessions
)
{
for
(
Course
course
:
courses
)
{
if
(
session
.
getCourseId
().
equals
(
course
.
getId
()))
{
result
.
add
(
session
);
}
}
}
}
return
result
;
return
connectorClient
.
getCourses
(
username
).
getCourse
()
;
}
}
}
}
This diff is collapsed.
Click to expand it.
Preview
0%
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