Changed 'enrollment' to 'enrolment' to conform to Moodle core (#328)

Also minor changes like ordering strings alphabetically and adding
full-stops.
This commit is contained in:
Mark Nelson 2020-08-08 19:04:58 +02:00
parent 22b156be8f
commit 9d70a88e74
2 changed files with 10 additions and 10 deletions

View file

@ -59,12 +59,12 @@ define('CUSTOMCERT_DATE_CURRENT_DATE', '-5');
/** /**
* Date - Enrollment start * Date - Enrollment start
*/ */
define('CUSTOMCERT_DATE_ENROLLMENT_START', '-6'); define('CUSTOMCERT_DATE_ENROLMENT_START', '-6');
/** /**
* Date - Entrollment end * Date - Entrollment end
*/ */
define('CUSTOMCERT_DATE_ENROLLMENT_END', '-7'); define('CUSTOMCERT_DATE_ENROLMENT_END', '-7');
require_once($CFG->dirroot . '/lib/grade/constants.php'); require_once($CFG->dirroot . '/lib/grade/constants.php');
@ -93,8 +93,8 @@ class element extends \mod_customcert\element {
if ($completionenabled) { if ($completionenabled) {
$dateoptions[CUSTOMCERT_DATE_COMPLETION] = get_string('completiondate', 'customcertelement_date'); $dateoptions[CUSTOMCERT_DATE_COMPLETION] = get_string('completiondate', 'customcertelement_date');
} }
$dateoptions[CUSTOMCERT_DATE_ENROLLMENT_START] = get_string('enrollmentstartdate', 'customcertelement_date'); $dateoptions[CUSTOMCERT_DATE_ENROLMENT_START] = get_string('enrolmentstartdate', 'customcertelement_date');
$dateoptions[CUSTOMCERT_DATE_ENROLLMENT_END] = get_string('enrollmentenddate', 'customcertelement_date'); $dateoptions[CUSTOMCERT_DATE_ENROLMENT_END] = get_string('enrolmentenddate', 'customcertelement_date');
$dateoptions[CUSTOMCERT_DATE_COURSE_START] = get_string('coursestartdate', 'customcertelement_date'); $dateoptions[CUSTOMCERT_DATE_COURSE_START] = get_string('coursestartdate', 'customcertelement_date');
$dateoptions[CUSTOMCERT_DATE_COURSE_END] = get_string('courseenddate', 'customcertelement_date'); $dateoptions[CUSTOMCERT_DATE_COURSE_END] = get_string('courseenddate', 'customcertelement_date');
@ -177,8 +177,8 @@ class element extends \mod_customcert\element {
$date = $timecompleted->timecompleted; $date = $timecompleted->timecompleted;
} }
} }
} else if ($dateitem == CUSTOMCERT_DATE_ENROLLMENT_START) { } else if ($dateitem == CUSTOMCERT_DATE_ENROLMENT_START) {
// Get the enrollment start date // Get the enrolment start date.
$sql = "SELECT ue.timestart FROM {enrol} e JOIN {user_enrolments} ue ON ue.enrolid = e.id $sql = "SELECT ue.timestart FROM {enrol} e JOIN {user_enrolments} ue ON ue.enrolid = e.id
WHERE e.courseid = :courseid WHERE e.courseid = :courseid
AND ue.userid = :userid"; AND ue.userid = :userid";
@ -187,8 +187,8 @@ class element extends \mod_customcert\element {
$date = $timestart->timestart; $date = $timestart->timestart;
} }
} }
} else if ($dateitem == CUSTOMCERT_DATE_ENROLLMENT_END) { } else if ($dateitem == CUSTOMCERT_DATE_ENROLMENT_END) {
// Get the enrollment end date // Get the enrolment end date.
$sql = "SELECT ue.timeend FROM {enrol} e JOIN {user_enrolments} ue ON ue.enrolid = e.id $sql = "SELECT ue.timeend FROM {enrol} e JOIN {user_enrolments} ue ON ue.enrolid = e.id
WHERE e.courseid = :courseid WHERE e.courseid = :courseid
AND ue.userid = :userid"; AND ue.userid = :userid";

View file

@ -26,8 +26,8 @@ $string['completiondate'] = 'Completion date';
$string['courseenddate'] = 'Course end date'; $string['courseenddate'] = 'Course end date';
$string['coursegradedate'] = 'Course grade date'; $string['coursegradedate'] = 'Course grade date';
$string['coursestartdate'] = 'Course start date'; $string['coursestartdate'] = 'Course start date';
$string['enrollmentstartdate'] = 'Enrollment start date'; $string['enrolmentenddate'] = 'Enrolment end date';
$string['enrollmentenddate'] = 'Enrollment end date'; $string['enrolmentstartdate'] = 'Enrolment start date';
$string['currentdate'] = 'Current date'; $string['currentdate'] = 'Current date';
$string['dateformat'] = 'Date format'; $string['dateformat'] = 'Date format';
$string['dateformat_help'] = 'This is the format of the date that will be displayed'; $string['dateformat_help'] = 'This is the format of the date that will be displayed';