We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents bf0f198 + e118e7f commit c9662a8Copy full SHA for c9662a8
app/controllers/course-overview.ts
@@ -10,18 +10,7 @@ export default class CourseOverviewController extends Controller {
10
@service declare authenticator: AuthenticatorService;
11
12
get activeRepository(): RepositoryModel | null {
13
- if (this.authenticator.currentUser) {
14
- return (
15
- this.authenticator.currentUser.repositories
16
- .filterBy('course', this.model.course)
17
- .filterBy('firstSubmissionCreated')
18
- .sortBy('lastSubmissionAt')
19
- .toArray()
20
- .reverse()[0] || null
21
- );
22
- } else {
23
- return null;
24
- }
+ return this.userRepositories.sortBy('lastSubmissionAt').toArray().reverse()[0] || null;
25
}
26
27
get completedStages() {
0 commit comments