Home
Documentation
Downloads
Demo
Tracker
Development
Translation
Moodle.net
Search
projects
/
moodle.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
a3e3b69
)
MDL-53557 mod_feedback: fix to formatting float
author
Marina Glancy
<marina@moodle.com>
Wed, 30 Mar 2016 01:17:51 +0000
(09:17 +0800)
committer
Marina Glancy
<marina@moodle.com>
Wed, 30 Mar 2016 01:17:51 +0000
(09:17 +0800)
mod/feedback/item/numeric/lib.php
patch
|
blob
|
blame
|
history
diff --git
a/mod/feedback/item/numeric/lib.php
b/mod/feedback/item/numeric/lib.php
index
3a37322
..
9bbacea
100644
(file)
--- a/
mod/feedback/item/numeric/lib.php
+++ b/
mod/feedback/item/numeric/lib.php
@@
-313,7
+313,7
@@
class feedback_item_numeric extends feedback_item_base {
if (!is_numeric($value)) {
return null;
}
- $decimal = is_int($value) ? 0 : str
cspn(strrev($value), '.'
);
+ $decimal = is_int($value) ? 0 : str
len(substr(strrchr($value, '.'), 1)
);
return format_float($value, $decimal);
}