From 846d9e084f7ed7febf821da31b2030a7e8dc06ea Mon Sep 17 00:00:00 2001 From: dezhidki Date: Wed, 26 Feb 2025 16:41:21 +0200 Subject: [PATCH] AngularPluginBase: make plugins automatically readonly in answer review mode --- .../static/scripts/tim/plugin/angular-plugin-base.directive.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/timApp/static/scripts/tim/plugin/angular-plugin-base.directive.ts b/timApp/static/scripts/tim/plugin/angular-plugin-base.directive.ts index bab36ef4e9..edb3ac7d52 100644 --- a/timApp/static/scripts/tim/plugin/angular-plugin-base.directive.ts +++ b/timApp/static/scripts/tim/plugin/angular-plugin-base.directive.ts @@ -22,6 +22,7 @@ import {isLeft} from "fp-ts/Either"; import {getErrors} from "tim/plugin/errors"; import {vctrlInstance} from "tim/document/viewctrlinstance"; import type {ChangeType, ViewCtrl} from "tim/document/viewctrl"; +import {Users} from "tim/user/userService"; /** * Plugin with initialization data passed from the server via JSON. @@ -103,7 +104,7 @@ export abstract class AngularPluginBase< if (this.markup.readonly !== undefined) { return this.markup.readonly; } - return this.attrsall.access === "readonly"; + return this.attrsall.access === "readonly" || Users.isInAnswerReview; } constructor(