Skip to content

Commit

Permalink
Inject for course lti comps
Browse files Browse the repository at this point in the history
  • Loading branch information
raffifasaro committed Nov 30, 2024
1 parent e751ddd commit cfc30cc
Show file tree
Hide file tree
Showing 2 changed files with 11 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 { ActivatedRoute } from '@angular/router';
import { Course } from 'app/entities/course.model';
import { OnlineCourseConfiguration } from 'app/entities/online-course-configuration.model';
Expand All @@ -12,6 +12,10 @@ import { SortService } from 'app/shared/service/sort.service';
templateUrl: './course-lti-configuration.component.html',
})
export class CourseLtiConfigurationComponent implements OnInit {
private route = inject(ActivatedRoute);
private sortService = inject(SortService);
private courseManagementService = inject(CourseManagementService);

protected readonly Object = Object;

course: Course;
Expand All @@ -29,12 +33,6 @@ export class CourseLtiConfigurationComponent implements OnInit {
faExclamationTriangle = faExclamationTriangle;
faWrench = faWrench;

constructor(
private route: ActivatedRoute,
private sortService: SortService,
private courseManagementService: CourseManagementService,
) {}

/**
* Gets the configuration for the course encoded in the route and fetches the exercises
*/
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Component, ElementRef, OnInit, ViewChild } from '@angular/core';
import { Component, ElementRef, OnInit, ViewChild, inject } from '@angular/core';
import { ActivatedRoute, Router } from '@angular/router';
import { Course } from 'app/entities/course.model';
import { finalize } from 'rxjs';
Expand All @@ -19,6 +19,11 @@ import { combineLatest } from 'rxjs';
templateUrl: './edit-course-lti-configuration.component.html',
})
export class EditCourseLtiConfigurationComponent implements OnInit {
private route = inject(ActivatedRoute);
private courseService = inject(CourseManagementService);
private router = inject(Router);
private ltiConfigurationService = inject(LtiConfigurationService);

@ViewChild('scrollableContent') scrollableContent: ElementRef;

course: Course;
Expand All @@ -37,13 +42,6 @@ export class EditCourseLtiConfigurationComponent implements OnInit {
faBan = faBan;
faSave = faSave;

constructor(
private route: ActivatedRoute,
private courseService: CourseManagementService,
private router: Router,
private ltiConfigurationService: LtiConfigurationService,
) {}

/**
* Gets the configuration for the course encoded in the route and prepares the form
*/
Expand Down

0 comments on commit cfc30cc

Please sign in to comment.