MOBILE-2588 assign: Show raw grade in input instead of gradebook grade
parent
50e885ec74
commit
b9f79efcf3
|
@ -173,6 +173,13 @@
|
||||||
<p item-content *ngIf="!canSaveGrades || !outcome.itemNumber">{{ outcome.selected }}</p>
|
<p item-content *ngIf="!canSaveGrades || !outcome.itemNumber">{{ outcome.selected }}</p>
|
||||||
</ion-item>
|
</ion-item>
|
||||||
|
|
||||||
|
<!-- Gradebook grade for simple grading. -->
|
||||||
|
<ion-item text-wrap *ngIf="grade.method == 'simple'">
|
||||||
|
<h2>{{ 'addon.mod_assign.currentgrade' | translate }}</h2>
|
||||||
|
<p *ngIf="grade.gradebookGrade !== false && grade.gradebookGrade !== null">{{ grade.gradebookGrade }}</p>
|
||||||
|
<p *ngIf="grade.gradebookGrade === false || grade.gradebookGrade === null">-</p>
|
||||||
|
</ion-item>
|
||||||
|
|
||||||
<addon-mod-assign-feedback-plugin *ngFor="let plugin of feedback.plugins" [assign]="assign" [submission]="userSubmission" [userId]="submitId" [plugin]="plugin" [canEdit]="canSaveGrades"></addon-mod-assign-feedback-plugin>
|
<addon-mod-assign-feedback-plugin *ngFor="let plugin of feedback.plugins" [assign]="assign" [submission]="userSubmission" [userId]="submitId" [plugin]="plugin" [canEdit]="canSaveGrades"></addon-mod-assign-feedback-plugin>
|
||||||
|
|
||||||
<!-- Workflow status. -->
|
<!-- Workflow status. -->
|
||||||
|
|
|
@ -465,6 +465,7 @@ export class AddonModAssignSubmissionComponent implements OnInit, OnDestroy {
|
||||||
this.grade = {
|
this.grade = {
|
||||||
method: false,
|
method: false,
|
||||||
grade: false,
|
grade: false,
|
||||||
|
gradebookGrade: false,
|
||||||
modified: 0,
|
modified: 0,
|
||||||
gradingStatus: false,
|
gradingStatus: false,
|
||||||
addAttempt : false,
|
addAttempt : false,
|
||||||
|
@ -504,6 +505,8 @@ export class AddonModAssignSubmissionComponent implements OnInit, OnDestroy {
|
||||||
if (feedback.grade && feedback.grade.grade && !this.grade.grade) {
|
if (feedback.grade && feedback.grade.grade && !this.grade.grade) {
|
||||||
const parsedGrade = parseFloat(feedback.grade.grade);
|
const parsedGrade = parseFloat(feedback.grade.grade);
|
||||||
this.grade.grade = parsedGrade || parsedGrade == 0 ? parsedGrade : null;
|
this.grade.grade = parsedGrade || parsedGrade == 0 ? parsedGrade : null;
|
||||||
|
this.grade.gradebookGrade = this.grade.grade;
|
||||||
|
this.originalGrades.grade = this.grade.grade;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
// If no feedback, always show Submission.
|
// If no feedback, always show Submission.
|
||||||
|
@ -813,14 +816,14 @@ export class AddonModAssignSubmissionComponent implements OnInit, OnDestroy {
|
||||||
|
|
||||||
// Not using outcomes or scale, get the numeric grade.
|
// Not using outcomes or scale, get the numeric grade.
|
||||||
if (this.grade.scale) {
|
if (this.grade.scale) {
|
||||||
this.grade.grade = this.gradesHelper.getGradeValueFromLabel(this.grade.scale, grade.gradeformatted);
|
this.grade.gradebookGrade = this.gradesHelper.getGradeValueFromLabel(
|
||||||
|
this.grade.scale, grade.gradeformatted);
|
||||||
} else {
|
} else {
|
||||||
const parsedGrade = parseFloat(grade.gradeformatted);
|
const parsedGrade = parseFloat(grade.gradeformatted);
|
||||||
this.grade.grade = parsedGrade || parsedGrade == 0 ? parsedGrade : null;
|
this.grade.gradebookGrade = parsedGrade || parsedGrade == 0 ? parsedGrade : null;
|
||||||
}
|
}
|
||||||
|
|
||||||
this.grade.modified = grade.gradedategraded;
|
this.grade.modified = grade.gradedategraded;
|
||||||
this.originalGrades.grade = this.grade.grade;
|
|
||||||
} else if (grade.outcomeid) {
|
} else if (grade.outcomeid) {
|
||||||
|
|
||||||
// Only show outcomes with info on it, outcomeid could be null if outcomes are disabled on site.
|
// Only show outcomes with info on it, outcomeid could be null if outcomes are disabled on site.
|
||||||
|
|
Loading…
Reference in New Issue