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
10 changes: 10 additions & 0 deletions src/app/doubtfire-angular.module.ts
Original file line numberDiff line numberDiff line change
Expand Up@@ -11,6 +11,10 @@ import { NgxChartsModule } from '@swimlane/ngx-charts';

// Lottie animation module
// import {LottieModule, LottieCacheModule} from 'ngx-lottie';
import { FStudentsListComponent } from './units/states/students-list/students-list.component';



import {provideLottieOptions, LottieComponent} from 'ngx-lottie';
import player from 'lottie-web';
import {ClipboardModule} from '@angular/cdk/clipboard';
Expand DownExpand Up@@ -271,6 +275,8 @@ import { UnitStudentEnrolmentModalComponent } from './units/modals/unit-student-
@NgModule({
// Components we declare
declarations: [

FStudentsListComponent,
AlertComponent,
UnitStudentEnrolmentModalComponent,
AboutDoubtfireModalContent,
Expand DownExpand Up@@ -399,6 +405,7 @@ import { UnitStudentEnrolmentModalComponent } from './units/modals/unit-student-
GroupSetService,
GroupService,
UnitService,
UserService,
ProjectService,
UnitRoleService,
LearningOutcomeService,
Expand DownExpand Up@@ -471,6 +478,7 @@ import { UnitStudentEnrolmentModalComponent } from './units/modals/unit-student-
],
imports: [
FlexLayoutModule,
FormsModule,
BrowserModule,
BrowserAnimationsModule,
FormsModule,
Expand All@@ -479,6 +487,8 @@ import { UnitStudentEnrolmentModalComponent } from './units/modals/unit-student-
DragDropModule,
ScrollingModule,
MatToolbarModule,
MatTableModule,
MatPaginatorModule,
MatSidenavModule,
MatFormFieldModule,
MatAutocompleteModule,
Expand Down
10 changes: 9 additions & 1 deletion src/app/doubtfire-angularjs.module.ts
Original file line numberDiff line numberDiff line change
Expand Up@@ -108,7 +108,7 @@ import 'build/src/app/units/states/rollover/directives/unit-dates-selector/unit-
import 'build/src/app/units/states/rollover/directives/directives.js';
import 'build/src/app/units/states/rollover/rollover.js';
import 'build/src/app/units/states/index/index.js';
import 'build/src/app/units/states/students-list/students-list.js';
import { FStudentsListComponent } from './units/states/students-list/students-list.component';
import 'build/src/app/units/states/analytics/analytics.js';
import 'build/src/app/common/filters/filters.js';
import 'build/src/app/common/content-editable/content-editable.js';
Expand DownExpand Up@@ -446,6 +446,14 @@ DoubtfireAngularJSModule.directive(
);
DoubtfireAngularJSModule.directive('fUnits', downgradeComponent({component: FUnitsComponent}));

DoubtfireAngularJSModule.directive(
'fStudentsList',
downgradeComponent({
component: FStudentsListComponent,
inputs: ['unit', 'tutor']
})
)

// Global configuration
DoubtfireAngularJSModule.directive(
'taskCommentsViewer',
Expand Down
42 changes: 41 additions & 1 deletion src/app/doubtfire.states.ts
Original file line numberDiff line numberDiff line change
Expand Up@@ -9,11 +9,15 @@ import { UnauthorisedComponent } from './errors/states/unauthorised/unauthorised
import {FUsersComponent} from './admin/states/users/users.component';
import {FUnitsComponent} from './admin/states/units/units.component';
import {ProjectDashboardComponent} from './projects/states/dashboard/project-dashboard/project-dashboard.component';
import {UnitRootState} from './units/unit-root-state.component';
import {ProjectRootState} from './projects/states/project-root-state.component';
import { TaskViewerState } from './units/task-viewer/task-viewer-state.component';
import {ScormPlayerComponent} from './common/scorm-player/scorm-player.component';
import { Ng2ViewDeclaration } from '@uirouter/angular';
import { FStudentsListComponent } from './units/states/students-list/students-list.component';
import {UnitService} from 'src/app/api/services/unit.service';
import { UserService } from 'src/app/api/services/user.service';
import { Transition } from '@uirouter/core';
import { UnitRootState } from './units/unit-root-state.component';

/*
* Use this file to store any states that are sourced by angular components.
Expand DownExpand Up@@ -52,6 +56,41 @@ const usersState: NgHybridStateDeclaration = {
},
};

export const studentsListState: NgHybridStateDeclaration = {
name: 'units/students/list',
parent: 'unit-root-state',
url: '/students',

views: {
unitView: {
component: FStudentsListComponent,
bindings: {
unit: 'unit',
tutor: 'tutor'
}
}
},

resolve: [
{
token: 'unit',
deps: [UnitService, Transition],
resolveFn: (us: UnitService, trans: Transition) =>
us.get(trans.params().unitId).toPromise()
},
{
token: 'tutor',
deps: ['unit', UserService],
resolveFn: (unit: any, userSvc: UserService) =>
!!unit && unit.unitRole?.role === 'Tutor'
}
],

data: {
pageTitle: 'Students',
roleWhitelist: ['Admin', 'Convenor', 'Tutor', 'Auditor']
}
};
/**
* Define the new home state.
*/
Expand DownExpand Up@@ -422,6 +461,7 @@ export const doubtfireStates = [
EditProfileState,
EulaState,
usersState,
studentsListState,
ViewAllProjectsState,
ViewAllUnits,
AdministerUnits,
Expand Down
1 change: 0 additions & 1 deletion src/app/units/states/states.coffee
Original file line numberDiff line numberDiff line change
Expand Up@@ -4,7 +4,6 @@ angular.module('doubtfire.units.states', [
'doubtfire.units.states.edit'
'doubtfire.units.states.tasks'
'doubtfire.units.states.groups'
'doubtfire.units.states.students'
'doubtfire.units.states.analytics'
'doubtfire.units.states.portfolios'
'doubtfire.units.states.rollover'
Expand Down
123 changes: 0 additions & 123 deletions src/app/units/states/students-list/students-list.coffee

This file was deleted.

Loading