Over the past few months i've been encountering numerous sites which have course reodering ordering crippled by completely crazy[1] course sortorder values.
I'm trying to understand what is causing this problem and how to fix it robustly (aware that fix_course_sortorder() function has been rewritten in HEAD).
So I am wondering if anyone can enlighten me a bit:
- Describing a high-level overview of the purpose of fix_course_sortorder()?
- How do course_category sortorder and course sortorder interact? Is this the source of massive sortorder values?
- Can the crazy high course sortorder values not be fixed by renumering the sortorder incrementally from 1?
Any help/history on this would be appreciated!
[1] An example from today:
mysql> select sortorder from course order by sortorder limit 6;
+--------------------+
| sortorder |
+--------------------+
| 1000 |
| 8011 |
| 8012 |
| 8013 |
| 136511462030056106 |
| 136511462030060000 |
+--------------------+
mysql> select max(sortorder) from course;
+--------------------+
| max(sortorder) |
+--------------------+
| 136511462030240100 |
+--------------------+
mysql> select count(*) from course;
+----------+
| count(*) |
+----------+
| 451 |
+----------+