Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Merge branch 'MDL-10259_22' of git://github.com/dmonllao/moodle into …

…MOODLE_22_STABLE
  • Loading branch information...
commit 1db9d1e7ec24f7e37c91fdeddd4127b158ed708c 2 parents 22f55d8 + 2fcb888
@samhemelryk samhemelryk authored
Showing with 6 additions and 1 deletion.
  1. +5 −1 index.php
  2. +1 −0  lang/en/moodle.php
View
6 index.php
@@ -193,17 +193,21 @@
break;
case FRONTPAGECOURSELIST:
+ $ncourses = $DB->count_records('course');
if (isloggedin() and !$hassiteconfig and !isguestuser() and empty($CFG->disablemycourses)) {
echo html_writer::tag('a', get_string('skipa', 'access', moodle_strtolower(get_string('mycourses'))), array('href'=>'#skipmycourses', 'class'=>'skip-block'));
echo $OUTPUT->heading(get_string('mycourses'), 2, 'headingblock header');
print_my_moodle();
echo html_writer::tag('span', '', array('class'=>'skip-block-to', 'id'=>'skipmycourses'));
- } else if ((!$hassiteconfig and !isguestuser()) or ($DB->count_records('course') <= FRONTPAGECOURSELIMIT)) {
+ } else if ((!$hassiteconfig and !isguestuser()) or ($ncourses <= FRONTPAGECOURSELIMIT)) {
// admin should not see list of courses when there are too many of them
echo html_writer::tag('a', get_string('skipa', 'access', moodle_strtolower(get_string('availablecourses'))), array('href'=>'#skipavailablecourses', 'class'=>'skip-block'));
echo $OUTPUT->heading(get_string('availablecourses'), 2, 'headingblock header');
print_courses(0);
echo html_writer::tag('span', '', array('class'=>'skip-block-to', 'id'=>'skipavailablecourses'));
+ } else {
+ echo html_writer::tag('div', get_string('therearecourses', '', $ncourses), array('class' => 'notifyproblem'));
+ print_course_search('', false, 'short');
}
break;
View
1  lang/en/moodle.php
@@ -1633,6 +1633,7 @@
$string['themes'] = 'Themes';
$string['themesaved'] = 'New theme saved';
$string['thereareno'] = 'There are no {$a} in this course';
+$string['therearecourses'] = 'There are {$a} courses';
$string['thiscategorycontains'] = 'This category contains';
$string['time'] = 'Time';
$string['timezone'] = 'Timezone';
Please sign in to comment.
Something went wrong with that request. Please try again.