Skip to content

Commit

Permalink
fix: use $this->api property
Browse files Browse the repository at this point in the history
  • Loading branch information
janbritz committed Dec 5, 2024
1 parent 20f17f0 commit 2bfe879
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions edit_questionpy_form.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
use core\di;
use core_question\local\bank\question_edit_contexts;
use qtype_questionpy\api\api;
use qtype_questionpy\api\qpy_http_client;
use qtype_questionpy\form\context\root_render_context;
use qtype_questionpy\localizer;
use qtype_questionpy\package\package;
Expand Down Expand Up @@ -203,8 +204,7 @@ private function definition_package_settings_search(MoodleQuickForm $mform) {
$isfavourite = $ufservice->favourite_exists('qtype_questionpy', 'package', $package->id, $usercontext);
$version = $pkgversion->version;
} else {
$api = new api();
$package = $api->get_package_info($packagehash);
$package = $this->api->get_package_info($packagehash);
$isfavourite = null;
$version = $package->version;
}
Expand Down

0 comments on commit 2bfe879

Please sign in to comment.