Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions src/app/doubtfire-angular.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -250,6 +250,7 @@ import {TasksViewerComponent} from './units/states/tasks/tasks-viewer/tasks-view
import {UnitCodeComponent} from './common/unit-code/unit-code.component';
import {GradeService} from './common/services/grade.service';
import {ScormPlayerComponent} from './common/scorm-player/scorm-player.component';
import {TimeoutComponent} from './errors/states/timeout/timeout.component';
import {ScormAdapterService} from './api/services/scorm-adapter.service';
import {ScormCommentComponent} from './tasks/task-comments-viewer/scorm-comment/scorm-comment.component';
import {TaskScormCardComponent} from './projects/states/dashboard/directives/task-dashboard/directives/task-scorm-card/task-scorm-card.component';
Expand Down Expand Up @@ -475,6 +476,7 @@ const GANTT_CHART_CONFIG = {
CommentsModalComponent,
ScormPlayerComponent,
ScormCommentComponent,
TimeoutComponent,
TaskScormCardComponent,
ScormExtensionCommentComponent,
ScormExtensionModalComponent,
Expand Down
1 change: 0 additions & 1 deletion src/app/doubtfire-angularjs.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,6 @@ import 'build/src/app/sessions/auth/http-auth-injector.js';
import 'build/src/app/sessions/sessions.js';
import 'build/src/app/errors/errors.js';
import 'build/src/app/errors/states/unauthorised/unauthorised.js';
import 'build/src/app/errors/states/timeout/timeout.js';
import 'build/src/app/errors/states/states.js';
import 'build/src/common/utilService/utilService.js';
import 'build/src/common/i18n/localize.js';
Expand Down
15 changes: 15 additions & 0 deletions src/app/doubtfire.states.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ import {ProjectPlanComponent} from './projects/states/plan/project-plan.componen
import {JplagReportViewerComponent} from './projects/states/jplag/jplag-report-viewer.component';
import {LtiDashboardComponent} from './home/states/lti-dashboard/lti-dashboard.component';
import {LtiUnitLinkComponent} from './home/states/lti-unit-link/lti-unit-link.component';
import {TimeoutComponent} from './errors/states/timeout/timeout.component';
/*
* Use this file to store any states that are sourced by angular components.
*/
Expand Down Expand Up @@ -574,6 +575,19 @@ const LtiUnitLinkState: NgHybridStateDeclaration = {
},
};

const TimeoutState: NgHybridStateDeclaration = {
name: 'timeout',
url: '/timeout?dest&params',
views: {
main: {
component: TimeoutComponent,
},
},
data: {
pageTitle: '_Timeout_',
},
};

/**
* Export the list of states we have created in angular
*/
Expand All @@ -592,6 +606,7 @@ export const doubtfireStates = [
ScormPlayerNormalState,
ScormPlayerReviewState,
ScormPlayerStudentReviewState,
TimeoutState,
SuccessCloseState,
projectPlanState,
TutorDiscussionState,
Expand Down
1 change: 0 additions & 1 deletion src/app/errors/states/states.coffee
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
angular.module("doubtfire.errors.states", [
"doubtfire.errors.states.timeout"
"doubtfire.errors.states.unauthorised"
])
20 changes: 0 additions & 20 deletions src/app/errors/states/timeout/timeout.coffee

This file was deleted.

14 changes: 14 additions & 0 deletions src/app/errors/states/timeout/timeout.component.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
import {Component, OnInit} from '@angular/core';
import {AuthenticationService} from 'src/app/api/services/authentication.service';

@Component({
selector: 'timeout',
templateUrl: './timeout.component.html',
})
export class TimeoutComponent implements OnInit {
constructor(private authenticationService: AuthenticationService) {}

ngOnInit(): void {
setTimeout(() => this.authenticationService.signOut(false), 2000);
}
}