From: moodler Date: Thu, 20 Apr 2006 04:02:30 +0000 (+0000) Subject: New number field type X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=59f3b71781299f7fc2af9977b5e7218aede46df3;p=moodle.git New number field type --- diff --git a/mod/data/field/number/field.class.php b/mod/data/field/number/field.class.php new file mode 100755 index 0000000000..0192060c76 --- /dev/null +++ b/mod/data/field/number/field.class.php @@ -0,0 +1,47 @@ +dbtype) { + case 'mysql': // DECIMAL would be more accurate but only MySQL 5 supports it. + return 'CAST('.$fieldname.' AS SIGNED)'; + + default: + return 'CAST('.$fieldname.' AS REAL)'; + } + } + +} + +?> diff --git a/mod/data/field/number/icon.gif b/mod/data/field/number/icon.gif new file mode 100755 index 0000000000..0877b51a33 Binary files /dev/null and b/mod/data/field/number/icon.gif differ diff --git a/mod/data/field/number/mod.html b/mod/data/field/number/mod.html new file mode 100755 index 0000000000..155b409f87 --- /dev/null +++ b/mod/data/field/number/mod.html @@ -0,0 +1,10 @@ + + + + + + + + + +
:
: