';
}
@@ -99,5 +100,55 @@ function get_access_icons($course) {
}
+/// Override the base class config_form() function
+function config_form($frm) {
+ global $CFG;
+
+ $paypalcurrencies = array( 'USD' => 'US Dollars',
+ 'EUR' => 'Euros',
+ 'JPY' => 'Japanese Yen',
+ 'GBP' => 'British Pounds',
+ 'CAD' => 'Canadian Dollars'
+ );
+
+ include("$CFG->dirroot/enrol/paypal/config.html");
+}
+
+function process_config($config) {
+
+ if (!isset($config->enrol_cost)) {
+ $config->enrol_cost = 0;
+ }
+ set_config('enrol_cost', $config->enrol_cost);
+
+ if (!isset($config->enrol_currency)) {
+ $config->enrol_currency = 'USD';
+ }
+ set_config('enrol_currency', $config->enrol_currency);
+
+ if (!isset($config->enrol_paypalbusiness)) {
+ $config->enrol_paypalbusiness = '';
+ }
+ set_config('enrol_paypalbusiness', $config->enrol_paypalbusiness);
+
+ if (!isset($config->enrol_mailstudents)) {
+ $config->enrol_mailstudents = '';
+ }
+ set_config('enrol_mailstudents', $config->enrol_mailstudents);
+
+ if (!isset($config->enrol_mailteachers)) {
+ $config->enrol_mailteachers = '';
+ }
+ set_config('enrol_mailteachers', $config->enrol_mailteachers);
+
+ if (!isset($config->enrol_mailadmins)) {
+ $config->enrol_mailadmins = '';
+ }
+ set_config('enrol_mailadmins', $config->enrol_mailadmins);
+
+ return true;
+
+}
+
} // end of class definition
diff --git a/enrol/paypal/ipn.php b/enrol/paypal/ipn.php
index f12609f2e7..1212bed72b 100644
--- a/enrol/paypal/ipn.php
+++ b/enrol/paypal/ipn.php
@@ -156,15 +156,30 @@
} else {
$teacher = get_teacher($course->id);
- if (!empty($CFG->enrol_paypalmailstudents)) {
+ if (!empty($CFG->enrol_mailstudents)) {
$a->coursename = "$course->fullname";
$a->profileurl = "$CFG->wwwroot/user/view.php?id=$user->id";
- email_to_user($user, $teacher, get_string("enrolmentnew", '', $course->shortname), get_string('welcometocoursetext', '', $a));
+ email_to_user($user, $teacher, get_string("enrolmentnew", '', $course->shortname),
+ get_string('welcometocoursetext', '', $a));
}
- if (!empty($CFG->enrol_paypalmailteachers)) {
- email_to_user($teacher, $user, get_string("enrolmentnew", '', $course->shortname), "I have enrolled in your class via Paypal");
+ if (!empty($CFG->enrol_mailteachers)) {
+ $a->course = "$course->fullname";
+ $a->user = fullname($user);
+ email_to_user($teacher, $user, get_string("enrolmentnew", '', $course->shortname),
+ get_string('enrolmentnewuser', '', $a));
}
+
+ if (!empty($CFG->enrol_mailadmins)) {
+ $a->course = "$course->fullname";
+ $a->user = fullname($user);
+ $admins = get_admins();
+ foreach ($admins as $admin) {
+ email_to_user($admin, $user, get_string("enrolmentnew", '', $course->shortname),
+ get_string('enrolmentnewuser', '', $a));
+ }
+ }
+
}
diff --git a/lang/en/enrol_database.php b/lang/en/enrol_database.php
new file mode 100755
index 0000000000..9576a383c0
--- /dev/null
+++ b/lang/en/enrol_database.php
@@ -0,0 +1,17 @@
+
diff --git a/lang/en/enrol_flatfile.php b/lang/en/enrol_flatfile.php
index 0f42669fe9..c026da664b 100644
--- a/lang/en/enrol_flatfile.php
+++ b/lang/en/enrol_flatfile.php
@@ -1,7 +1,22 @@
+ add, student, 5, CF101
+ add, teacher, 6, CF101
+ add, teacheredit, 7, CF101
+ del, student, 8, CF101
+ del, student, 17, CF101
+ add, student, 21, CF101, 1091115000, 1091215000
+
+';
+
$string['filelockedmailsubject'] = 'Important error: Enrolment file';
$string['filelockedmail'] = 'The text file you are using for file-based enrolments ($a) can not be deleted by the cron process. This usually means the permissions are wrong on it. Please fix the permissions so that Moodle can delete the file, otherwise it might be processed repeatedly.';
+$string['location'] = 'File location';
+$string['mailusers'] = 'Notify users by email';
+$string['mailadmin'] = 'Notify admin by email';
?>
diff --git a/lang/en/enrol_internal.php b/lang/en/enrol_internal.php
index ad7139c42c..0f992b0ced 100644
--- a/lang/en/enrol_internal.php
+++ b/lang/en/enrol_internal.php
@@ -2,4 +2,12 @@
$string['enrolname'] = 'Internal Enrolment';
+$string['description'] = 'This is the default form of enrolment. There are two main ways a student can be enrolled in a particular course.
+
+
A teacher or admin can enrol them manually using the link in the Course Administration menu
+ within the course.
+
A course can have a password defined, known as an \"enrolment key\". Anyone who knows this key is
+ able to add themselves to a course.
+
';
+
?>
diff --git a/lang/en/enrol_paypal.php b/lang/en/enrol_paypal.php
index 71baabb6df..95fe7d6786 100644
--- a/lang/en/enrol_paypal.php
+++ b/lang/en/enrol_paypal.php
@@ -1,6 +1,10 @@
diff --git a/lang/en/install.php b/lang/en/install.php
index 6baf2f1b53..ba5a815ec0 100755
--- a/lang/en/install.php
+++ b/lang/en/install.php
@@ -12,7 +12,7 @@ $string['admindirsetting'] = "
$string['caution'] = 'Caution';
$string['chooselanguage'] = 'Choose a language';
$string['compatibilitysettings'] = 'Checking your PHP settings ...';
-$string['configfilenotwritten'] = "The installer script was not able to automatically create a config.php file containing your chosen settings. Please copy the following code into a file named config.php within the root directory of Moodle.";
+$string['configfilenotwritten'] = "The installer script was not able to automatically create a config.php file containing your chosen settings, probably because the Moodle directory is not writeable. You can manually copy the following code into a file named config.php within the root directory of Moodle.";
$string['configfilewritten'] = "config.php has been successfully created";
$string['configurationcomplete'] = 'Configuration completed';
diff --git a/lang/en/moodle.php b/lang/en/moodle.php
index 8dda36bc33..46e39bdc14 100644
--- a/lang/en/moodle.php
+++ b/lang/en/moodle.php
@@ -69,6 +69,7 @@ $string['allgroups'] = 'All groups';
$string['alllogs'] = 'All logs';
$string['allow'] = 'Allow';
$string['allowguests'] = 'This course allows guest users to enter';
+$string['allowinternal'] = 'Allow internal methods as well';
$string['allownot'] = 'Do not allow';
$string['allparticipants'] = 'All participants';
$string['alphabet'] = 'A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,S,T,U,V,W,X,Y,Z';
@@ -132,6 +133,7 @@ $string['checkingsections'] = 'Checking sections';
$string['checklanguage'] = 'Check language';
$string['choose'] = 'Choose';
$string['choosecourse'] = 'Choose a course';
+$string['chooseenrolmethod'] = 'Primary method of enrolment';
$string['chooselivelogs'] = 'Or watch current activity';
$string['chooselogs'] = 'Choose which logs you want to see';
$string['choosereportfilter'] = 'Choose a filter for the report';
@@ -205,6 +207,7 @@ $string['copyinguserfiles'] = 'Copying user files';
$string['copyingzipfile'] = 'Copying zip file';
$string['copyrightnotice'] = 'Copyright notice';
$string['cost'] = 'Cost';
+$string['costdefault'] = 'Default cost';
$string['country'] = 'Country';
$string['course'] = 'Course';
$string['courseavailable'] = 'This course is available to students';
@@ -237,6 +240,7 @@ $string['creatingsections'] = 'Creating sections';
$string['creatingtemporarystructures'] = 'Creating temporary structures';
$string['creatingusers'] = 'Creating users';
$string['creatingxmlfile'] = 'Creating XML file';
+$string['currency'] = 'Currency';
$string['currentcourseadding'] = 'Current course, adding data to it';
$string['currentcoursedeleting'] = 'Current course, deleting it first';
$string['currentlanguage'] = 'Current language';
@@ -381,6 +385,7 @@ password that you should have received from $a';
$string['enrolmentkeyhint'] = 'That enrolment key was incorrect, please try again
(Here\'s a hint - it starts with \'$a\')';
$string['enrolmentnew'] = 'New enrolment in $a';
+$string['enrolmentnewuser'] = '$a->user has enrolled in course \"$a->course\"';
$string['enrolmentnointernal'] = 'Manual enrolments are currently not enabled';
$string['enrolmentnotyet'] = 'Sorry, you can not access this course until $a';
$string['enrolments'] = 'Enrolments';
@@ -590,6 +595,9 @@ $string['loginto'] = 'Login to $a';
$string['loginusing'] = 'Login here using your username and password';
$string['logout'] = 'Logout';
$string['logs'] = 'Logs';
+$string['mailstudents'] = 'Inform students';
+$string['mailteachers'] = 'Inform teachers';
+$string['mailadmins'] = 'Inform admins';
$string['mainmenu'] = 'Main menu';
$string['makeafolder'] = 'Make a folder';
$string['makeeditable'] = 'If you make \'$a\' editable by the web server process (eg apache) then you could edit this file directly from this page';
--
2.39.5