commit d33282d6432505ed9495e792ff335cd3b71633d1
Author: root <root@srv-xen-moodle08.tauntons.ac.uk>
Date:   Mon Jun 22 14:52:04 2009 +0100

    Added error lang strings for del.php, and sorted lang strings alphabetically

diff --git a/blocks/createparent/del.php b/blocks/createparent/del.php
index 0534d7d..b71a6c6 100644
--- a/blocks/createparent/del.php
+++ b/blocks/createparent/del.php
@@ -15,7 +15,7 @@
 
     $context = get_context_instance(CONTEXT_SYSTEM);
     if ( !(has_capability('block/createparent:editown', $context)and $studentid==$USER->id)and!(has_capability('block/createparent:editany', $context))){
-        print_error('nopermission','block_createparent');//TODO:make it actually print the error
+        print_error('nopermission','block_createparent');
     }
 
     $cfg_createparent = get_config('block/createparent');
@@ -23,7 +23,7 @@
     //check that parent really is a parent of student
     $studentcontext = get_context_instance(CONTEXT_USER, $studentid);
     if (!get_record('role_assignments','userid',$id,'contextid',$studentcontext->id)){
-        print_error('notaparent','block_createparent');//TODO:make it actually print the error
+        print_error('notaparent','block_createparent');
     }
 
     $parent=get_record('user','id',$id);
diff --git a/blocks/createparent/lang/en_utf8/block_createparent.php b/blocks/createparent/lang/en_utf8/block_createparent.php
index 126f87c..4e748cf 100644
--- a/blocks/createparent/lang/en_utf8/block_createparent.php
+++ b/blocks/createparent/lang/en_utf8/block_createparent.php
@@ -1,22 +1,24 @@
 <?php
 
+$string['addparent']         = 'Add a parent account';
 $string['blockname']         = 'Create Parent Accounts';
+$string['createuserfail']         = 'There was an error creating the parent account';
+$string['defaultemailbody']  =    'Welcome to [sitename], a parent account has been created for you for the student [studentname]; to access this account go to [siteurl] and login with the username: [username] and the password: [password]';
+$string['delsucess']         = 'The parent account has been sucessfully deleted';
+$string['emailbody']         = 'Email body text';
+$string['emailbody_explain']         = 'What should the test of the welcome email say? You can use the following dynamic data: [sitename],[siteurl],[studentname],[username],[password]';
+$string['emailuser']         = 'Email from User';
+$string['emailuser_explain']         = 'A welcome email will be sent to the parent, select a user for the from field';
+$string['nopermission']         = 'You do not have permission to delete this user';
+$string['notaparent']           = 'This student has no parent to delete';
+$string['notconfigured']         = 'This block is not properly configured.';
+$string['parentprefix']         = 'Parent Prefix';
+$string['parentprefix_explain']         = 'This will be prefixed to the usename of all parent accounts to allow easy identification';
 $string['parentrole']         = 'Parent Role';
 $string['parentrole_explain']         = 'What role should the parent accounts be created with (in user context)?';
 $string['selectrole']        =      'Select a role';
-$string['parentprefix']         = 'Parent Prefix';
-$string['parentprefix_explain']         = 'This will be prefixed to the usename of all parent accounts to allow easy identification';
-$string['emailuser']         = 'Email from User';
-$string['emailuser_explain']         = 'A welcome email will be sent to the parent, select a user for the from field';
-$string['emailbody']         = 'Email body text';
-$string['emailbody_explain']         = 'What should the test of the welcome email say? You can use the following dynamic data: [sitename],[siteurl],[studentname],[username],[password]';
-$string['defaultemailbody']  =    'Welcome to [sitename], a parent account has been created for you for the student [studentname]; to access this account go to [siteurl] and login with the username: [username] and the password: [password]';
-$string['addparent']         = 'Add a parent account';
 $string['sendemail']        = 'Send Email';
 $string['sendemail_explain']    = 'Send a notification e-mail to the address entered for the Parent Account? If un-ticked, the following fields will be ignored.';
 $string['sucess']         = 'A parent account has been sucessfully created';
-$string['delsucess']         = 'The parent account has been sucessfully deleted';
-$string['createuserfail']         = 'There was an error creating the parent account';
-$string['notconfigured']         = 'This block is not properly configured.';
 
 ?>
\ No newline at end of file

