Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: add missing parameter in api constructor call #148

Merged
merged 2 commits into from
Dec 5, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions edit_questionpy_form.php
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,10 @@
class qtype_questionpy_edit_form extends question_edit_form {
/** @var array current form data set in {@see definition_inner} and added to the question in {@see set_data}. */
private array $currentdata = [];
/** @var package_file_service */
private package_file_service $packagefileservice;
/** @var api */
private api $api;

/**
* Initialize the form.
Expand Down Expand Up @@ -203,8 +207,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