Hi,
I have been tasked with putting together a new theme for moodle in my school. What I need to do is to populate a drop down menu with all the courses available which match a specific ID. It would seem that usually the category.php file displays this info, but I can't seem to find out if there is a function I can call to retrieve this data easily. I would rather not have to write some code if something else is already in place. Can anyone help here?
Many thanks
rob
What ID are trying to match them to?
I have just been writing a page for my Moodle that will display all courses which have guest access enabled. I will post it up when I finish it; it might point you in the right direction...
Jon
I have just been writing a page for my Moodle that will display all courses which have guest access enabled. I will post it up when I finish it; it might point you in the right direction...
Jon
OK,
So here is the finished script... We are using guest access to get our parents to access information in our VLE and this script produces a list of all courses with guest access enabled... It is not very elegant but it does the job!
Jon
So here is the finished script... We are using guest access to get our parents to access information in our VLE and this script produces a list of all courses with guest access enabled... It is not very elegant but it does the job!
Jon
Hi Robert,
The Course Category / Course Dropdown Navigation menu in the Beaux Theme (partly based on "a theme with automatic menus") might have something (in the topmenu.php file) that points you in the right direction as well.
Cheers,
Barry
The Course Category / Course Dropdown Navigation menu in the Beaux Theme (partly based on "a theme with automatic menus") might have something (in the topmenu.php file) that points you in the right direction as well.
Cheers,
Barry
I found it pretty easy, though I do remember fiddling with it a bit at first.
Can you outline the steps to incorporate the Beaux theme's menu in other Moodle Themes?
Sorry no, it would be much quicker and beneficial for me to create a new blank theme from scratch , but I've got other things to do right now.
Barry,
Why is the menu link in the Beaux theme going to:
domain.com/course/view.php?id=13
instead of
domain.com/moodle/course/view.php?id=13
for one of my courses?
Tieku
Hi Tieku,
For the automatic menu, I based my theme on the 'A theme with automatic menus' and didn't spend too much time trying to perfect it. The culprit will be in the topmenu.php file.
To fix it, find all occurrences of $CFG->wwwroot and replace it with $CFG->webroot
Cheers,
Barry
For the automatic menu, I based my theme on the 'A theme with automatic menus' and didn't spend too much time trying to perfect it. The culprit will be in the topmenu.php file.
To fix it, find all occurrences of $CFG->wwwroot and replace it with $CFG->webroot
Cheers,
Barry
That did not work. Changed all $CFG->wwwroot to $CFG->webroot in topmenu.php file. Still the same. Is there anything else I need to change?
What I rather did was change all //global $CFG; to global $CFG;