Skip to content

Commit

Permalink
MDL-70610 core: Fix typos (alot -> a lot, acces -> access, etc)
Browse files Browse the repository at this point in the history
  • Loading branch information
kevpercy committed Jan 20, 2025
1 parent a2653cc commit 8d3a5d9
Show file tree
Hide file tree
Showing 9 changed files with 47 additions and 47 deletions.
4 changes: 2 additions & 2 deletions admin/tool/dataprivacy/tests/user_deleted_observer_test.php
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ public function test_create_delete_data_request_ongoing_delete_data_request_pree
* Ensure that a delete data request is being created upon user deletion
* if a finished delete data request (excluding complete) for that user already exists.
*/
public function test_create_delete_data_request_canceled_delete_data_request_preexists(): void {
public function test_create_delete_data_request_cancelled_delete_data_request_preexists(): void {
$this->resetAfterTest();
$this->setAdminUser();

Expand All @@ -135,7 +135,7 @@ public function test_create_delete_data_request_canceled_delete_data_request_pre
$requestid = $datarequest->get('id');
api::update_request_status($requestid, api::DATAREQUEST_STATUS_CANCELLED);

// Validate that delete data request has been created and the status has been updated to 'Canceled'.
// Validate that delete data request has been created and the status has been updated to 'Cancelled'.
$this->assertEquals(1, api::get_data_requests_count($user->id, [], [api::DATAREQUEST_TYPE_DELETE]));
$this->assertFalse(api::has_ongoing_request($user->id, api::DATAREQUEST_TYPE_DELETE));

Expand Down
66 changes: 33 additions & 33 deletions competency/classes/api.php
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ public static function is_scale_used_anywhere($scaleid) {
}

/**
* Validate if current user have acces to the course_module if hidden.
* Validate if current user has access to the course_module if hidden.
*
* @param mixed $cmmixed The cm_info class, course module record or its ID.
* @param bool $throwexception Throw an exception or not.
Expand Down Expand Up @@ -152,7 +152,7 @@ protected static function validate_course_module($cmmixed, $throwexception = tru
}

/**
* Validate if current user have acces to the course if hidden.
* Validate if current user has access to the course if hidden.
*
* @param mixed $courseorid The course or it ID.
* @param bool $throwexception Throw an exception or not.
Expand Down Expand Up @@ -454,7 +454,7 @@ public static function update_competency($record) {
}

/**
* Read a the details for a single competency and return a record.
* Read the details for a single competency and return a record.
*
* Requires moodle/competency:competencyview capability at the system context.
*
Expand Down Expand Up @@ -484,7 +484,7 @@ public static function read_competency($id, $includerelated = false) {
}

/**
* Perform a text search based and return all results and their parents.
* Perform a search based on a text and return all results and their parents.
*
* Requires moodle/competency:competencyview capability at the framework context.
*
Expand Down Expand Up @@ -615,7 +615,7 @@ public static function duplicate_framework($id) {
$framework->set('id', 0);
$framework = $framework->create();

// Array that match the old competencies ids with the new one to use when copying related competencies.
// Array that matches the old competencies ids with the new one to use when copying related competencies.
$frameworkcompetency = competency::get_framework_tree($id);
$matchids = self::duplicate_competency_tree($framework->get('id'), $frameworkcompetency, 0, 0);

Expand Down Expand Up @@ -705,7 +705,7 @@ public static function delete_framework($id) {
// Commit the transaction.
$transaction->allow_commit();

// If all operations are successfull then trigger the delete event.
// If all operations are successful then trigger the delete event.
$event->trigger();

// Trigger deleted event competencies.
Expand Down Expand Up @@ -744,7 +744,7 @@ public static function update_framework($record) {
}

/**
* Read a the details for a single competency framework and return a record.
* Read the details for a single competency framework and return a record.
*
* Requires moodle/competency:competencyview capability at the system context.
*
Expand All @@ -763,7 +763,7 @@ public static function read_framework($id) {
}

/**
* Logg the competency framework viewed event.
* Log the competency framework viewed event.
*
* @param competency_framework|int $frameworkorid The competency_framework object or competency framework id
* @return bool
Expand All @@ -784,7 +784,7 @@ public static function competency_framework_viewed($frameworkorid) {
}

/**
* Logg the competency viewed event.
* Log the competency viewed event.
*
* @param competency|int $competencyorid The competency object or competency id
* @return bool
Expand Down Expand Up @@ -1025,7 +1025,7 @@ public static function list_course_module_competencies_in_course_module($cmorid)
$cm = get_coursemodule_from_id('', $cmorid, 0, true, MUST_EXIST);
}

// Check the user have access to the course module.
// Check the user has access to the course module.
self::validate_course_module($cm);
$context = context_module::instance($cm->id);

Expand Down Expand Up @@ -1084,7 +1084,7 @@ public static function list_courses_using_competency($competencyid) {
*/
public static function count_proficient_competencies_in_course_for_user($courseid, $userid) {
static::require_enabled();
// Check the user have access to the course.
// Check the user has access to the course.
self::validate_course($courseid);

// First we do a permissions check.
Expand All @@ -1107,7 +1107,7 @@ public static function count_proficient_competencies_in_course_for_user($coursei
*/
public static function count_competencies_in_course($courseid) {
static::require_enabled();
// Check the user have access to the course.
// Check the user has access to the course.
self::validate_course($courseid);

// First we do a permissions check.
Expand Down Expand Up @@ -1138,7 +1138,7 @@ public static function list_course_competencies($courseorid) {
$course = get_course($courseorid);
}

// Check the user have access to the course.
// Check the user has access to the course.
self::validate_course($course);
$context = context_course::instance($course->id);

Expand Down Expand Up @@ -1217,7 +1217,7 @@ public static function count_course_module_competencies($cmorid) {
$cm = get_coursemodule_from_id('', $cmorid, 0, true, MUST_EXIST);
}

// Check the user have access to the course module.
// Check the user has access to the course module.
self::validate_course_module($cm);
$context = context_module::instance($cm->id);

Expand Down Expand Up @@ -1245,7 +1245,7 @@ public static function list_course_module_competencies($cmorid) {
$cm = get_coursemodule_from_id('', $cmorid, 0, true, MUST_EXIST);
}

// Check the user have access to the course module.
// Check the user has access to the course module.
self::validate_course_module($cm);
$context = context_module::instance($cm->id);

Expand Down Expand Up @@ -1457,7 +1457,7 @@ public static function add_competency_to_course_module($cmorid, $competencyid) {
$cm = get_coursemodule_from_id('', $cmorid, 0, true, MUST_EXIST);
}

// Check the user have access to the course module.
// Check the user has access to the course module.
self::validate_course_module($cm);

// First we do a permissions check.
Expand Down Expand Up @@ -1499,7 +1499,7 @@ public static function remove_competency_from_course_module($cmorid, $competency
if (!is_object($cmorid)) {
$cm = get_coursemodule_from_id('', $cmorid, 0, true, MUST_EXIST);
}
// Check the user have access to the course module.
// Check the user has access to the course module.
self::validate_course_module($cm);

// First we do a permissions check.
Expand Down Expand Up @@ -1535,7 +1535,7 @@ public static function reorder_course_module_competency($cmorid, $competencyidfr
if (!is_object($cmorid)) {
$cm = get_coursemodule_from_id('', $cmorid, 0, true, MUST_EXIST);
}
// Check the user have access to the course module.
// Check the user has access to the course module.
self::validate_course_module($cm);

// First we do a permissions check.
Expand Down Expand Up @@ -1616,7 +1616,7 @@ public static function set_course_module_competency_ruleoutcome($coursemodulecom
*/
public static function add_competency_to_course($courseid, $competencyid) {
static::require_enabled();
// Check the user have access to the course.
// Check the user has access to the course.
self::validate_course($courseid);

// First we do a permissions check.
Expand All @@ -1630,7 +1630,7 @@ public static function add_competency_to_course($courseid, $competencyid) {

$competency = new competency($competencyid);

// Can not add a competency that belong to a hidden framework.
// Can not add a competency that belongs to a hidden framework.
if ($competency->get_framework()->get('visible') == false) {
throw new coding_exception('A competency belonging to hidden framework can not be linked to course');
}
Expand All @@ -1655,7 +1655,7 @@ public static function add_competency_to_course($courseid, $competencyid) {
*/
public static function remove_competency_from_course($courseid, $competencyid) {
static::require_enabled();
// Check the user have access to the course.
// Check the user has access to the course.
self::validate_course($courseid);

// First we do a permissions check.
Expand Down Expand Up @@ -1692,7 +1692,7 @@ public static function remove_competency_from_course($courseid, $competencyid) {
*/
public static function reorder_course_competency($courseid, $competencyidfrom, $competencyidto) {
static::require_enabled();
// Check the user have access to the course.
// Check the user has access to the course.
self::validate_course($courseid);

// First we do a permissions check.
Expand Down Expand Up @@ -1954,7 +1954,7 @@ public static function update_template($record) {
}

/**
* Read a the details for a single learning plan template and return a record.
* Read the details for a single learning plan template and return a record.
*
* Requires moodle/competency:templateview capability at the system context.
*
Expand Down Expand Up @@ -2197,7 +2197,7 @@ public static function add_competency_to_template($templateid, $competencyid) {

$competency = new competency($competencyid);

// Can not add a competency that belong to a hidden framework.
// Can not add a competency that belongs to a hidden framework.
if ($competency->get_framework()->get('visible') == false) {
throw new coding_exception('A competency belonging to hidden framework can not be added');
}
Expand Down Expand Up @@ -2686,9 +2686,9 @@ public static function unlink_plan_from_template($planorid) {
throw new required_capability_exception($plan->get_context(), 'moodle/competency:planmanage', 'nopermissions', '');
}

// Only plan with status DRAFT or ACTIVE can be unliked..
// Only plan with status DRAFT or ACTIVE can be unlinked..
if ($plan->get('status') == plan::STATUS_COMPLETE) {
throw new coding_exception('Only draft or active plan can be unliked from a template');
throw new coding_exception('Only draft or active plan can be unlinked from a template');
}

// Early exit, it's already done...
Expand Down Expand Up @@ -3363,7 +3363,7 @@ public static function add_competency_to_plan($planid, $competencyid) {
}

if (!$plan->can_be_edited()) {
throw new coding_exception('A competency can not be added to a learning plan completed');
throw new coding_exception('A competency can not be added to a completed learning plan');
}

$competency = new competency($competencyid);
Expand Down Expand Up @@ -3406,7 +3406,7 @@ public static function remove_competency_from_plan($planid, $competencyid) {
}

if (!$plan->can_be_edited()) {
throw new coding_exception('A competency can not be removed from a learning plan completed');
throw new coding_exception('A competency can not be removed from a completed learning plan');
}

$link = plan_competency::get_record(array('planid' => $planid, 'competencyid' => $competencyid));
Expand Down Expand Up @@ -3440,7 +3440,7 @@ public static function reorder_plan_competency($planid, $competencyidfrom, $comp
}

if (!$plan->can_be_edited()) {
throw new coding_exception('A competency can not be reordered in a learning plan completed');
throw new coding_exception('A competency can not be reordered in a completed learning plan');
}

$down = true;
Expand Down Expand Up @@ -3492,7 +3492,7 @@ public static function user_competency_cancel_review_request($userid, $competenc
if (!$uc || !$uc->can_read()) {
throw new required_capability_exception($context, 'moodle/competency:usercompetencyview', 'nopermissions', '');
} else if ($uc->get('status') != user_competency::STATUS_WAITING_FOR_REVIEW) {
throw new coding_exception('The competency can not be cancel review request at this stage.');
throw new coding_exception('The competency review request can not be cancelled at this stage.');
} else if (!$uc->can_request_review()) {
throw new required_capability_exception($context, 'moodle/competency:usercompetencyrequestreview', 'nopermissions', '');
}
Expand Down Expand Up @@ -3637,7 +3637,7 @@ public static function user_competency_viewed_in_plan($usercompetencyorid, $plan
}
$plan = new plan($planid);
if ($plan->get('status') == plan::STATUS_COMPLETE) {
throw new coding_exception('To log the user competency in completed plan use user_competency_plan_viewed method.');
throw new coding_exception('To log the user competency in a completed plan use the user_competency_plan_viewed method.');
}

\core\event\competency_user_competency_viewed_in_plan::create_from_user_competency_viewed_in_plan($uc, $planid)->trigger();
Expand Down Expand Up @@ -3770,7 +3770,7 @@ public static function remove_related_competency($competencyid, $relatedcompeten
static::require_enabled();
$competency = new competency($competencyid);

// This only check if we have the permission in either competency because both competencies
// This only checks if we have the permission in either competency because both competencies
// should belong to the same framework.
require_capability('moodle/competency:competencymanage', $competency->get_context());

Expand Down Expand Up @@ -4324,7 +4324,7 @@ public static function add_evidence($userid, $competencyorid, $contextorid, $act
// if rating outside a course
// - set the default grade and proficiency ONLY if there is no current grade
// else we are in a course
// - set the defautl grade and proficiency in the course ONLY if there is no current grade in the course
// - set the default grade and proficiency in the course ONLY if there is no current grade in the course
// - then check the course settings to see if we should push the rating outside the course
// - if we should push it
// --- push it only if the user_competency (outside the course) has no grade
Expand Down
8 changes: 4 additions & 4 deletions competency/tests/event/events_test.php
Original file line number Diff line number Diff line change
Expand Up @@ -706,11 +706,11 @@ public function test_user_competency_viewed_in_plan(): void {

try {
api::user_competency_viewed_in_plan($uc, $plan->get('id'));
$this->fail('To log the user competency in completed plan '
. 'use user_competency_plan_viewed method.');
$this->fail('To log the user competency in a completed plan '
. 'use the user_competency_plan_viewed method.');
} catch (\coding_exception $e) {
$this->assertMatchesRegularExpression('/To log the user competency in completed plan '
. 'use user_competency_plan_viewed method./', $e->getMessage());
$this->assertMatchesRegularExpression('/To log the user competency in a completed plan '
. 'use the user_competency_plan_viewed method./', $e->getMessage());
}

api::reopen_plan($plan);
Expand Down
2 changes: 1 addition & 1 deletion enrol/paypal/lang/en/enrol_paypal.php
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@
$string['privacy:metadata:enrol_paypal:enrol_paypal:item_name'] = 'The full name of the course that its enrolment has been sold.';
$string['privacy:metadata:enrol_paypal:enrol_paypal:memo'] = 'A note that was entered by the buyer in PayPal website payments note field.';
$string['privacy:metadata:enrol_paypal:enrol_paypal:option_selection1_x'] = 'Full name of the buyer.';
$string['privacy:metadata:enrol_paypal:enrol_paypal:parent_txn_id'] = 'In the case of a refund, reversal, or canceled reversal, this would be the transaction ID of the original transaction.';
$string['privacy:metadata:enrol_paypal:enrol_paypal:parent_txn_id'] = 'In the case of a refund, reversal, or cancelled reversal, this would be the transaction ID of the original transaction.';
$string['privacy:metadata:enrol_paypal:enrol_paypal:payment_status'] = 'The status of the payment.';
$string['privacy:metadata:enrol_paypal:enrol_paypal:payment_type'] = 'Holds whether the payment was funded with an eCheck (echeck), or was funded with PayPal balance, credit card, or instant transfer (instant).';
$string['privacy:metadata:enrol_paypal:enrol_paypal:pending_reason'] = 'The reason why payment status is pending (if that is).';
Expand Down
6 changes: 3 additions & 3 deletions lib/behat/classes/behat_core_generator.php
Original file line number Diff line number Diff line change
Expand Up @@ -1196,15 +1196,15 @@ protected function process_last_access_times(array $data) {
global $DB;

if (!isset($data['userid'])) {
throw new Exception('\'last acces times\' requires the field \'user\' to be specified');
throw new Exception('\'last access times\' requires the field \'user\' to be specified');
}

if (!isset($data['courseid'])) {
throw new Exception('\'last acces times\' requires the field \'course\' to be specified');
throw new Exception('\'last access times\' requires the field \'course\' to be specified');
}

if (!isset($data['lastaccess'])) {
throw new Exception('\'last acces times\' requires the field \'lastaccess\' to be specified');
throw new Exception('\'last access times\' requires the field \'lastaccess\' to be specified');
}

$userdata = [];
Expand Down
2 changes: 1 addition & 1 deletion lib/upgrade.txt
Original file line number Diff line number Diff line change
Expand Up @@ -1598,7 +1598,7 @@ the groupid field.
moodle/site:configview capability added.
* Admin setting "Show My courses expanded on Dashboard" has been removed.
* Some backwards and forwards compatibility has been added for different bootstrap versions.
This is to allow the same markup to work in "clean" and "boost" themes alot of the time. It is also to allow user text
This is to allow the same markup to work in "clean" and "boost" themes a lot of the time. It is also to allow user text
with bootstrap classes to keep working in the new theme. See MDL-56004 for the list of supported classes.
* MForms element 'submitlink' has been deprecated.
* Searchable selector form element is now a wrapper for autocomplete. A "No selection" option is automatically
Expand Down
2 changes: 1 addition & 1 deletion mod/assign/tests/base_test.php
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ protected function setUp(): void {
}

/*
* For tests that make sense to use alot of data, create extra students/teachers.
* For tests that make sense to use a lot of data, create extra students/teachers.
*/
protected function create_extra_users() {
global $DB;
Expand Down
2 changes: 1 addition & 1 deletion mod/lesson/backup/moodle2/backup_lesson_stepslib.php
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ protected function define_structure() {

// The lesson table
// This table contains all of the goodness for the lesson module, quite
// alot goes into it but nothing relational other than course when will
// a lot goes into it but nothing relational other than course when will
// need to be corrected upon restore.
$lesson = new backup_nested_element('lesson', array('id'), array(
'course', 'name', 'intro', 'introformat', 'practice', 'modattempts',
Expand Down
Loading

0 comments on commit 8d3a5d9

Please sign in to comment.