Merge branch 'MDL-81904' of https://github.com/paulholden/moodle
This commit is contained in:
@@ -53,6 +53,8 @@ class edit_action_bar extends base_action_bar {
|
||||
* @return array
|
||||
*/
|
||||
public function get_items(): array {
|
||||
global $DB;
|
||||
|
||||
$url = new moodle_url('/mod/feedback/view.php', ['id' => $this->cmid]);
|
||||
$items['left'][]['actionlink'] = new action_link($url, get_string('back'), null, ['class' => 'btn btn-secondary']);
|
||||
|
||||
@@ -82,12 +84,14 @@ class edit_action_bar extends base_action_bar {
|
||||
'typ', feedback_load_feedback_items_options());
|
||||
$items['left'][]['singleselect'] = $select;
|
||||
|
||||
$exporturl = new moodle_url('/mod/feedback/export.php', $this->urlparams + ['action' => 'exportfile']);
|
||||
$items['export'] = new action_link(
|
||||
$exporturl,
|
||||
get_string('export_questions', 'feedback'),
|
||||
null,
|
||||
['class' => 'btn btn-secondary']);
|
||||
if ($DB->record_exists('feedback_item', ['feedback' => $this->feedback->id])) {
|
||||
$items['export'] = new action_link(
|
||||
new moodle_url('/mod/feedback/export.php', $this->urlparams + ['action' => 'exportfile']),
|
||||
get_string('export_questions', 'feedback'),
|
||||
null,
|
||||
['class' => 'btn btn-secondary'],
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -24,6 +24,7 @@ Feature: Exporting and importing feedbacks
|
||||
Scenario: Export sample feedback and compare with the fixture
|
||||
When I am on the "Learning experience" "feedback activity" page logged in as teacher
|
||||
And I click on "Edit questions" "link" in the "[role=main]" "css_element"
|
||||
And "Export questions" "link" should not exist in the ".tertiary-navigation" "css_element"
|
||||
And I add a "Information" question to the feedback with:
|
||||
| Question | this is an information question |
|
||||
| Label | info |
|
||||
|
||||
Reference in New Issue
Block a user