Skip to content

Commit

Permalink
Standalone migration
Browse files Browse the repository at this point in the history
  • Loading branch information
raffifasaro committed Nov 29, 2024
1 parent 41aa1f8 commit 56dae8c
Show file tree
Hide file tree
Showing 7 changed files with 35 additions and 2 deletions.
5 changes: 5 additions & 0 deletions src/main/webapp/app/lti/lti-course-card.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,16 @@ import { Component, Input, OnChanges } from '@angular/core';
import { Course } from 'app/entities/course.model';
import { ARTEMIS_DEFAULT_COLOR } from 'app/app.constants';
import { CachingStrategy } from 'app/shared/image/secured-image.component';
import { RouterLink } from '@angular/router';
import { NgStyle } from '@angular/common';
import { ArtemisSharedModule } from 'app/shared/shared.module';

@Component({
selector: 'jhi-overview-lti-course-card',
templateUrl: './lti-course-card.component.html',
styleUrls: ['../overview/course-card.scss'],
standalone: true,
imports: [RouterLink, NgStyle, ArtemisSharedModule],
})
export class LtiCourseCardComponent implements OnChanges {
readonly ARTEMIS_DEFAULT_COLOR = ARTEMIS_DEFAULT_COLOR;
Expand Down
9 changes: 7 additions & 2 deletions src/main/webapp/app/lti/lti.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,13 @@ import { LtiCourseCardComponent } from 'app/lti/lti-course-card.component';
const LTI_LAUNCH_ROUTES = [...ltiLaunchState];

@NgModule({
imports: [RouterModule.forChild(LTI_LAUNCH_ROUTES), ArtemisCoreModule, ArtemisSharedModule, FormsModule, ArtemisSharedComponentModule, ArtemisSharedLibsModule],
declarations: [
imports: [
RouterModule.forChild(LTI_LAUNCH_ROUTES),
ArtemisCoreModule,
ArtemisSharedModule,
FormsModule,
ArtemisSharedComponentModule,
ArtemisSharedLibsModule,
Lti13ExerciseLaunchComponent,
Lti13DynamicRegistrationComponent,
Lti13DeepLinkingComponent,
Expand Down
8 changes: 8 additions & 0 deletions src/main/webapp/app/lti/lti13-deep-linking.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,18 @@ import { Course } from 'app/entities/course.model';
import { AlertService } from 'app/core/util/alert.service';
import { onError } from 'app/shared/util/global.utils';
import { SessionStorageService } from 'ngx-webstorage';
import { ArtemisSharedModule } from 'app/shared/shared.module';
import { TranslateDirective } from '../shared/language/translate.directive';
import { ArtemisSharedComponentModule } from '../shared/components/shared-component.module';
import { ArtemisSharedCommonModule } from '../shared/shared-common.module';
import { FaIconComponent } from '@fortawesome/angular-fontawesome';
import { FormsModule } from '@angular/forms';

@Component({
selector: 'jhi-deep-linking',
templateUrl: './lti13-deep-linking.component.html',
standalone: true,
imports: [ArtemisSharedModule, TranslateDirective, ArtemisSharedComponentModule, ArtemisSharedCommonModule, FaIconComponent, FormsModule],
})
export class Lti13DeepLinkingComponent implements OnInit {
courseId: number;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,13 @@
import { Component, OnInit } from '@angular/core';
import { ActivatedRoute } from '@angular/router';
import { HttpClient, HttpParams } from '@angular/common/http';
import { TranslateDirective } from '../shared/language/translate.directive';

@Component({
selector: 'jhi-dynamic-registration',
templateUrl: './lti13-dynamic-registration.component.html',
standalone: true,
imports: [TranslateDirective],
})
export class Lti13DynamicRegistrationComponent implements OnInit {
courseId: number;
Expand Down
3 changes: 3 additions & 0 deletions src/main/webapp/app/lti/lti13-exercise-launch.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import { captureException } from '@sentry/angular';
import { SessionStorageService } from 'ngx-webstorage';
import { LtiService } from 'app/shared/service/lti.service';
import { Theme, ThemeService } from 'app/core/theme/theme.service';
import { TranslateDirective } from '../shared/language/translate.directive';

type LtiLaunchResponse = {
targetLinkUri: string;
Expand All @@ -16,6 +17,8 @@ type LtiLaunchResponse = {
@Component({
selector: 'jhi-lti-exercise-launch',
templateUrl: './lti13-exercise-launch.component.html',
standalone: true,
imports: [TranslateDirective],
})
export class Lti13ExerciseLaunchComponent implements OnInit {
isLaunching: boolean;
Expand Down
5 changes: 5 additions & 0 deletions src/main/webapp/app/lti/lti13-select-content.component.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
import { Component, ElementRef, NgZone, OnInit, SecurityContext, ViewChild, inject } from '@angular/core';
import { ActivatedRoute } from '@angular/router';
import { DomSanitizer } from '@angular/platform-browser';
import { TranslateDirective } from '../shared/language/translate.directive';
import { FormsModule } from '@angular/forms';
import { ArtemisSharedPipesModule } from '../shared/pipes/shared-pipes.module';

/**
* Component responsible for sending deep linking content.
Expand All @@ -12,6 +15,8 @@ import { DomSanitizer } from '@angular/platform-browser';
@Component({
selector: 'jhi-select-exercise',
templateUrl: './lti13-select-content.component.html',
standalone: true,
imports: [TranslateDirective, FormsModule, ArtemisSharedPipesModule],
})
export class Lti13SelectContentComponent implements OnInit {
private route = inject(ActivatedRoute);
Expand Down
4 changes: 4 additions & 0 deletions src/main/webapp/app/lti/lti13-select-course.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,14 @@ import { CourseManagementService } from '../course/manage/course-management.serv
import { SessionStorageService } from 'ngx-webstorage';
import { OnlineCourseDtoModel } from 'app/lti/online-course-dto.model';
import { AlertService } from 'app/core/util/alert.service';
import { LtiCourseCardComponent } from './lti-course-card.component';
import { TranslateDirective } from '../shared/language/translate.directive';

@Component({
selector: 'jhi-lti-courses-overview',
templateUrl: './lti13-select-course.component.html',
standalone: true,
imports: [LtiCourseCardComponent, TranslateDirective],
})
export class LtiCoursesComponent implements OnInit {
public courses: OnlineCourseDtoModel[];
Expand Down

0 comments on commit 56dae8c

Please sign in to comment.