Skip to content

Commit

Permalink
Slightly more helpful message if no courses can be shown.
Browse files Browse the repository at this point in the history
  • Loading branch information
thepurpleblob committed Feb 21, 2007
1 parent 59194f4 commit 3cae730
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
8 changes: 7 additions & 1 deletion course/search.php
Expand Up @@ -83,6 +83,7 @@
$strdeselectall = get_string("deselectall");
$stredit = get_string("edit");
$strfrontpage = get_string('frontpage', 'admin');
$strnovalidcourses = get_string('novalidcourses');

if (empty($search) and empty($blocklist) and empty($modulelist)) {
print_header("$site->fullname : $strsearch", $site->fullname,
Expand Down Expand Up @@ -311,7 +312,12 @@
}

} else {
print_heading(get_string("nocoursesfound", "", s($search, true)));
if (!empty($search)) {
print_heading(get_string("nocoursesfound", "", s($search, true)));
}
else {
print_heading( $strnovalidcourses );
}
}

echo "<br /><br />";
Expand Down
1 change: 1 addition & 0 deletions lang/en_utf8/moodle.php
Expand Up @@ -1019,6 +1019,7 @@
$string['nousersmatching'] = 'No users matching \'$a\' were found';
$string['nousersyet'] = 'There are no users yet';
$string['now'] = 'now';
$string['novalidcourses'] = 'No valid courses to be shown';
$string['numattempts'] = '$a failed login attempt(s)';
$string['numberweeks'] = 'Number of weeks/topics';
$string['numdays'] = '$a days';
Expand Down

0 comments on commit 3cae730

Please sign in to comment.