hardcoded and can be discovered through the user interface resonably easily.
Merged from MOODLE_19_STABLE
$string['theme'] = 'Theme';
$string['themes'] = 'Themes';
$string['themesaved'] = 'New theme saved';
+$string['thereareno'] = 'There are no $a in this course';
$string['thischarset'] = 'UTF-8';
$string['thisdirection'] = 'ltr';
$string['thislanguage'] = 'English';
/// Get all the appropriate data
if (! $chats = get_all_instances_in_course('chat', $course)) {
- notice('There are no chats', "../../course/view.php?id=$course->id");
+ notice(get_string('thereareno', 'moodle', $strchats), "../../course/view.php?id=$course->id");
die();
}
if (! $choices = get_all_instances_in_course("choice", $course)) {
- notice("There are no choices", "../../course/view.php?id=$course->id");
+ notice(get_string('thereareno', 'moodle', $strchoices), "../../course/view.php?id=$course->id");
}
if ( !empty($USER->id) and $allanswers = get_records("choice_answers", "userid", $USER->id)) {
$strtopic = get_string('topic');
$strname = get_string('name');
$strdata = get_string('modulename','data');
+ $strdataplural = get_string('modulenameplural','data');
$navlinks = array();
$navlinks[] = array('name' => $strdata, 'link' => "index.php?id=$course->id", 'type' => 'activity');
print_header_simple($strdata, '', $navigation, '', '', true, "", navmenu($course));
if (! $datas = get_all_instances_in_course("data", $course)) {
- notice("There are no databases", "$CFG->wwwroot/course/view.php?id=$course->id");
+ notice(get_string('thereareno', 'moodle',$strdataplural) , "$CFG->wwwroot/course/view.php?id=$course->id");
}
$timenow = time();
print_header_simple("$strexercises", "", $navigation, "", "", true, "", navmenu($course));
if (! $exercises = get_all_instances_in_course("exercise", $course)) {
- notice("There are no exercises", "../../course/view.php?id=$course->id");
+ notice(get_string('thereareno', 'moodle', $strexercises), "../../course/view.php?id=$course->id");
die;
}
// print how many assessments each teacher has done in each exercise
if (! $exercises = get_all_instances_in_course("exercise", $course)) {
- notice("There are no exercises", "../../course/view.php?id=$course->id");
+ notice(get_string('thereareno', 'moodle', get_string('modulenameplural', 'exercise')), "../../course/view.php?id=$course->id");
die;
}
/// Get all the appropriate data
if (! $glossarys = get_all_instances_in_course("glossary", $course)) {
- notice("There are no glossaries", "../../course/view.php?id=$course->id");
+ notice(get_string('thereareno', 'moodle', $strglossarys), "../../course/view.php?id=$course->id");
die;
}
print_footer($course);
-?>
\ No newline at end of file
+?>
}
}
if (empty($hotpots)) {
- notice("There are no $strmodulenameplural", $next_url);
+ notice(get_string('thereareno', 'moodle', $strmodulenameplural), $next_url);
exit;
}
$hotpotids = implode(',', array_keys($hotpots));
if (! $journals = get_all_instances_in_course("journal", $course)) {
- notice("There are no journals", "../../course/view.php?id=$course->id");
+ notice(get_string('thereareno', 'moodle', $strjournals), "../../course/view.php?id=$course->id");
die;
}
/// Get all the appropriate data
if (! $lamss = get_all_instances_in_course("lams", $course)) {
- notice("There are no lams", "../../course/view.php?id=$course->id");
+ notice(get_string('thereareno', 'moodle', $strlamss) , "../../course/view.php?id=$course->id");
die;
}
/// Get all the appropriate data
if (! $lessons = get_all_instances_in_course("lesson", $course)) {
- notice("There are no lessons", "../../course/view.php?id=$course->id");
+ notice(get_string('thereareno', 'moodle', $strlessons), "../../course/view.php?id=$course->id");
die;
}
// Get all the appropriate data
if (!$quizzes = get_all_instances_in_course("quiz", $course)) {
- notice("There are no quizzes", "../../course/view.php?id=$course->id");
+ notice(get_string('thereareno', 'moodle', $strquizzes), "../../course/view.php?id=$course->id");
die;
}
"", "", true, "", navmenu($course));
if (! $resources = get_all_instances_in_course("resource", $course)) {
- notice("There are no resources", "../../course/view.php?id=$course->id");
+ notice(get_string('thereareno', 'moodle', $strresources), "../../course/view.php?id=$course->id");
exit;
}
}
if (! $scorms = get_all_instances_in_course("scorm", $course)) {
- notice("There are no scorms", "../../course/view.php?id=$course->id");
+ notice(get_string('thereareno', 'moodle', $strscorms), "../../course/view.php?id=$course->id");
exit;
}
"", "", true, "", navmenu($course));
if (! $surveys = get_all_instances_in_course("survey", $course)) {
- notice("There are no surveys.", "../../course/view.php?id=$course->id");
+ notice(get_string('thereareno', 'moodle', $strsurveys), "../../course/view.php?id=$course->id");
}
if ($course->format == "weeks") {
/// Get all the appropriate data
if (! $wikis = get_all_instances_in_course("wiki", $course)) {
- notice("There are no wikis", "../../course/view.php?id=$course->id");
+ notice(get_string('thereareno', 'moodle', $strwikis), "../../course/view.php?id=$course->id");
die;
}
print_header_simple("$strworkshops", "", $navigation, "", "", true, "", navmenu($course));
if (! $workshops = get_all_instances_in_course("workshop", $course)) {
- notice("There are no workshops", "../../course/view.php?id=$course->id");
+ notice(get_string('thereareno', 'moodle', $strworkshops), "../../course/view.php?id=$course->id");
die;
}