This commit is contained in:
Huong Nguyen
2025-06-19 11:07:23 +07:00
3 changed files with 7 additions and 6 deletions
+1 -1
View File
@@ -62,7 +62,7 @@ class mod_feedback_templates_table extends core_table\flexible_table {
$this->cmid = $baseurl->param('id');
$tablecolumns = [
'template' => get_string('template', 'feedback'),
'actions' => '',
'actions' => html_writer::span(get_string('actions'), 'visually-hidden'),
];
$this->set_attribute('class', 'templateslist');
+3 -3
View File
@@ -74,12 +74,12 @@ $PAGE->activityheader->set_attrs([
"description" => ''
]);
echo $OUTPUT->header();
echo $OUTPUT->heading(get_string('templates', 'mod_feedback'), 3);
echo $OUTPUT->heading(get_string('templates', 'mod_feedback'));
// First we get the course templates.
$templates = feedback_get_template_list($course, 'own');
echo $OUTPUT->box_start('coursetemplates');
echo $OUTPUT->heading(get_string('coursetemplates', 'mod_feedback'), 4);
echo $OUTPUT->heading(get_string('coursetemplates', 'mod_feedback'), 3);
$baseurl = new moodle_url('/mod/feedback/use_templ.php', $params);
$tablecourse = new mod_feedback_templates_table('feedback_template_course_table', $baseurl);
@@ -88,7 +88,7 @@ echo $OUTPUT->box_end();
$templates = feedback_get_template_list($course, 'public');
echo $OUTPUT->box_start('publictemplates');
echo $OUTPUT->heading(get_string('sitetemplates', 'mod_feedback'), 4);
echo $OUTPUT->heading(get_string('sitetemplates', 'mod_feedback'), 3);
$tablepublic = new mod_feedback_templates_table('feedback_template_public_table', $baseurl);
$tablepublic->display($templates);
echo $OUTPUT->box_end();
+3 -2
View File
@@ -159,7 +159,7 @@ Feature: Saving, using and deleting feedback templates
And "My course template" "text" should not exist in the ".coursetemplates" "css_element"
And "No templates available yet" "text" should exist in the ".coursetemplates" "css_element"
@javascript
@javascript @accessibility
Scenario: Manager can delete both course and public templates
# Save feedback as both public and course template
When I am on the "Learning experience course 1" "feedback activity" page logged in as manager
@@ -173,9 +173,10 @@ Feature: Saving, using and deleting feedback templates
And I choose "Save as template" in the open action menu
And I set the field "Name" to "My course template"
And I click on "Save" "button" in the ".modal-dialog" "css_element"
# Delete course template
And I navigate to "Templates" in current page administration
And the "region-main" "region" should meet accessibility standards with "best-practice" extra tests
And "My course template" "text" should exist in the ".coursetemplates" "css_element"
# Delete course template
And I open the action menu in "My course template" "table_row"
And I choose "Delete" in the open action menu
And I should see "Are you sure you want to delete this template?"