MDL-27418 fix typo

I really should refactor to eliminate this duplicated code.
This commit is contained in:
Tim Hunt
2011-06-28 17:34:24 +01:00
parent 8566369f63
commit 3aa159706c
3 changed files with 3 additions and 3 deletions
+1 -1
View File
@@ -207,7 +207,7 @@ class qtype_calculated_qe2_attempt_updater extends question_qtype_attempt_update
* @param $x
*/
public function format_float($x, $length = null, $format = null) {
if (!is_null($format) && !is_null($format)) {
if (!is_null($length) && !is_null($format)) {
if ($format == 1) {
// Decimal places.
$x = sprintf('%.' . $length . 'F', $x);
+1 -1
View File
@@ -310,7 +310,7 @@ class qtype_calculated_variable_substituter {
* @param $x
*/
public function format_float($x, $length = null, $format = null) {
if (!is_null($format) && !is_null($format)) {
if (!is_null($length) && !is_null($format)) {
if ($format == 1) {
// Decimal places.
$x = sprintf('%.' . $length . 'F', $x);
@@ -231,7 +231,7 @@ class qtype_calculatedmulti_qe2_attempt_updater extends question_qtype_attempt_u
* @param $x
*/
public function format_float($x, $length = null, $format = null) {
if (!is_null($format) && !is_null($format)) {
if (!is_null($length) && !is_null($format)) {
if ($format == 1) {
// Decimal places.
$x = sprintf('%.' . $length . 'F', $x);