Commit 5c84ffca authored by Aaron Wells's avatar Aaron Wells Committed by Gerrit Code Review
Browse files

Merge "Bug 1625380: Stopping an annotation being set to another standard"

parents 0a8efb5d 70a3b094
...@@ -250,7 +250,14 @@ class PluginBlocktypeAnnotation extends MaharaCoreBlocktype { ...@@ -250,7 +250,14 @@ class PluginBlocktypeAnnotation extends MaharaCoreBlocktype {
'options' => array(), 'options' => array(),
); );
foreach ($standard->options as $option) { foreach ($standard->options as $option) {
$selectoptions[$standard->id]['options'][$option->id] = $option->name; // We are not allowed to change standard if either the assement has changed
// from initial state and/or there is feedback on the annotation
if ($evidence && $evidence->element && ((int) $evidence->state !== Framework::EVIDENCE_BEGUN || $textreadonly)) {
$selectoptions[$standard->id]['options'][$option->id] = array('value' => $option->name, 'disabled' => (!($evidence->element == $option->id)));
}
else {
$selectoptions[$standard->id]['options'][$option->id] = $option->name;
}
$selectdescriptions[$option->id] = $option->description; $selectdescriptions[$option->id] = $option->description;
} }
} }
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment