Skip to content

Commit

Permalink
feat(frontend): Improve Moss form information and add quick email link
Browse files Browse the repository at this point in the history
  • Loading branch information
Clashsoft committed Sep 24, 2023
1 parent f5ce03a commit f7f8e5b
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,21 @@
<input type="number" class="form-control" id="mossIdInput" placeholder="123456789"
[(ngModel)]="classroom.mossId" (change)="context.saveDraft()">
<div class="form-text">
Your Moss User ID. See "Registering for Moss" in the Moss documentation to obtain it.
Your Moss User ID.
See "Registering for Moss" in the Moss documentation to obtain it.
Or
<a [href]="'mailto:[email protected]?subject=Moss%20User%20ID%20Request&body=registeruser%0Amail%20' + email">send an email</a>
to request one.
</div>
</div>
<div class="mb-3">
<label class="form-label" for="mossIdInput">Moss Language</label>
<label class="form-label" for="mossLanguageInput">Moss Language</label>
<select class="form-control" id="mossLanguageInput" [(ngModel)]="classroom.mossLanguage" (change)="context.saveDraft()">
<option *ngFor="let lang of mossLanguages | keyvalue" [value]="lang.key">{{ lang.value }}</option>
</select>
<div class="form-text">
Language to use for Moss duplicate analysis.
See our list of <a href="https://github.com/fujaba/fulib.org/issues/326" target="_blank">supported languages</a>
if you need a Moss-supported language that is not listed here.
</div>
</div>
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import {Component} from '@angular/core';
import {AssignmentContext} from "../../../services/assignment.context";
import {ClassroomInfo} from "../../../model/assignment";
import {ConfigService} from "../../../services/config.service";

@Component({
selector: 'app-plagiarism-detection',
Expand All @@ -9,6 +10,7 @@ import {ClassroomInfo} from "../../../model/assignment";
})
export class PlagiarismDetectionComponent {
classroom: ClassroomInfo;
email: string;

mossLanguages = {
java: 'Java',
Expand All @@ -21,7 +23,9 @@ export class PlagiarismDetectionComponent {

constructor(
readonly context: AssignmentContext,
private configService: ConfigService,
) {
this.email = configService.get('email');
this.classroom = context.assignment.classroom ||= {};
}
}

0 comments on commit f7f8e5b

Please sign in to comment.