mirror of
https://github.com/moodle/moodle.git
synced 2025-08-04 08:26:37 +02:00
Improved category and course list display on front page- see bug Bug #5965 - Frontpage Category List also showing courses; new Combo List(categories + courses), fixed categories list and separate settings for not logged in / logged in users; merged from MOODLE_16_STABLE
This commit is contained in:
parent
fa145ae1af
commit
6f24e48e1f
6 changed files with 76 additions and 25 deletions
17
index.php
17
index.php
|
@ -119,7 +119,13 @@
|
|||
}
|
||||
}
|
||||
|
||||
foreach (explode(',',$CFG->frontpage) as $v) {
|
||||
if (isloggedin() and !isguest() and isset($CFG->frontpageloggedin)) {
|
||||
$frontpagelayout = $CFG->frontpageloggedin;
|
||||
} else {
|
||||
$frontpagelayout = $CFG->frontpage;
|
||||
}
|
||||
|
||||
foreach (explode(',',$frontpagelayout) as $v) {
|
||||
switch ($v) { /// Display the main part of the front page.
|
||||
case strval(FRONTPAGENEWS):
|
||||
if ($SITE->newsitems) { // Print forums only when needed
|
||||
|
@ -169,6 +175,15 @@
|
|||
print_course_search('', false, 'short');
|
||||
break;
|
||||
|
||||
case FRONTPAGECATEGORYCOMBO:
|
||||
|
||||
print_heading_block(get_string('categories'));
|
||||
print_simple_box_start('center', '100%', '', 5, 'categorybox');
|
||||
print_whole_category_list(NULL, NULL, NULL, -1, true);
|
||||
print_simple_box_end();
|
||||
print_course_search('', false, 'short');
|
||||
break;
|
||||
|
||||
case FRONTPAGETOPICONLY: // Do nothing!! :-)
|
||||
break;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue