|
Yes agree with Eloy, a new setting is a good idea (default 21)
Could be mycoursesperpage with a desc like "Maximum number of courses to display in any list of a user's own courses".
this is not going to work, sorry, because:
var_dump(is_int('1')); returns false anything coming from database is string value Thanks, Petr, I fixed the type-casting, please review
Reopening because strings for the admin control for mycoursesperpage and configmycoursesperpage are missing in the latest cvs for at least 1.9 stable.
Sorry for missing language strings, commited, please review.
I just reopen for two observations (feel free to close if it's not important):
Thanks. 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 Looking into the mnet courses
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? 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.
With Moodle 1.9.4 dated from 20090422, logged as admin, if i've selected 50 courses, i see 52 courses on MyMoodle page...
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? Hi,
Séverin, do you have remote moodle courses included? we currently count local courses only. No : only local courses...
Sorry for delay, Séverin
Did you try the patch above? Let me know if you got the same problem after patch applied. I created a new ticket that is linked to this:
we are very close to release, this will have to wait a bit, sorry
Hello,
what abou The off by two issue is addressed in ticket
The off by 2 error described by Séverin should be corrected in 19_STABLE and HEAD now.
Thanks, can this issue be marked as resoved onw?
I was unclear if there is still a problem with mnet courses - that is why I didn't close this ticket out.
-eric thanks, I will discuss the mnet courses issue with the other developers tomorrow
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 |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Assigning to Dongsheng, one +1 from MD is necessary. Ciao