0 && ctx.valid"
+ >
diff --git a/src/app/home.component.scss b/src/app/home.component.scss
index 47fef6ac..e8f5e00a 100644
--- a/src/app/home.component.scss
+++ b/src/app/home.component.scss
@@ -13,3 +13,7 @@
cds-icon[shape='clock'] {
color: black;
}
+
+.course-container {
+ width: 100%;
+}
diff --git a/src/app/services/verification.service.ts b/src/app/services/verification.service.ts
index 8282a2c8..10440b12 100644
--- a/src/app/services/verification.service.ts
+++ b/src/app/services/verification.service.ts
@@ -10,6 +10,7 @@ import { BehaviorSubject, throwError } from 'rxjs';
import { catchError, tap } from 'rxjs/operators';
import { HttpErrorResponse } from '@angular/common/http';
import { VMService } from './vm.service';
+import { atou } from '../unicode';
@Injectable()
export class VerificationService {
@@ -98,7 +99,7 @@ export class VerificationService {
private publishNewVerificationResults(response: ServerResponse) {
const newVerificationList = JSON.parse(
- decodeResponse(response.content),
+ atou(response.content),
) as unknown as TaskVerificationResponse[];
newVerificationList.forEach(
(newTaskVerification: TaskVerificationResponse) => {
@@ -120,14 +121,3 @@ export class VerificationService {
this._verifications.next(this._verifications.value);
}
}
-
-function decodeResponse(responseContent: string) {
- const text = atob(responseContent);
- const length = text.length;
- const bytes = new Uint8Array(length);
- for (let i = 0; i < length; i++) {
- bytes[i] = text.charCodeAt(i);
- }
- const decoder = new TextDecoder(); // default is utf-8
- return decoder.decode(bytes);
-}
diff --git a/src/app/unicode.ts b/src/app/unicode.ts
index 6df32a99..4d684462 100644
--- a/src/app/unicode.ts
+++ b/src/app/unicode.ts
@@ -1,5 +1,12 @@
export function atou(b64: string) {
- return decodeURIComponent(escape(atob(b64)));
+ const text = atob(b64);
+ const length = text.length;
+ const bytes = new Uint8Array(length);
+ for (let i = 0; i < length; i++) {
+ bytes[i] = text.charCodeAt(i);
+ }
+ const decoder = new TextDecoder(); // default is utf-8
+ return decoder.decode(bytes);
}
export function utoa(data: string) {