I want to know if is possible (and if the answer is "yes" - how to do that ?!) to make subcategories to courses, for example:
Faculty of economics
- Graduate studies
- Course 1
- Course 2
- Postgraduate studies
- Course 1
- Course 2
By default courses are displayed like tree-view but the thing that I want to do is:
on the frontpage I should have only Faculty of economics and when I click on it to open "Graduate studies" and "Postgraduate studies". How can I do this ?
Use Course category view on front page in Admin menu /Frontpage setting if not already.
Add this configuration variable
$CFG->max_category_depth = 2;
to your config.php file.
Then use sub categories to sort out your structure, change depth to the setting you require.
I'd also like to have more levels. Not just one
category and then courses under that. I'd like to
be able to create subcategories like e.g.:
Category: English courses
- Subcategory 1 - courses on different levels
- English - beginners
- English - intermediate
- Subcategory 2 - major parts of a course
- Subcategory 3 - parts of parts
- Making speeches
- English - advanced
I tried inserting the extra code you suggested
in my moodle/config.php but I didn't find any
administrative tools for adding any subcategories.
What to do? Grateful for help,
Right you can't have subcategories inside courses as such only outside. Outside courses are via the edit page for all courses where you create new subcats.
So to recap Home page to All courses to Editing On and then Add new subcategory.
Hope this clears it up a bit?
However, it's possible to add sub-categories (and sub-sub-categories) by adding a new category then using the "move category to" drop-down to move the category inside another category (please see screen shot below).
I've not needed to edit config.php either (using Moodle 1.5.2) What version are you using Rico?
This may be:
- a technical issue
- a pedagogical issue
- an administrative issue
- a usability issue
To me however this is more to do with the possiblity of applying
Information Architecture principles in Moodle. This I think
will be essential when Moodle is put into a mature practice
on a large scale. So even if this solution helped me proceed
- more needs to be done about this.
Doh yes can add new categories not subcategories but yes can make them subs by moving anyway.
The PHP tweak is for when you only wish to display the top level courses on the "Front page format Show a list of categories". Still valid else you see the courses and subs I think?
I would like to ask one more thing: do you know if is possible to create a course in a category and on other category to have a link to the same course?\
> Do you know if is possible to create a course in a category and on other category to have a link to the same course?
Please see this post
for my redirect course type. Only trouble is that the student will be left in two courses since the link is a course.
Some creative linking using html seems to work in the course title. Can't say much about sub catagories, but redirects seem to work fine on my localhost. Since student never gets to the course screen, they never enrol in the "fake" course in the "wrong" catagory.
Timothy suggested and I gave an example here on Oct 3, 2006
Hope this helps
Ah, that is a cool idea. No need for the redirect course and to hack my courses.
Why didn't I think of that sooner.
I've mentioned this before elsewhere. But I am running into lots of creative uses of linking that are really turning my head around in the last couple of weeks.
*There was the Library(aka Course) of Lessons and resources idea that uses links from within another courses for standard refreshers or what ever
*There was (this one) about "course short cut" or course redirect
*The use of links to create an index of lesson pages, instead of branch table jumps gives endless possibilities of groupings
*Or indexes created on different resource pages using links that direct to courses, activities, resources on the Moodle site.
*What about use of certificates and activity locking and a links that essentially makes one course dependent upon another.
Yeah, why didn't we think of those? Bless the new users who have not put themselves in a pre-defined Moodle box. As the Rockman said to Oblio in The Point, "you see what you want to see"
Guess I better post those in tips and tricks. BTW you are pretty good at stepping out of the box with creative solutions.
Could someone please let me know where I can find the file in which I need to make the change outlined by Rico above? I'm using 1.8 and would dearly love to use SubCategories, but I absolutely don't want them cluttering up my front page!
Hope someone can help!
I think it is like this:
* look for the file config.php in the root directory of the Moodle installation
* add the line $CFG->max_category_depth = 1; to this file (I've placed in on line 18, that seemed the most logical choice)
This worked for me.
I was trying to do this as well as I would love to have subcategories without them showing on the Front Page. However, I keep getting this error when I try to insert the line :
Parse error: parse error, unexpected T_VARIABLE in C:\Inetpub\wwwroot\config.php on line 19
I am not very familiar with PHP so I am sure that I have just done something wrong. Any suggestions?
I am not familiar with PHP either, but this is how mine looks:
$CFG->directorypermissions = 00777; // try 02777 on a server in Safe Mode
$CFG->max_category_depth = 2
// MAKE SURE WHEN YOU EDIT THIS FILE THAT THERE ARE NO SPACES, BLANK LINES,
// RETURNS, OR ANYTHING ELSE AFTER THE TWO CHARACTERS ON THE NEXT LINE.
In PHP, "Parse error" means "Syntax error". Basically, something is incorrect in the syntax of the line. Those things could be a missing semicolon at the end, an extra or missing single or double quote, or similar.
thank you for your answer, but $CFG->max_category_depth = x; only takes affect on the "Course Categories" block, not on the "Courses->Add/Edit courses" controls
I am moodle admin for my school but my Moodle is hosted by our Local education authority - can I edit PHP remotely, if so can anyone show me how? We're using version 1.8.
How to hide sub categories in moodle front page??
Please tell me if any one know?
I tried to edit this code in index.php. But no success. If any one know please tell me.
print_whole_category_list(NULL, NULL, NULL, -1, false);
//print_whole_category_list(NULL, NULL, NULL, -1, false);
//print_course_search('', false, 'short');
print_whole_category_list(NULL, NULL, NULL, -1, true);
print_course_search('', false, 'short');
case FRONTPAGETOPICONLY: // Do nothing!!
We can hide subcategories on the front page without modifying php code.
Please follow below mentioned steps
1. Login to moodle as an admin.
2. In the "Site Administration" block, Click on "Front Page -> Front Page Settings"
3. Look for parameter "Maximum Category Depth", change its value to : 1
4. "Save Changes" and you are done.
5. Now Front page should only display Main Categories.
It worked for me. Hope this helps.
This works nicely but it is not only for the front page.
After you edit the front page settings and change the Maximum Category Depth to 1,
sub categories are hidden on the front page
But when you follow the 'All courses ...' link, something like:
The sub categories are also hidden! But on this page, it would be nice to all the sub categories. Is this possible ?
Thanks for any suggestion.
Have a look at myCourses and siteNavigation Blocks. Code could be customized to show in a ComboList or in the central area on the FrontPage or simply anywhere you like, even in a separate "all courses" List of your own.
Have a look also on my TestServer, where I use another neat category/courses Menu which opens horizontally (from Kevin Treussier). That's why I can not use it, because our large scale site with more than 4'000 courses deeply nested in more than 1'000 categories would scroll infinitely to the right.
So I created the siteNavigation out of the myCourses Block which both show hierarchical nested folders.
Actually I am recoding to show both in a popUp-window to have more space than in the 210 Pixel wide Blocks.
My category/course structure is as follows -
MS Program (CATEGORY)
Semester - 1(SUB-CATEGORY 1)
----- containing 4 courses
Semester - 2 (SUB-CATEGORY 2)
----- containing 4 courses
My requirement is to upload the entire syllabus(4 Semesters) saved as a pdf file at the MS program category level. Is it possible ? Else where can it be done?