Permalink
Browse files

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

…more in HEAD
  • Loading branch information...
1 parent a96dff4 commit 232866f6c34e737c945b2365d21d35475cbc5032 pichetp committed Sep 20, 2008
Showing with 3 additions and 0 deletions.
  1. +3 −0 question/type/datasetdependent/abstractqtype.php
@@ -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;

0 comments on commit 232866f

Please sign in to comment.