Issue Details (XML | Word | Printable)

Key: MDL-13224
Type: Improvement Improvement
Status: Reopened Reopened
Priority: Minor Minor
Assignee: Dongsheng Cai
Reporter: Lagriffoul Laurent
Votes: 4
Watchers: 9
Operations

Add/Edit UI Mockup to this issue
If you were logged in you would be able to see more operations.
Moodle

number of courses in MyMoodle home page

Created: 29/Jan/08 06:24 PM   Updated: 26/Nov/09 12:22 AM
Component/s: General
Affects Version/s: 1.8.4, 1.9.4
Fix Version/s: 1.9.8

File Attachments: 1. Text File mymoodle.patch (3 kB)

Issue Links:
Dependency
 
Duplicate
 
Relates
 

Participants: Daniel Neis, Dongsheng Cai, Eloy Lafuente (stronk7), Eric Merrill, Gary Anderson, Jerome Mouneyrac, Lagriffoul Laurent, Martin Dougiamas, Petr Škoda (skodak) and Séverin Terrier
Security Level: None
QA Assignee: Jerome Mouneyrac
Resolved date: 02/Apr/09
Affected Branches: MOODLE_18_STABLE, MOODLE_19_STABLE
Fixed Branches: MOODLE_19_STABLE


 Description  « Hide
Hi

In MyMoodle home page, only 21 courses can appear.
But the number of courses that one student can choose is very higher.

So can we

  • change this number to 50, for example, or better
  • set it to the coursesperpage parameter (administration -> Front Page -> Front Page Settings), or best
  • create a new parameter, accessible from administration -> Appearence -> My Moodle

Waiting for this change, i modify $HOME/moodle/my/index.php
$courses = get_my_courses($USER->id, null, '*', false, 51);
if (count($courses) > 50) {

Thanks
Laurent



 All   Comments   Change History   Version Control      Sort Order: Ascending order - Click to sort in descending order
Eloy Lafuente (stronk7) added a comment - 25/Mar/09 06:15 AM
My +1 for this both in 19_STABLE and HEAD. I think that setting is the correct way (defaulting to 21 to respect current behaviour). Perhaps, also, it would be a good idea to review other usages of get_my_courses() to see if they need be changed too.

Assigning to Dongsheng, one +1 from MD is necessary. Ciao


Martin Dougiamas added a comment - 26/Mar/09 05:27 PM
Yes agree with Eloy, a new setting is a good idea (default 21)

Martin Dougiamas added a comment - 26/Mar/09 05:29 PM
Could be mycoursesperpage with a desc like "Maximum number of courses to display in any list of a user's own courses".

Petr Škoda (skodak) added a comment - 01/Apr/09 04:26 PM
this is not going to work, sorry, because:
var_dump(is_int('1'));
returns false

anything coming from database is string value


Dongsheng Cai added a comment - 02/Apr/09 10:50 AM
Thanks, Petr, I fixed the type-casting, please review

Gary Anderson added a comment - 02/Apr/09 11:20 AM
Reopening because strings for the admin control for mycoursesperpage and configmycoursesperpage are missing in the latest cvs for at least 1.9 stable.

Dongsheng Cai added a comment - 02/Apr/09 11:34 AM
Sorry for missing language strings, commited, please review.

Jerome Mouneyrac added a comment - 07/Apr/09 11:20 AM
I just reopen for two observations (feel free to close if it's not important):
  • remote mnet courses are always displayed into my moodle (whatever number of course you save)
  • when I set to 0, all courses are displayed. If I wasn't an IT guy, I would expect no course displayed. This behavior should be explained into the "confirm" string.

Thanks.


Petr Škoda (skodak) added a comment - 07/Apr/09 03:48 PM
Next time pretty please use smaller version bumps, we are running out of version umbers for 1.9.4+
also I removed the (int) conversion line because we do not do that elsewhere

Dongsheng Cai added a comment - 15/Apr/09 11:41 AM
Looking into the mnet courses

Dongsheng Cai added a comment - 15/Apr/09 03:14 PM
A new patch attached,
1. if mycoursesperpage == 0, no courses will be displayed, at the bottom, there is a "show all courses" link, click it, you will get all courses without limit.
2. if mycoursesperpage > 0, limit number of courses will be displayed, click "show all courses" link will show all courses

The "show all courses" link need to know how many courses this user enrolled, so I call get_my_courses without limit, otherwise, I need to create another SQL query to get the total number of courses, not sure which one is better, any comments?


Jerome Mouneyrac added a comment - 15/Apr/09 05:44 PM
Imo I would just change the string to explain that when set to 0, all courses are displayed. I don't think any admin really wants to set it to 0 and having all courses display is neither really user friendly.

Séverin Terrier added a comment - 29/Apr/09 04:42 PM
With Moodle 1.9.4 dated from 20090422, logged as admin, if i've selected 50 courses, i see 52 courses on MyMoodle page...

Eloy Lafuente (stronk7) added a comment - 30/Apr/09 04:10 PM
Well, that's good, isn't it? Moodle knows you have more courses and gives yo a bit more.... :-D :-P

Seriously, I think the number should be accurate, what I'm not sure is if the patch has landed CVS already... it seems that Dongsheng was waiting for some feedback.

Dongsheng?


Dongsheng Cai added a comment - 30/Apr/09 04:21 PM
Hi,
Séverin, do you have remote moodle courses included? we currently count local courses only.

Séverin Terrier added a comment - 30/Apr/09 04:31 PM
No : only local courses...

Dongsheng Cai added a comment - 01/May/09 03:50 PM
Sorry for delay, Séverin
Did you try the patch above? Let me know if you got the same problem after patch applied.

Eric Merrill added a comment - 07/May/09 03:32 AM
I created a new ticket that is linked to this:
MDL-19089 Ellipses incorrectly displayed for My Moodle page

Petr Škoda (skodak) added a comment - 09/May/09 05:09 PM
we are very close to release, this will have to wait a bit, sorry

Daniel Neis added a comment - 09/Jul/09 01:24 AM
Hello,

what abou MDL-19089 ? Here at moodle.ufsc.br were are using the proposed solution on production since then and it's ok...


Eric Merrill added a comment - 08/Oct/09 01:51 AM
The off by two issue is addressed in ticket MDL-20472

Eric Merrill added a comment - 08/Oct/09 01:03 PM
The off by 2 error described by Séverin should be corrected in 19_STABLE and HEAD now.

Dongsheng Cai added a comment - 08/Oct/09 05:11 PM
Thanks, can this issue be marked as resoved onw?

Eric Merrill added a comment - 08/Oct/09 09:40 PM
I was unclear if there is still a problem with mnet courses - that is why I didn't close this ticket out.

-eric


Dongsheng Cai added a comment - 08/Oct/09 10:02 PM
thanks, I will discuss the mnet courses issue with the other developers tomorrow

Jerome Mouneyrac added a comment - 09/Oct/09 10:17 AM
About mnet:
I could be wrong but I don't think that the note I wrote has been fixed: "remote mnet courses are always displayed into my moodle (whatever number of course you save)". This comment let me think that Moodle probably don't consider mnet courses.
I would say that you can resolve this issue, and create another related issue with this description: "remote mnet courses are always displayed into my moodle (whatever number of course you save in the option mycoursesperpage)"
thanks