From 22665704696c4c404142156217401cda5be697e6 Mon Sep 17 00:00:00 2001 From: John Denker Date: Thu, 11 Nov 2021 13:44:41 -0700 Subject: no longer any need to sort identifiers by length; better to keep them in designed-in order --- edit_algebra_form.php | 1 - parser.php | 4 ---- 2 files changed, 5 deletions(-) diff --git a/edit_algebra_form.php b/edit_algebra_form.php index 3ab31ac..985180d 100644 --- a/edit_algebra_form.php +++ b/edit_algebra_form.php @@ -105,7 +105,6 @@ class qtype_algebra_edit_form extends question_edit_form { // Add the initial all functions box to the list of check boxes. $funcgroup[] =& $mform->createElement('checkbox', 'all', '', get_string('allfunctions', 'qtype_algebra')); // Create a checkbox element for each function understood by the parser. -// FIXME: why do the function names show up on the page in some weird order??? for ($i = 0; $i < count(qtype_algebra_parser::$functions); $i++) { $func = qtype_algebra_parser::$functions[$i]; $funcgroup[] =& $mform->createElement('checkbox', $func, '', $func); diff --git a/parser.php b/parser.php index ad141f1..0efc21b 100644 --- a/parser.php +++ b/parser.php @@ -1702,7 +1702,3 @@ class qtype_algebra_parser { } } } - -// Sort static arrays once here by inverse string length. -usort(qtype_algebra_parser_variable::$greek, 'qtype_algebra_parser_strlen_sort'); -usort(qtype_algebra_parser::$functions, 'qtype_algebra_parser_strlen_sort'); -- cgit v1.2.3