Skip to content
This repository has been archived by the owner on Apr 16, 2024. It is now read-only.

Commit

Permalink
Merge remote-tracking branch 'origin/feature/#582-unit-visibility-tog…
Browse files Browse the repository at this point in the history
…gle-2' into feature/#582-unit-visibility-toggle-2
  • Loading branch information
Patrick Skowronek committed May 4, 2018
2 parents b986bf5 + a9c45aa commit 18e8896
Show file tree
Hide file tree
Showing 5 changed files with 34 additions and 12 deletions.
11 changes: 7 additions & 4 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,16 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
- Added an account activation resend feature. [#601](https://github.com/h-da/geli/issues/601)
- Added `SnackBarService` as wrapper for `MatSnackBar`. [#574](https://github.com/h-da/geli/issues/574)
- Added new course & user API unit tests. [#654](https://github.com/h-da/geli/issues/654) [#691](https://github.com/h-da/geli/issues/691)
- Added details of courseAdmin and teacher to course detail view. on click profiles are shown.[#598] (https://github.com/h-da/geli/issues/598)
- Added details of courseAdmin and teacher to course detail view. on click profiles are shown.[#598](https://github.com/h-da/geli/issues/598)
- Added small auto linting scripts to package.json [#688](https://github.com/h-da/geli/issues/688)
- Added changed size of drop down arrows for better usability. [#686] (https://github.com/h-da/geli/issues/686)
- Added changed size of drop down arrows for better usability. [#686](https://github.com/h-da/geli/issues/686)
- Added icon for access key [#547](https://github.com/h-da/geli/issues/574)

### Changed
- Refactored or slightly altered various course & user related APIs. [#654](https://github.com/h-da/geli/issues/654) [#691](https://github.com/h-da/geli/issues/691)
- Refactored the unitCreator with a forsafe user object. [#717](https://github.com/h-da/geli/pull/717)
- Removed firstname from resend activation feature and change button positioning. [#711] (https://github.com/h-da/geli/issues/711)
- Refactored register and resend activation to use geli email validator with top level domain check. [#713] (https://github.com/h-da/geli/issues/713)
- Removed firstname from resend activation feature and change button positioning. [#711](https://github.com/h-da/geli/issues/711)
- Refactored register and resend activation to use geli email validator with top level domain check. [#713](https://github.com/h-da/geli/issues/713)

### Fixed
- Fixed Course progress mechanism
Expand All @@ -35,6 +36,8 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
- Repair Angular CLI code generation. [#701](https://github.com/h-da/geli/pull/701)
- Fixed `tsconfig.spec.ts` for `ng test`. [#656](https://github.com/h-da/geli/pull/656)
- Fixed `.travis.yml`. [#706](https://github.com/h-da/geli/pull/706)
- Fixed wording of progress display on profile page. [#715](https://github.com/h-da/geli/issues/715)
- Fixed form validator in create task [#579](https://github.com/h-da/geli/issues/579)

### Added
- Unit visibility toggle [#582](https://github.com/h-da/geli/issues/582)
Expand Down
4 changes: 2 additions & 2 deletions api/src/controllers/ReportController.ts
Original file line number Diff line number Diff line change
Expand Up @@ -577,9 +577,9 @@ export class ReportController {
.map(({courseObj, progressableUnitCount}: any) => {
const progressStats = this.calculateProgress(userProgressData, progressableUnitCount, courseObj);
courseObj.progressData = [
{ name: 'nothing', value: progressStats.nothing },
{ name: 'not tried', value: progressStats.nothing },
{ name: 'tried', value: progressStats.tried },
{ name: 'done', value: progressStats.done }
{ name: 'solved', value: progressStats.done }
];
return courseObj;
})
Expand Down
25 changes: 22 additions & 3 deletions app/webFrontend/src/app/course/course.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,20 @@
{{course.description}}
</p>
</mat-card-content>
<mat-card-actions >
<mat-card-actions>
<span class="course-admin-actions" *ngIf="this.course.userCanEditCourse">
<button mat-icon-button (click)="editCourse(course._id)">
<mat-icon>mode_edit</mat-icon>
</button>

<button mat-icon-button (click)="showReport(course._id)">
<mat-icon>show_chart</mat-icon>
</button>

<button mat-icon-button *ngIf="!course.active" disabled>
<mat-icon color="warn">visibility_off</mat-icon>
</button>
</span>
<span class="course-admin-actions" *ngIf="course.userCanEditCourse">
<button mat-icon-button (click)="editCourse(course._id)">
<mat-icon>mode_edit</mat-icon>
Expand All @@ -23,17 +36,23 @@
</button>
</span>
<span class="course-student-actions" *ngIf="this.userService.isStudent()">
<div style="float:left">
<i class="material-icons" style="margin-top: 8px;"
matTooltip="Key Required"
*ngIf="course.enrollType === 'accesskey'">lock</i>
<i class="material-icons" style="margin-top: 8px;"
matTooltip="No Key Required"
*ngIf="course.enrollType !== 'accesskey'">lock_open</i>
</div>
<button mat-icon-button *ngIf="!course.userIsCourseMember"
(click)="enroll()" matTooltip="Enroll">
<mat-icon>add_circle_outline</mat-icon>
</button>

<button mat-icon-button *ngIf="course.userIsCourseMember"
(click)="leave()" matTooltip="Leave">
<mat-icon>remove_circle_outline</mat-icon>
</button>
</span>

<button mat-mini-fab *ngIf="course.userCanViewCourse"
color="primary" class="details-button" [routerLink]="['course', course._id]">
<mat-icon>arrow_forward</mat-icon>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

<div *ngFor="let task of model.tasks" class="question-answer">
<mat-form-field matLine class="question">
<textarea matInput id="name" placeholder="Enter question here" [(ngModel)]="task.name"></textarea>
<textarea matInput id="name" placeholder="Enter question here *" [(ngModel)]="task.name"></textarea>
</mat-form-field>

<button mat-button class="remove" (click)="removeTask(task)">
Expand All @@ -21,7 +21,7 @@
<div class="check-answer">
<mat-checkbox [(ngModel)]="answer.value" name="value_{{idx}}"></mat-checkbox>
<mat-form-field>
<input matInput placeholder="Enter answer here" [(ngModel)]="answer.text">
<input matInput placeholder="Enter answer here *" [(ngModel)]="answer.text">
</mat-form-field>
<button mat-button class="remove" (click)="removeAnswer(task, idx)" matTooltip="Remove answer">
<mat-icon>delete</mat-icon>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ export class UnitGeneralInfoFormComponent implements OnInit {
}
this.form = this.formBuilder.group({
name: [this.model ? this.model.name : '', Validators.required],
description: [this.model ? this.model.description : '', Validators.required],
description: [this.model ? this.model.description : ''],
deadline: [this.model ? this.model.deadline : ''],
visible: [this.model ? this.model.visible : false]
});
Expand Down

0 comments on commit 18e8896

Please sign in to comment.