Skip to content

Commit

Permalink
Moodle 4.3 compatibility
Browse files Browse the repository at this point in the history
  • Loading branch information
timhunt committed Oct 27, 2023
1 parent c75d531 commit b164112
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
1 change: 1 addition & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

* We are declaring this stable. (Has been used at the Open University for several months.)
* The Question text is no longer output during the import process.
* Provide compatibility with Moodle 4.3.

## First Beta release 0.9

Expand Down
13 changes: 11 additions & 2 deletions classes/import_as_version_action_column.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,17 +16,26 @@

namespace qbank_importasversion;

use core_question\local\bank\menu_action_column_base;
use moodle_url;

if (!class_exists('\core_question\local\bank\question_action_base')) {
// Moodle up to 4.2.x.
class_alias('\core_question\local\bank\menu_action_column_base',
'qbank_importasversion\qbank_importasversion_column_parent_class');
} else {
// Moodle 4.3+.
class_alias('\core_question\local\bank\question_action_base',
'qbank_importasversion\qbank_importasversion_column_parent_class');
}

/**
* Action to import a question from a file as a new version of an existing question.
*
* @package qbank_importasversion
* @copyright 2023 MootDACH DevCamp
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
class import_as_version_action_column extends menu_action_column_base {
class import_as_version_action_column extends qbank_importasversion_column_parent_class {

/** @var string store the value of the name lang string for performance. */
protected $actionname;
Expand Down

0 comments on commit b164112

Please sign in to comment.