Skip to content

Commit

Permalink
MDL-81914 core_competency: Stop using a deprecated class
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewnicols committed May 15, 2024
1 parent e0b54b9 commit b40fad6
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 5 deletions.
2 changes: 1 addition & 1 deletion admin/tool/cohortroles/classes/api.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@

use stdClass;
use context_system;
use core_competency\invalid_persistent_exception;
use core\invalid_persistent_exception;

/**
* Class for doing things with cohort roles.
Expand Down
2 changes: 1 addition & 1 deletion admin/tool/cohortroles/tests/api_test.php
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ public function test_create_cohort_role_assignment_with_invalid_data() {
'roleid' => -8,
'cohortid' => $this->cohort->id
);
$this->expectException(\core_competency\invalid_persistent_exception::class);
$this->expectException(\core\invalid_persistent_exception::class);
api::create_cohort_role_assignment($params);
}

Expand Down
2 changes: 1 addition & 1 deletion admin/tool/cohortroles/tests/privacy/provider_test.php
Original file line number Diff line number Diff line change
Expand Up @@ -354,7 +354,7 @@ public function test_delete_data_for_users() {
* @param int $nocohortroles The number of tool_cohortroles to create for the user.
* @param string $rolename The name of the role to be created.
* @param string $roleshortname The short name of the role to be created.
* @throws \core_competency\invalid_persistent_exception
* @throws \core\invalid_persistent_exception
* @throws coding_exception
*/
protected function setup_test_scenario_data($userid, $context, $nocohortroles, $rolename = 'Sausage Roll',
Expand Down
1 change: 1 addition & 0 deletions competency/classes/api.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
namespace core_competency;
defined('MOODLE_INTERNAL') || die();

use core\invalid_persistent_exception;
use stdClass;
use cm_info;
use context;
Expand Down
4 changes: 2 additions & 2 deletions competency/tests/external/external_test.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,10 @@

namespace core_competency\external;

use core\invalid_persistent_exception;
use core_competency\api;
use core_competency\course_competency_settings;
use core_competency\external;
use core_competency\invalid_persistent_exception;
use core_competency\plan;
use core_competency\plan_competency;
use core_competency\related_competency;
Expand Down Expand Up @@ -620,7 +620,7 @@ public function test_update_framework_scale() {
try {
$result = $this->update_competency_framework($f2->get('id'), 4, true);
$this->fail('The scale cannot be changed once used.');
} catch (\core\invalid_persistent_exception $e) {
} catch (invalid_persistent_exception $e) {
$this->assertMatchesRegularExpression('/scaleid/', $e->getMessage());
}
}
Expand Down

0 comments on commit b40fad6

Please sign in to comment.