MDL-52132 core_question: Comment is different if format has changed
This commit is contained in:
committed by
Shamim Rezaie
parent
305d2716f6
commit
f93e2c5c1e
@@ -392,11 +392,20 @@ abstract class question_behaviour {
|
||||
$previouscomment = $this->qa->get_last_behaviour_var('comment');
|
||||
$newcomment = $pendingstep->get_behaviour_var('comment');
|
||||
|
||||
if (is_null($previouscomment) && !html_is_blank($newcomment) ||
|
||||
$previouscomment != $newcomment) {
|
||||
if ($previouscomment != $newcomment) {
|
||||
// The comment has changed.
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!html_is_blank($newcomment)) {
|
||||
// Check comment format.
|
||||
$previouscommentformat = $this->qa->get_last_behaviour_var('commentformat');
|
||||
$newcommentformat = $pendingstep->get_behaviour_var('commentformat');
|
||||
if ($previouscommentformat != $newcommentformat) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
// So, now we know the comment is the same, so check the mark, if present.
|
||||
$previousfraction = $this->qa->get_fraction();
|
||||
$newmark = question_utils::clean_param_mark($pendingstep->get_behaviour_var('mark'));
|
||||
|
||||
Reference in New Issue
Block a user