Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

MDL-15358 negative data between () merge from 1.9 as this file is no …

…more in HEAD
  • Loading branch information...
commit 232866f6c34e737c945b2365d21d35475cbc5032 1 parent a96dff4
pichetp authored
Showing with 3 additions and 0 deletions.
  1. +3 −0  question/type/datasetdependent/abstractqtype.php
3  question/type/datasetdependent/abstractqtype.php
View
@@ -79,6 +79,9 @@ function save_session_and_responses(&$question, &$state) {
function substitute_variables($str, $dataset) {
foreach ($dataset as $name => $value) {
+ if($value < 0 ){
+ $str = str_replace('{'.$name.'}', '('.$value.')', $str);
+ } else {
$str = str_replace('{'.$name.'}', $value, $str);
}
return $str;
Please sign in to comment.
Something went wrong with that request. Please try again.