MDL-11124 - Allowed 'There are no [modulename]' translations. This is currently
authorpoltawski <poltawski>
Mon, 29 Oct 2007 10:44:50 +0000 (10:44 +0000)
committerpoltawski <poltawski>
Mon, 29 Oct 2007 10:44:50 +0000 (10:44 +0000)
hardcoded and can be discovered through the user interface resonably easily.

Merged from MOODLE_19_STABLE

17 files changed:
lang/en_utf8/moodle.php
mod/chat/index.php
mod/choice/index.php
mod/data/index.php
mod/exercise/index.php
mod/exercise/locallib.php
mod/glossary/index.php
mod/hotpot/index.php
mod/journal/index.php
mod/lams/index.php
mod/lesson/index.php
mod/quiz/index.php
mod/resource/index.php
mod/scorm/index.php
mod/survey/index.php
mod/wiki/index.php
mod/workshop/index.php

index 555a5c560a7f6f8f13e506a63f3cdfbf0cd89389..dc9c29473cc107599e6e9744b23f206af09f6cb3 100644 (file)
@@ -1428,6 +1428,7 @@ $string['thanks'] = 'Thanks';
 $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';
index 84daca9740837c23109b05d241838bf4e8a7ea7e..a9a365fe9bbfcafaa6b4687dca18fe76c59313a3 100644 (file)
@@ -31,7 +31,7 @@
 /// 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();
     }
 
index 27924d75a9fdd5ac57c4a84e849f5111b38ae1b3..3b0706c71017776bb59c234210faddcf4112aa49 100644 (file)
@@ -23,7 +23,7 @@
 
 
     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)) {
index d069bc2001fe3dc756f47fffdf16e5abe3b2dd36..9d98d049e83a324eadeeee3b07803174bc8a5041 100755 (executable)
@@ -41,6 +41,7 @@
     $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');    
@@ -49,7 +50,7 @@
     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();
index 5be04f65e51c07d2a4de1266c794796bcc5bcb03..7b50f834f829d0c8abe85160e34ced06e9429164 100644 (file)
@@ -31,7 +31,7 @@
     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;
     }
 
index b607c74904774bd3ff4adba9db4160ca9009ccce..be2528977915ce5666025d6c490b2393ad5446dd 100644 (file)
@@ -2796,7 +2796,7 @@ function exercise_print_teacher_table($course) {
 // 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;
     }
 
index b3209f24583d28325cadce4f4c02856b5e9e6393..14365f21d6d30ec41f921ad4663bab1173c86db4 100644 (file)
@@ -36,7 +36,7 @@
 /// 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
+?>
index cf9d727ade1cbaa92614ac76b1345fa9814090f0..7077710f8da8a0018fe734849eab34456231a2dd 100644 (file)
@@ -74,7 +74,7 @@
         }
     }
     if (empty($hotpots)) {
-        notice("There are no $strmodulenameplural", $next_url);
+        notice(get_string('thereareno', 'moodle', $strmodulenameplural), $next_url);
         exit;
     }
     $hotpotids = implode(',', array_keys($hotpots));
index a71b6c06a100508228425abcd33f40812c7a5c10..52dd12bf7cd644b399e1812170afba34dcd8be35 100644 (file)
@@ -26,7 +26,7 @@
 
 
     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;
     }
 
index 4fa817c89906b711e61b1109011baae0621d83ff..94fae61b8142c273b0f48f9b8f5be4108334d214 100644 (file)
@@ -33,7 +33,7 @@
 /// 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;
     }
 
index a28404b903984857f178d9c3480ef22f60452d31..0b9ce3ba20c3c70a6ca9c4185933967f4910c34e 100644 (file)
@@ -39,7 +39,7 @@
 /// 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;
     }
 
index e3bed8b6d50cea4fd136478ccd18e8433070ad3b..3de177a3d2f7326d823f9948f14e0b268daabfaa 100644 (file)
@@ -40,7 +40,7 @@
 
 // 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;
     }
 
index 5172ea1f5e14043c10425a335d9b65381a52aa71..657783e45caa3760e5fead2b9c62a6a18055e1e3 100644 (file)
@@ -31,7 +31,7 @@
                  "", "", 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;
     }
 
index 92c9ee8a0cf73b9e3584b34e67a154ef553fd79f..b02db29588e98407416a0c68b43e9646d99f4933 100755 (executable)
@@ -40,7 +40,7 @@
     }
 
     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;
     }
 
index 7ea8a4fed4ef46c6c3bd98b0dae0cd1dc09b1d20..ab99905958dd4572207b7b49b4f44f23f44eb4af 100644 (file)
@@ -29,7 +29,7 @@
                  "", "", 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") {
index 5f7f351643dde8407be560f489ba84cb00006fe8..396499ccb90e95a55c01cfb05bbe07098fddfdf6 100644 (file)
@@ -33,7 +33,7 @@
 /// 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;
     }
 
index d52d8d245e288a08cfcae47b7dca151f6775d516..d08ba27f4360c06c9a058f2e48c8c4f2d1e025fe 100644 (file)
@@ -30,7 +30,7 @@
     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;
     }