]> git.mjollnir.org Git - moodle.git/commitdiff
mnet: Replace a hardcoded string: MDL-8069
authordonal72 <donal72>
Wed, 10 Jan 2007 00:32:42 +0000 (00:32 +0000)
committerdonal72 <donal72>
Wed, 10 Jan 2007 00:32:42 +0000 (00:32 +0000)
enrol/mnet/remote_enrolment.php

index 7b14eacb3aa4d16c4f2d536cb03f13bf86bb1729..b18c10ae7c2df8c9538ffdfbfe5e7e7c0772dfd0 100644 (file)
@@ -19,7 +19,7 @@
      $course = get_record('mnet_enrol_course', 'id', $courseid, 'hostid', $mnethost->id);
 
     if (empty($mnethost) || empty($course)) {
-        error("Host or course not found");
+        print_error('hostcoursenotfound','mnet');
     }
 
     define("MAX_USERS_PER_PAGE", 5000);
                     continue;
                 }
                 if (! $enrolment->req_enrol_user($adduser, $course->id)) {
-                    $errors[] = "Could not add user with id $adduser to this role!";
+                    $errors[] = "Could not add user with id $adduser to course {$course->id}!";
                 }
             }
         } else if ($remove and !empty($frm->removeselect) and confirm_sesskey()) {
             foreach ($frm->removeselect as $removeuser) {
                 $removeuser = clean_param($removeuser, PARAM_INT);
                 if (! $enrolment->req_unenrol_user($removeuser, $course->id)) {
-                    $errors[] = "Could not remove user with id $removeuser from this role!";
+                    $errors[] = "Could not remove user with id $removeuser from course {$course->id}!";
                 }
             }
         } else if ($showall) {
@@ -118,7 +118,7 @@ admin_externalpage_print_header($adminroot);
 print_simple_box_start("center", "80%");
 
 print_simple_box_start("center", "60%", '', 5, 'informationbox');
-print "Enrolling in course " . s($course->shortname) . ' on host ' . s($mnethost->name) ."</p>";
+print_string('enrollingincourse', 'mnet', array(s($course->shortname), s($mnethost->name)));
 print_string("description", "enrol_mnet");
 print_simple_box_end();
 
@@ -140,7 +140,7 @@ echo "<hr />";
         }
 
 
-
+print_simple_box_end();
 admin_externalpage_print_footer($adminroot);
 
 ?>