mirror of
https://github.com/moodle/moodle.git
synced 2025-01-19 14:27:22 +01:00
Merge branch 'MDL-10259_master' of git://github.com/dmonllao/moodle
This commit is contained in:
commit
35cd9f1f83
@ -204,17 +204,21 @@
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case FRONTPAGECOURSELIST:
|
case FRONTPAGECOURSELIST:
|
||||||
|
$ncourses = $DB->count_records('course');
|
||||||
if (isloggedin() and !$hassiteconfig and !isguestuser() and empty($CFG->disablemycourses)) {
|
if (isloggedin() and !$hassiteconfig and !isguestuser() and empty($CFG->disablemycourses)) {
|
||||||
echo html_writer::tag('a', get_string('skipa', 'access', textlib::strtolower(get_string('mycourses'))), array('href'=>'#skipmycourses', 'class'=>'skip-block'));
|
echo html_writer::tag('a', get_string('skipa', 'access', textlib::strtolower(get_string('mycourses'))), array('href'=>'#skipmycourses', 'class'=>'skip-block'));
|
||||||
echo $OUTPUT->heading(get_string('mycourses'), 2, 'headingblock header');
|
echo $OUTPUT->heading(get_string('mycourses'), 2, 'headingblock header');
|
||||||
print_my_moodle();
|
print_my_moodle();
|
||||||
echo html_writer::tag('span', '', array('class'=>'skip-block-to', 'id'=>'skipmycourses'));
|
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
|
// admin should not see list of courses when there are too many of them
|
||||||
echo html_writer::tag('a', get_string('skipa', 'access', textlib::strtolower(get_string('availablecourses'))), array('href'=>'#skipavailablecourses', 'class'=>'skip-block'));
|
echo html_writer::tag('a', get_string('skipa', 'access', textlib::strtolower(get_string('availablecourses'))), array('href'=>'#skipavailablecourses', 'class'=>'skip-block'));
|
||||||
echo $OUTPUT->heading(get_string('availablecourses'), 2, 'headingblock header');
|
echo $OUTPUT->heading(get_string('availablecourses'), 2, 'headingblock header');
|
||||||
print_courses(0);
|
print_courses(0);
|
||||||
echo html_writer::tag('span', '', array('class'=>'skip-block-to', 'id'=>'skipavailablecourses'));
|
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;
|
break;
|
||||||
|
|
||||||
|
@ -1671,6 +1671,7 @@ $string['theme'] = 'Theme';
|
|||||||
$string['themes'] = 'Themes';
|
$string['themes'] = 'Themes';
|
||||||
$string['themesaved'] = 'New theme saved';
|
$string['themesaved'] = 'New theme saved';
|
||||||
$string['thereareno'] = 'There are no {$a} in this course';
|
$string['thereareno'] = 'There are no {$a} in this course';
|
||||||
|
$string['therearecourses'] = 'There are {$a} courses';
|
||||||
$string['thiscategorycontains'] = 'This category contains';
|
$string['thiscategorycontains'] = 'This category contains';
|
||||||
$string['time'] = 'Time';
|
$string['time'] = 'Time';
|
||||||
$string['timezone'] = 'Timezone';
|
$string['timezone'] = 'Timezone';
|
||||||
|
Loading…
x
Reference in New Issue
Block a user