× Feature Requests

Please do NOT use this section of the forum to request help if Joomdle does not work for you in some particular way. Your post will be deleted.

My Courses / Group by Category - Order does not match Moodle

8 years 1 month ago
Kyle Benedetti
Posts: 7
More
Topic Author
My Courses / Group by Category - Order does not match Moodle #1
I recently started using the "Group by Category" option for my My Courses page found under "Basic Options" when I create the menu link.

It displays the course categories and lists the categories by group which is awesome and exactly what I want. However I cannot for the life of me figure out how it is organizing the categories.

They do not match the order from moodle, they are not alphabetical, they are not ordered by course start date and they are not ordered by when the course was created.

Is there a way to have it match the order in Moodle?

I have attached three images:

1) The Moodle view of the categories, you can see Spring is above Fall.
2) The Moodle My Courses page where The Writings (Spring) is above The Pentateuch (Fall)
3) The Joomdle My Courses page with Category Grouping where Fall is some how above Spring.

Thanks in advance,

Kyle
Attachments:

Please Log in or Create an account to join the conversation.

8 years 1 month ago
Kyle Benedetti
Posts: 7
More
Topic Author
My Courses / Group by Category - Order does not match Moodle #2
Ok after more trial and error I have figured out that the order is based on the order that the Categories are created. However they put the newest created categories at the bottom.

So if it is possible to have it mirror the way Moodle organizes them would be best, if not simply reversing the order of how they currently display and having the oldest Categories at the bottom would also work. Does anyone know how I could do that?

Thanks for all the work you guys do, Joomdle is great!

Kyle

Please Log in or Create an account to join the conversation.

8 years 1 month ago
Antonio Durán
Posts: 7252
More
My Courses / Group by Category - Order does not match Moodle #3
Hi, thanks for the info and suggestions. I will move this topic to Feature Requests, for a possible inclusion in a future release. I guess best option is to have it configurable.

As for changing it now yourself: you would need to change the web service function in Moodle, to return the items in different order.

Please Log in or Create an account to join the conversation.

8 years 1 month ago
Kyle Benedetti
Posts: 7
More
Topic Author
My Courses / Group by Category - Order does not match Moodle #4
Thanks for pointing me in the right direction. If I figure anything out I will post it in case anyone else would like this feature.

Thanks!

Kyle

Please Log in or Create an account to join the conversation.

8 years 1 month ago
Antonio Durán
Posts: 7252
More
My Courses / Group by Category - Order does not match Moodle #5
Hi.

Don't know if you already solved it, bu just in case: having it sorted by category sortorder is more complicated, as it would need a rewrite of how the courses are retrieved (current used Moodle API call does not permit it).

Having them sorted by id, but reversed, is easy: edit moodle/auth/joomdle/auth.php, function my_courses().
Change:
            $c = enrol_get_users_courses ($user->id, true, NULL, 'category, sortorder ASC');
By:
            $c = enrol_get_users_courses ($user->id, true, NULL, 'category DESC, sortorder ASC');

Please Log in or Create an account to join the conversation.

8 years 1 month ago
Kyle Benedetti
Posts: 7
More
Topic Author
My Courses / Group by Category - Order does not match Moodle #6
Thanks a million for posting this! I got distracted and hadn't looked into it yet.

Joomdle is amazing!

Kyle

Please Log in or Create an account to join the conversation.

6 years 7 months ago
Graham Paull
Posts: 1
More
My Courses / Group by Category - Order does not match Moodle #7
This was a great tip, I managed to get my Categories in order.

Could I ask, is it possible to have the Courses within the categories ordered by shortname ?

Currently in my Moodle installation, I have My Home set with the Course Overview block in use, I have modified this to sort courses by Shortname ascending, could this be done in Joomdle ?

Thanks, Graham

Please Log in or Create an account to join the conversation.

6 years 7 months ago
Antonio Durán
Posts: 7252
More
My Courses / Group by Category - Order does not match Moodle #8
I guess you can just change the same code, to use shortname instead of sortorder.

Please Log in or Create an account to join the conversation.

1 month 2 weeks ago
Justin
Posts: 96
More
My Courses / Group by Category - Order does not match Moodle #9
Has this been added as a feature yet, or would I need to change the coding as suggested by you

Please Log in or Create an account to join the conversation.

1 month 1 week ago
Antonio Durán
Posts: 7252
More
My Courses / Group by Category - Order does not match Moodle #10
I am sorry, but we didn't add anything related to this... I think I totally forgot about it :(
We'll try to take a look for next release.

Please Log in or Create an account to join the conversation.