Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
mahara
mahara
Commits
5c84ffca
Commit
5c84ffca
authored
Oct 18, 2016
by
Aaron Wells
Committed by
Gerrit Code Review
Oct 18, 2016
Browse files
Merge "Bug 1625380: Stopping an annotation being set to another standard"
parents
0a8efb5d
70a3b094
Changes
1
Hide whitespace changes
Inline
Side-by-side
htdocs/artefact/annotation/blocktype/annotation/lib.php
View file @
5c84ffca
...
...
@@ -250,7 +250,14 @@ class PluginBlocktypeAnnotation extends MaharaCoreBlocktype {
'options'
=>
array
(),
);
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
;
}
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment