This repository has been archived by the owner on Feb 10, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Design improvements overall, continued work on assignment workflow
- Added landing page, fixes #18 - Added about and help pages - Added description to assignment creation, #17 - Added submission exceptions (WIP) - Added course landing pages in all views - Changed naming convention, grades -> courses, fixes #24 - Added inactive courses to data model - Fixed nav-menu-link to use RouterModule - Started work on #23, #25, #26
- Loading branch information
1 parent
79580bf
commit fa3c1b3
Showing
65 changed files
with
981 additions
and
193 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,69 @@ | ||
<div class="md-padding" *ngIf="course" fxLayout="column"> | ||
<a class="mat-caption" routerLink="../">Back</a> | ||
<h2 class="mat-heading">{{course['name']}}</h2> | ||
|
||
<h4 class="mat-heading">Course Actions</h4> | ||
<md-card fxLayout="row" fxLayoutGap="20px"> | ||
<button md-raised-button color="primary" routerLink="create">ADD</button> | ||
<button md-raised-button color="primary">GRADEBOOK</button> | ||
<button md-raised-button color="primary">GRADERS</button> | ||
<button md-raised-button color="primary">CALENDAR</button> | ||
</md-card> | ||
|
||
<span fxFlex="10px"></span> | ||
|
||
<h4 class="mat-heading">Assignments</h4> | ||
<div fxLayout="column" fxLayoutGap="35px"> | ||
<md-card fxLayout="row" fxLayout="row" *ngFor="let assign of course['assigns']" fxLayoutGap="20px" | ||
md-ripple class="admin-box" routerLink="{{assign}}"> | ||
<div fxLayout="column" fxLayoutGap="5px" fxLayoutAlign="center center"> | ||
<div class="mat-caption"> | ||
Name | ||
</div> | ||
<div class="mat-body-2"> | ||
{{assign}} | ||
</div> | ||
</div> | ||
<div fxLayout="column" fxLayoutGap="5px" fxLayoutAlign="center center"> | ||
<div class="mat-caption"> | ||
Submissions | ||
</div> | ||
<div class="mat-body-2"> | ||
25 | ||
</div> | ||
</div> | ||
<div fxLayout="column" fxLayoutGap="5px" fxLayoutAlign="center center"> | ||
<div class="mat-caption"> | ||
Complete | ||
</div> | ||
<div class="mat-body-2"> | ||
12 | ||
</div> | ||
</div> | ||
<div fxLayout="column" fxLayoutGap="5px" fxLayoutAlign="center center"> | ||
<div class="mat-caption"> | ||
Remaining | ||
</div> | ||
<div class="mat-body-2"> | ||
13 | ||
</div> | ||
</div> | ||
<div fxLayout="column" fxLayoutGap="5px" fxLayoutAlign="center center"> | ||
<div class="mat-caption"> | ||
Start Date | ||
</div> | ||
<div class="mat-body-2"> | ||
Thurs Jan 13, 2017 12:12pm | ||
</div> | ||
</div> | ||
<div fxLayout="column" fxLayoutGap="5px" fxLayoutAlign="center center"> | ||
<div class="mat-caption"> | ||
End Date | ||
</div> | ||
<div class="mat-body-2"> | ||
Fri Jan 14, 2017 12:15pm | ||
</div> | ||
</div> | ||
</md-card> | ||
</div> | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
.admin-box { | ||
cursor: pointer; | ||
outline: none; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
import { async, ComponentFixture, TestBed } from '@angular/core/testing'; | ||
|
||
import { AdminCourseComponent } from './admin-course.component'; | ||
|
||
describe('AdminCourseComponent', () => { | ||
let component: AdminCourseComponent; | ||
let fixture: ComponentFixture<AdminCourseComponent>; | ||
|
||
beforeEach(async(() => { | ||
TestBed.configureTestingModule({ | ||
declarations: [ AdminCourseComponent ] | ||
}) | ||
.compileComponents(); | ||
})); | ||
|
||
beforeEach(() => { | ||
fixture = TestBed.createComponent(AdminCourseComponent); | ||
component = fixture.componentInstance; | ||
fixture.detectChanges(); | ||
}); | ||
|
||
it('should be created', () => { | ||
expect(component).toBeTruthy(); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
import {Component, OnDestroy, OnInit} from '@angular/core'; | ||
import {UserService} from '../../shared/services/user.service'; | ||
import {Subject} from 'rxjs/Subject'; | ||
import {takeUntil} from 'rxjs/operator/takeUntil'; | ||
import {ActivatedRoute} from '@angular/router'; | ||
|
||
@Component({ | ||
selector: 'vg-admin-course', | ||
templateUrl: './admin-course.component.html', | ||
styleUrls: ['./admin-course.component.scss'] | ||
}) | ||
export class AdminCourseComponent implements OnInit, OnDestroy { | ||
|
||
courses = this._userService.admin; | ||
|
||
private _course: string; | ||
private _courses = []; | ||
private _destroy = new Subject<void>(); | ||
|
||
constructor( | ||
private _userService: UserService, | ||
private _route: ActivatedRoute | ||
) { } | ||
|
||
ngOnInit() { | ||
takeUntil.call(this._route.params, this._destroy).subscribe(params => { | ||
this._course = params['course']; | ||
}); | ||
takeUntil.call(this.courses, this._destroy).subscribe(data => { | ||
this._courses = data; | ||
}); | ||
} | ||
|
||
ngOnDestroy() { | ||
this._destroy.next(); | ||
this._destroy.complete(); | ||
} | ||
|
||
get course() { | ||
return this._courses.find(a => a['name'] === this._course); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,26 +1,42 @@ | ||
<div fxLayout="column" class="md-padding"> | ||
<div fxLayout="column" class="md-padding" fxLayoutGap="25px"> | ||
<div *ngFor="let course of courses | async"> | ||
<h1>{{course.name}}</h1> | ||
<div fxLayoutWrap fxLayoutAlign="start stretch" fxLayoutGap="20px"> | ||
<h3 *ngIf="course.assigns.length === 0">No assignments available</h3> | ||
<md-card fxLayout="column" fxLayoutAlign="center center" fxLayoutGap="10px"> | ||
<button md-raised-button color="primary" routerLink="{{course.name}}/create">CREATE</button> | ||
<button md-raised-button color="primary" routerLink="{{course.name}}/manage">MANAGE</button> | ||
</md-card> | ||
<md-card *ngFor="let assign of course.assigns"> | ||
<md-card-header> | ||
<md-card-title><h3>{{assign}}</h3></md-card-title> | ||
<md-card-subtitle>n submissions remaining</md-card-subtitle> | ||
</md-card-header> | ||
<md-card-content> | ||
<md-progress-bar color="primary" mode="determinate" [value]="37"></md-progress-bar> | ||
</md-card-content> | ||
<md-card-actions> | ||
<button md-raised-button color="primary" routerLink="{{course.name}}/{{assign}}">VIEW</button> | ||
<span fxFlex></span> | ||
<button md-button>STATS</button> | ||
</md-card-actions> | ||
</md-card> | ||
</div> | ||
<md-card fxLayout="row" | ||
fxLayoutAlign="start center" | ||
fxLayoutGap="40px" | ||
md-ripple | ||
class="admin-box" | ||
routerLink="{{course['name']}}"> | ||
<div fxLayout="column" fxLayoutGap="5px" fxLayoutAlign="center center"> | ||
<div class="mat-caption"> | ||
Name | ||
</div> | ||
<div class="mat-body-2"> | ||
{{course['name']}} | ||
</div> | ||
</div> | ||
<div fxLayout="column" fxLayoutGap="5px" fxLayoutAlign="center center"> | ||
<div class="mat-caption"> | ||
Assignments | ||
</div> | ||
<div class="mat-body-2"> | ||
{{course['assigns'].length}} | ||
</div> | ||
</div> | ||
<div fxLayout="column" fxLayoutGap="5px" fxLayoutAlign="center center"> | ||
<div class="mat-caption"> | ||
Enrollment | ||
</div> | ||
<div class="mat-body-2"> | ||
97 | ||
</div> | ||
</div> | ||
<span fxFlex></span> | ||
<div> | ||
<button md-raised-button>GRADEBOOK</button> | ||
</div> | ||
<div> | ||
<button md-raised-button routerLink="{{course['name']}}/create">ADD</button> | ||
</div> | ||
</md-card> | ||
</div> | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
.admin-box { | ||
cursor: pointer; | ||
outline: none; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.