If you want to create a new page for developers, you should create it on the Moodle Developer Resource site.

Courses and Categories Lists Overview in 2.4

From MoodleDocs

In 2.4 we have several different methods displaying list of categories/courses:

Existing related settings:

Site administration -> Appearance -> Navigation

  • Default home page for users [defaulthomepage] : This determines the home page for logged in users
  • Show course categories [navshowcategories] : Show course categories in the navigation bar and navigation blocks. This does not occur with courses the user is currently enrolled in, they will still be listed under mycourses without categories.
  • Show my course categories [navshowmycoursecategories] : If enabled courses in the users my courses branch will be shown in categories.
  • Show all courses [navshowallcourses] : If enabled users will see courses they are enrolled in both within the My Courses branch and the course structure. When disabled users with enrolments will only see the My Courses branch of the navigaiton. The number of course shown would still be limited by "Course limit(navcourselimit)" setting when user is either not logged in or not enrolled in any course. The button "all courses" still appears on front page even when setting is off
  • Course limit [navcourselimit] : Limits the number of courses shown to the user when they are either not logged in or are not enrolled in any courses. Is it used???

Site administration -> Appearance -> Courses

  • Course contacts [coursecontact] : This setting allows you to control who appears on the course description. Users need to have at least one of these roles in a course to be shown on the course description for that course.
  • Display extended course names [courselistshortnames] : When showing lists of courses, or when referring to courses on administration screens, show the course short name as well as the full name. In fact, when you turn this setting on, the display uses the 'courseextendednamedisplay' language string, so you can changewhat is displayed using Language customisation.
  • Courses per page [coursesperpage] : Enter the number of courses to be displayed per page in a course listing.
  • Courses with summaries limit [courseswithsummarieslimit] : The maximum number of courses to display in a course listing including summaries before falling back to a simpler listing.

Site administration -> Front page -> Front page settings

  • Front page [frontpage] : The items selected above will be displayed on the site's front page.
  • Front page items when logged in [frontpageloggedin] : The items selected above will be displayed on the site's front page when a user is logged in.
  • Maximum category depth [maxcategorydepth] : This specifies the maximum depth of child categories shown

Site administration -> Server -> Performance

  • Maximum number of courses in combo list [numcoursesincombo] (500) : The combo list doesn't work well with large numbers of courses. When the total number of courses in the site is higher than this setting then a link to the dedicated course listing will be shown instead of trying to display all the courses on the front page.

config.php only settings

  • $CFG->disablemycourses : This setting will prevent the 'My Courses' page being displayed when a student logs in. The site front page will always show the same (logged-out) view.

Front page

List of courses on front page



Admin can see:


Student can see:


Not logged in user can see:


Note: student can see "Weekly course" (located in subcat1), but admin and not logged in can not (bug?)

Note: student can see remote courses in different format than local courses

Note: if isset($CFG->disablemycourses) student will see the same as guest

if the number of courses > FRONTPAGECOURSELIMIT (constant = 200), courses will not be displayed, just the course search form

List of categories on front page



Admin can see:


Student can see:


Not logged in user can see the same as student because in my example student is enrolled in all courses

Combo list on front page



Admin can see:


Student can see:


Not logged in user can see:


Note: looks like the most attractive format, BUT student can not see remote courses. And there is no functionality to show only remote courses


$CFG->maxnumcoursesincombo (default 500) is the maximum number of courses to print in combo form, otherwise the link is shown (for admin, students and guests, regardless on number of available/visible courses). Also note that there are 4 courses in the system:


My moodle

If empty($CFG->disablemycourses) students will see "My courses" link instead of "Courses". But only in navigation!


All courses

Link /course/index.php appears quite often. If number of courses is less than 200 (in some places in code it is replaced with constant FRONTPAGECOURSELIMIT), it will show the list of categories with courses (see examples below). If number of ALL courses is more than 200, then regardless of number of courses visible to the user, there will be just a category tree (the same as in "list of categories on the front page").







Admin in edit mode



If user follows link /course/category.php under any category name







The same page when $CFG->coursesperpage is set to 2 (i.e. when courses are split into pages):


Admin in edit mode inside category



Also there is a /tag/index.php page