aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn Denker <jsd@av8n.com>2021-11-11 13:44:41 -0700
committerJohn Denker <jsd@av8n.com>2021-11-11 16:08:19 -0700
commit22665704696c4c404142156217401cda5be697e6 (patch)
tree753404b181866ef9b6c069a83e0bc25e8aed7398
parent9745514c1833bee05ce0a2ee28cd92d62fd4a8dc (diff)
no longer any need to sort identifiers by length;
better to keep them in designed-in order
-rw-r--r--edit_algebra_form.php1
-rw-r--r--parser.php4
2 files changed, 0 insertions, 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');