Skip to content

Commit

Permalink
migrate test-run module
Browse files Browse the repository at this point in the history
  • Loading branch information
coolchock committed Nov 29, 2024
1 parent 5f2e030 commit 6f4cd0a
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 15 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Component, OnInit } from '@angular/core';
import { Component, OnInit, inject } from '@angular/core';
import { NgbActiveModal } from '@ng-bootstrap/ng-bootstrap';
import { StudentExam } from 'app/entities/student-exam.model';
import { Exam } from 'app/entities/exam/exam.model';
Expand All @@ -14,15 +14,13 @@ import { ArtemisDurationFromSecondsPipe } from 'app/shared/pipes/artemis-duratio
styles: ['.table tr.active td { background-color:#3e8acc; color: white; }'],
})
export class CreateTestRunModalComponent implements OnInit {
private activeModal = inject(NgbActiveModal);
private artemisDurationFromSecondsPipe = inject(ArtemisDurationFromSecondsPipe);

exam: Exam;
workingTimeForm: FormGroup;
testRunConfiguration: { [id: number]: Exercise } = {};

constructor(
private activeModal: NgbActiveModal,
private artemisDurationFromSecondsPipe: ArtemisDurationFromSecondsPipe,
) {}

ngOnInit(): void {
this.initWorkingTimeForm();
this.ignoreEmptyExerciseGroups();
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Component, OnInit } from '@angular/core';
import { Component, OnInit, inject } from '@angular/core';
import { ActivatedRoute } from '@angular/router';
import { Course } from 'app/entities/course.model';
import { StudentExam } from 'app/entities/student-exam.model';
Expand All @@ -20,6 +20,13 @@ import { faSort, faTimes } from '@fortawesome/free-solid-svg-icons';
templateUrl: './test-run-management.component.html',
})
export class TestRunManagementComponent implements OnInit {
private route = inject(ActivatedRoute);
private alertService = inject(AlertService);
private examManagementService = inject(ExamManagementService);
private accountService = inject(AccountService);
private sortService = inject(SortService);
private modalService = inject(NgbModal);

course: Course;
exam: Exam;
isLoading: boolean;
Expand All @@ -35,14 +42,7 @@ export class TestRunManagementComponent implements OnInit {
faSort = faSort;
faTimes = faTimes;

constructor(
private route: ActivatedRoute,
private alertService: AlertService,
private examManagementService: ExamManagementService,
private accountService: AccountService,
private sortService: SortService,
private modalService: NgbModal,
) {
constructor() {
this.predicate = 'id';
this.ascending = true;
}
Expand Down

0 comments on commit 6f4cd0a

Please sign in to comment.