- Posts: 7
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.
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
- Kyle Benedetti
- Topic Author
- Offline
- New Member
-
Less
More
12 years 9 months ago #1
by Kyle Benedetti
My Courses / Group by Category - Order does not match Moodle was created by Kyle Benedetti
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
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
Please Log in or Create an account to join the conversation.
- Kyle Benedetti
- Topic Author
- Offline
- New Member
-
Less
More
- Posts: 7
12 years 9 months ago #2
by Kyle Benedetti
Replied by Kyle Benedetti on topic My Courses / Group by Category - Order does not match Moodle
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
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.
- Antonio Durán
-
- Offline
- Moderator
-
Less
More
- Posts: 7848
12 years 9 months ago #3
by Antonio Durán
Replied by Antonio Durán on topic My Courses / Group by Category - Order does not match Moodle
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.
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.
- Kyle Benedetti
- Topic Author
- Offline
- New Member
-
Less
More
- Posts: 7
12 years 9 months ago #4
by Kyle Benedetti
Replied by Kyle Benedetti on topic My Courses / Group by Category - Order does not match Moodle
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
Thanks!
Kyle
Please Log in or Create an account to join the conversation.
- Antonio Durán
-
- Offline
- Moderator
-
Less
More
- Posts: 7848
12 years 9 months ago #5
by Antonio Durán
Replied by Antonio Durán on topic My Courses / Group by Category - Order does not match Moodle
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:
By:
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:
Code:
$c = enrol_get_users_courses ($user->id, true, NULL, 'category, sortorder ASC');
Code:
$c = enrol_get_users_courses ($user->id, true, NULL, 'category DESC, sortorder ASC');
Please Log in or Create an account to join the conversation.
- Kyle Benedetti
- Topic Author
- Offline
- New Member
-
Less
More
- Posts: 7
12 years 9 months ago #6
by Kyle Benedetti
Replied by Kyle Benedetti on topic My Courses / Group by Category - Order does not match Moodle
Thanks a million for posting this! I got distracted and hadn't looked into it yet.
Joomdle is amazing!
Kyle
Joomdle is amazing!
Kyle
Please Log in or Create an account to join the conversation.
- Graham Paull
- Offline
- New Member
-
Less
More
- Posts: 1
11 years 2 months ago #7
by Graham Paull
Replied by Graham Paull on topic My Courses / Group by Category - Order does not match Moodle
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
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.
- Antonio Durán
-
- Offline
- Moderator
-
Less
More
- Posts: 7848
11 years 2 months ago #8
by Antonio Durán
Replied by Antonio Durán on topic My Courses / Group by Category - Order does not match Moodle
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.
- Justin
- Offline
- Premium Member
-
Less
More
- Posts: 102
4 years 9 months ago #9
by Justin
Replied by Justin on topic My Courses / Group by Category - Order does not match Moodle
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.
- Antonio Durán
-
- Offline
- Moderator
-
Less
More
- Posts: 7848
4 years 9 months ago #10
by Antonio Durán
Replied by Antonio Durán on topic My Courses / Group by Category - Order does not match Moodle
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.
We'll try to take a look for next release.
Please Log in or Create an account to join the conversation.