diff --git a/.upgradenotes/MDL-80748-2024070105545553.yml b/.upgradenotes/MDL-80748-2024070105545553.yml new file mode 100644 index 00000000000..cc380bd12bf --- /dev/null +++ b/.upgradenotes/MDL-80748-2024070105545553.yml @@ -0,0 +1,11 @@ +issueNumber: MDL-80748 +notes: + core_table: + - message: >+ + A new `$reponsive` property (defaulting to `true`) has been added to the + `core_table\flexible_table` class. + + This property allows you to control whether the table is rendered as a + responsive table. + + type: improved diff --git a/availability/condition/grade/tests/behat/availability_grade.feature b/availability/condition/grade/tests/behat/availability_grade.feature index c8f195fa172..027cd2d0afa 100644 --- a/availability/condition/grade/tests/behat/availability_grade.feature +++ b/availability/condition/grade/tests/behat/availability_grade.feature @@ -89,7 +89,9 @@ Feature: availability_grade # Give the assignment 40%. And I follow "View all submissions" # Pick the grade link in the row that has s@example.com in it. + And I change window size to "large" And I click on "Grade" "link" in the "s@example.com" "table_row" + And I change window size to "medium" And I set the field "Grade out of 100" to "40" And I click on "Save changes" "button" And I click on "Edit settings" "link" diff --git a/completion/tests/behat/restrict_activity_by_grade.feature b/completion/tests/behat/restrict_activity_by_grade.feature index 9f5933a65d0..2e61589f2a2 100644 --- a/completion/tests/behat/restrict_activity_by_grade.feature +++ b/completion/tests/behat/restrict_activity_by_grade.feature @@ -45,7 +45,9 @@ Feature: Restrict activity availability through grade conditions And I am on the "Grade assignment" "assign activity" page logged in as teacher1 And I follow "View all submissions" + And I change window size to "large" And I click on "Grade" "link" in the "Student First" "table_row" + And I change window size to "medium" And I set the following fields to these values: | Grade | 21 | And I press "Save changes" diff --git a/completion/tests/behat/restrict_section_availability.feature b/completion/tests/behat/restrict_section_availability.feature index 40f6b765605..5d214815d6c 100644 --- a/completion/tests/behat/restrict_section_availability.feature +++ b/completion/tests/behat/restrict_section_availability.feature @@ -68,7 +68,9 @@ Feature: Restrict sections availability through completion or grade conditions And I log out And I am on the "Grade assignment" "assign activity" page logged in as teacher1 And I follow "View all submissions" + And I change window size to "large" And I click on "Grade" "link" in the "Student First" "table_row" + And I change window size to "medium" And I set the following fields to these values: | Grade | 21 | And I press "Save changes" diff --git a/grade/grading/form/rubric/tests/behat/edit_rubric.feature b/grade/grading/form/rubric/tests/behat/edit_rubric.feature index 2c5dc289818..612bfd534b1 100644 --- a/grade/grading/form/rubric/tests/behat/edit_rubric.feature +++ b/grade/grading/form/rubric/tests/behat/edit_rubric.feature @@ -50,7 +50,9 @@ Feature: Rubrics can be created and edited Then I should see "Ready for use" # Grading two students. And I navigate to "Assignment" in current page administration + And I change window size to "large" And I go to "Student 1" "Test assignment 1 name" activity advanced grading page + And I change window size to "medium" And I grade by filling the rubric with: | Criterion 1 | 50 | Very good | And I press "Save changes" @@ -66,7 +68,9 @@ Feature: Rubrics can be created and edited And I should see "65" in the "Student 1" "table_row" # Updating the user grade. And I am on the "Test assignment 1 name" "assign activity" page + And I change window size to "large" And I go to "Student 1" "Test assignment 1 name" activity advanced grading page + And I change window size to "medium" And I grade by filling the rubric with: | Criterion 1 | 20 | Bad, I changed my mind | | Criterion 2 | 10 | Mmmm, you can do it better | @@ -118,7 +122,9 @@ Feature: Rubrics can be created and edited And I log out # Regrade student. And I am on the "Test assignment 1 name" "assign activity" page logged in as teacher1 + And I change window size to "large" And I go to "Student 1" "Test assignment 1 name" activity advanced grading page + And I change window size to "medium" And I should see "The rubric definition was changed after this student had been graded. The student can not see this rubric until you check the rubric and update the grade." And I save the advanced grading form And I log out diff --git a/lib/table/classes/flexible_table.php b/lib/table/classes/flexible_table.php index 65ba85b5013..967006d1ef7 100644 --- a/lib/table/classes/flexible_table.php +++ b/lib/table/classes/flexible_table.php @@ -41,53 +41,89 @@ require_once("{$CFG->libdir}/tablelib.php"); * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ class flexible_table { - public $uniqueid = null; - public $attributes = []; - public $headers = []; + public $attributes = []; + public $baseurl = null; - /** - * @var string A column which should be considered as a header column. - */ - protected $headercolumn = null; + /** @var string The caption of table */ + public $caption; - /** - * @var string For create header with help icon. - */ - private $helpforheaders = []; - public $columns = []; - public $column_style = []; - public $column_class = []; + /** @var array The caption attributes of table */ + public $captionattributes; + + public $column_class = []; + public $column_nosort = ['userpic']; + public $column_style = []; public $column_suppress = []; - public $column_nosort = ['userpic']; - private $column_textsort = []; + public $columns = []; + public $currentrow = 0; + public $currpage = 0; /** - * @var array The sticky attribute of each table column. + * Which download plugin to use. Default '' means none - print html table with paging. + * Property set by is_downloading which typically passes in cleaned data from $ + * @var string */ - protected $columnsticky = []; + public $download = ''; + + /** + * Whether data is downloadable from table. Determines whether to display download buttons. Set by method downloadable(). + * @var bool + */ + public $downloadable = false; + + /** @var dataformat_export_format */ + public $exportclass = null; + + public $headers = []; + public $is_collapsible = false; + public $is_sortable = false; + public $maxsortkeys = 2; + public $pagesize = 30; + public $request = []; /** @var bool Stores if setup has already been called on this flixible table. */ - public $setup = false; - public $baseurl = null; - public $request = []; + public $setup = false; - /** @var string[] Columns that are expected to contain a users fullname. */ - protected $userfullnamecolumns = ['fullname']; + /** @var int[] Array of positions in which to display download controls. */ + public $showdownloadbuttonsat = [TABLE_P_TOP]; - /** @var array[] Attributes for each column */ - private $columnsattributes = []; + public $sort_default_column = null; + public $sort_default_order = SORT_ASC; + + /** @var bool Has start output been called yet? */ + public $started_output = false; + + public $totalrows = 0; + public $uniqueid = null; + public $use_initials = false; + public $use_pages = false; + + /** @var string Key of field returned by db query that is the id field of the user table or equivalent. */ + public $useridfield = 'id'; + + /** @var bool Whether to make the table to be scrolled horizontally with ease. Make table responsive across all viewports. */ + public bool $responsive = true; + + /** @var array The sticky attribute of each table column. */ + protected $columnsticky = []; + + /** @var string $filename */ + protected $filename; /** - * @var bool Whether or not to store table properties in the user_preferences table. + * The currently applied filerset. This is required for dynamic tables, but can be used by other tables too if desired. + * @var filterset */ - private $persistent = false; - public $is_collapsible = false; - public $is_sortable = false; + protected $filterset = null; - /** - * @var array The fields to sort. - */ - protected $sortdata; + /** @var string A column which should be considered as a header column. */ + protected $headercolumn = null; + + /** @var string For create header with help icon. */ + private $helpforheaders = []; + + /** @var array List of hidden columns. */ + protected $hiddencolumns; /** @var string The manually set first name initial preference */ protected $ifirst; @@ -95,84 +131,31 @@ class flexible_table { /** @var string The manually set last name initial preference */ protected $ilast; - public $use_pages = false; - public $use_initials = false; - - public $maxsortkeys = 2; - public $pagesize = 30; - public $currpage = 0; - public $totalrows = 0; - public $currentrow = 0; - public $sort_default_column = null; - public $sort_default_order = SORT_ASC; - - /** @var int The defeult per page size for the table. */ - private $defaultperpage = 30; - - /** - * @var array Array of positions in which to display download controls. - */ - public $showdownloadbuttonsat = [TABLE_P_TOP]; - - /** - * @var string Key of field returned by db query that is the id field of the - * user table or equivalent. - */ - public $useridfield = 'id'; - - /** - * @var string which download plugin to use. Default '' means none - print - * html table with paging. Property set by is_downloading which typically - * passes in cleaned data from $ - */ - public $download = ''; - - /** - * @var bool whether data is downloadable from table. Determines whether - * to display download buttons. Set by method downloadable(). - */ - public $downloadable = false; - - /** - * @var bool Has start output been called yet? - */ - public $started_output = false; - - /** @var dataformat_export_format */ - public $exportclass = null; - - /** - * @var array For storing user-customised table properties in the user_preferences db table. - */ - private $prefs = []; - - /** @var string $sheettitle */ - protected $sheettitle; - - /** @var string $filename */ - protected $filename; - - /** @var array $hiddencolumns List of hidden columns. */ - protected $hiddencolumns; - - /** @var bool $resetting Whether the table preferences is resetting. */ + /** @var bool Whether the table preferences is resetting. */ protected $resetting; - /** - * @var string $caption The caption of table - */ - public $caption; + /** @var string */ + protected $sheettitle; - /** - * @var array $captionattributes The caption attributes of table - */ - public $captionattributes; + /** @var array The fields to sort. */ + protected $sortdata; - /** - * @var filterset The currently applied filerset - * This is required for dynamic tables, but can be used by other tables too if desired. - */ - protected $filterset = null; + /** @var string[] Columns that are expected to contain a users fullname. */ + protected $userfullnamecolumns = ['fullname']; + + private $column_textsort = []; + + /** @var array[] Attributes for each column */ + private $columnsattributes = []; + + /** @var int The default per page size for the table. */ + private $defaultperpage = 30; + + /** @var bool Whether to store table properties in the user_preferences table. */ + private $persistent = false; + + /** @var array For storing user-customised table properties in the user_preferences db table. */ + private $prefs = []; /** * Constructor @@ -1222,7 +1205,9 @@ class flexible_table { echo html_writer::end_tag('tbody'); echo html_writer::end_tag('table'); - echo html_writer::end_tag('div'); + if ($this->responsive) { + echo html_writer::end_tag('div'); + } $this->wrap_html_finish(); // Paging bar. @@ -1880,7 +1865,9 @@ class flexible_table { $this->wrap_html_start(); // Start of main data table. - echo html_writer::start_tag('div', ['class' => 'no-overflow']); + if ($this->responsive) { + echo html_writer::start_tag('div', ['class' => 'no-overflow']); + } echo html_writer::start_tag('table', $this->attributes) . $this->render_caption(); } diff --git a/mod/assign/feedback/editpdf/tests/behat/annotate_pdf.feature b/mod/assign/feedback/editpdf/tests/behat/annotate_pdf.feature index 468db0d79d0..c9bd1801c96 100644 --- a/mod/assign/feedback/editpdf/tests/behat/annotate_pdf.feature +++ b/mod/assign/feedback/editpdf/tests/behat/annotate_pdf.feature @@ -36,7 +36,9 @@ Feature: In an assignment, teacher can annotate PDF files during grading When I am on the "Test assignment name" Activity page logged in as teacher1 And I follow "View all submissions" + And I change window size to "large" And I click on "Grade" "link" in the "Submitted for grading" "table_row" + And I change window size to "medium" Then I should see "Page 1 of 1" And I wait for the complete PDF to load And I click on ".linebutton" "css_element" @@ -54,7 +56,9 @@ Feature: In an assignment, teacher can annotate PDF files during grading Then I should see "Page 1 of 1" And I am on the "Test assignment name" Activity page logged in as teacher1 And I follow "View all submissions" + And I change window size to "large" And I click on "Grade" "link" in the "Submitted for grading" "table_row" + And I change window size to "medium" Then I should see "Page 1 of 3" And I wait for the complete PDF to load And I click on ".linebutton" "css_element" @@ -108,7 +112,9 @@ Feature: In an assignment, teacher can annotate PDF files during grading When I am on the "Test assignment name" Activity page logged in as teacher1 And I follow "View all submissions" + And I change window size to "large" And I click on "Grade" "link" in the "Submitted for grading" "table_row" + And I change window size to "medium" Then I should see "Page 1 of 3" And I click on ".navigate-next-button" "css_element" And I should see "Page 2 of 3" diff --git a/mod/assign/feedback/editpdf/tests/behat/comment_popup_menu.feature b/mod/assign/feedback/editpdf/tests/behat/comment_popup_menu.feature index 88116eeeac2..57285b5ef12 100644 --- a/mod/assign/feedback/editpdf/tests/behat/comment_popup_menu.feature +++ b/mod/assign/feedback/editpdf/tests/behat/comment_popup_menu.feature @@ -33,7 +33,9 @@ Feature: Ensure that a comment remains visible if its popup menu is open And I am on the "Test assignment name" Activity page logged in as teacher1 And I follow "View all submissions" + And I change window size to "large" And I click on "Grade" "link" in the "Submitted for grading" "table_row" + And I change window size to "medium" And I wait for the complete PDF to load Scenario: Add an empty comment and open its menu diff --git a/mod/assign/feedback/editpdf/tests/behat/view_previous_annotations.feature b/mod/assign/feedback/editpdf/tests/behat/view_previous_annotations.feature index 2ecbff48824..e253a28129f 100644 --- a/mod/assign/feedback/editpdf/tests/behat/view_previous_annotations.feature +++ b/mod/assign/feedback/editpdf/tests/behat/view_previous_annotations.feature @@ -37,7 +37,9 @@ Feature: In an assignment, teacher can view the feedback for a previous attempt. When I am on the "Test assignment name" Activity page logged in as teacher1 And I follow "View all submissions" + And I change window size to "large" And I click on "Grade" "link" in the "Submitted for grading" "table_row" + And I change window size to "medium" Then I should see "Page 1 of 3" And I click on ".navigate-next-button" "css_element" And I should see "Page 2 of 3" diff --git a/mod/assign/locallib.php b/mod/assign/locallib.php index 64052b2b70f..1178ed9e604 100644 --- a/mod/assign/locallib.php +++ b/mod/assign/locallib.php @@ -4602,6 +4602,7 @@ class assign { // Load and print the table of submissions. if ($showquickgrading && $quickgrading) { $gradingtable = new assign_grading_table($this, $perpage, $filter, 0, true); + $gradingtable->responsive = false; $table = $this->get_renderer()->render($gradingtable); $page = optional_param('page', null, PARAM_INT); $quickformparams = array('cm'=>$this->get_course_module()->id, @@ -4613,6 +4614,7 @@ class assign { $o .= $this->get_renderer()->render(new assign_form('quickgradingform', $quickgradingform)); } else { $gradingtable = new assign_grading_table($this, $perpage, $filter, 0, false); + $gradingtable->responsive = false; $o .= $this->get_renderer()->render($gradingtable); } diff --git a/mod/assign/styles.css b/mod/assign/styles.css index 9e63e71dcd6..134b3a5b56b 100644 --- a/mod/assign/styles.css +++ b/mod/assign/styles.css @@ -139,6 +139,15 @@ display: block; } +.path-mod-assign .gradingtable table { + border-collapse: separate; + border-spacing: 0; +} + +.path-mod-assign .gradingtable thead th { + background-color: white; +} + .path-mod-assign .gradingtable tr.selectedrow td { background-color: #fec; } diff --git a/mod/assign/tests/behat/allow_another_attempt.feature b/mod/assign/tests/behat/allow_another_attempt.feature index db6be7b01b7..c6c0b2a8f4d 100644 --- a/mod/assign/tests/behat/allow_another_attempt.feature +++ b/mod/assign/tests/behat/allow_another_attempt.feature @@ -34,7 +34,9 @@ Feature: In an assignment, students start a new attempt based on their previous And I am on the "Test assignment name" Activity page logged in as teacher1 And I follow "View all submissions" + And I change window size to "large" And I click on "Grade" "link" in the "Student 1" "table_row" + And I change window size to "medium" And I set the following fields to these values: | Allow another attempt | 1 | And I press "Save changes" @@ -49,7 +51,9 @@ Feature: In an assignment, students start a new attempt based on their previous And I am on the "Test assignment name" Activity page logged in as teacher1 And I follow "View all submissions" + And I change window size to "large" And I click on "Grade" "link" in the "Student 1" "table_row" + And I change window size to "medium" And I should see "I'm the student first submission" @javascript @_alert diff --git a/mod/assign/tests/behat/assign_settings.feature b/mod/assign/tests/behat/assign_settings.feature index 378e4a7c838..7db8d799b09 100644 --- a/mod/assign/tests/behat/assign_settings.feature +++ b/mod/assign/tests/behat/assign_settings.feature @@ -107,7 +107,9 @@ Feature: Assignments settings can be changed When I am on the "Test assignment name" Activity page logged in as teacher1 And I follow "View all submissions" + And I change window size to "large" And I click on "Grade" "link" in the "Student 3" "table_row" + And I change window size to "medium" And I set the field "Grade out of 100" to "40" And I set the field "Notify student" to "0" And I press "Save changes" @@ -118,7 +120,9 @@ Feature: Assignments settings can be changed And I am on the "Test assignment name" Activity page logged in as teacher1 And I follow "View all submissions" + And I change window size to "large" And I open the action menu in "Student 3" "table_row" + And I change window size to "medium" And I follow "Allow another attempt" And I am on the "Test assignment name" Activity page logged in as student3 diff --git a/mod/assign/tests/behat/assign_table_preferences.feature b/mod/assign/tests/behat/assign_table_preferences.feature index b36a78815d8..2779e6dc8a0 100644 --- a/mod/assign/tests/behat/assign_table_preferences.feature +++ b/mod/assign/tests/behat/assign_table_preferences.feature @@ -48,7 +48,9 @@ Feature: In an assignment, teachers can use table preferences. And I am on the "Test assignment" Activity page And I follow "View all submissions" And I click on "T" "link" in the ".lastinitial" "css_element" + And I change window size to "large" And I click on "Grade" "link" in the "Student Two" "table_row" + And I change window size to "medium" And I should see "This is a submission for Student Two" And I should see "1 of 1" And I follow "Reset table preferences" diff --git a/mod/assign/tests/behat/bulk_release_anon_submissions.feature b/mod/assign/tests/behat/bulk_release_anon_submissions.feature index e346305f4c4..9a26885c1ce 100644 --- a/mod/assign/tests/behat/bulk_release_anon_submissions.feature +++ b/mod/assign/tests/behat/bulk_release_anon_submissions.feature @@ -49,7 +49,9 @@ Feature: Bulk released grades should not be sent to gradebook while submissions And I am on the "Test assignment name" "assign activity" page And I follow "View all submissions" Then I should see "Not marked" in the "I'm student2's submission" "table_row" + And I change window size to "large" And I click on "Grade" "link" in the "I'm student2's submission" "table_row" + And I change window size to "medium" And I set the field "Grade out of 100" to "50" And I set the field "Marking workflow state" to "In review" And I set the field "Feedback comments" to "Great job!" diff --git a/mod/assign/tests/behat/comment_inline.feature b/mod/assign/tests/behat/comment_inline.feature index 5088de82f4f..3998a1b61fb 100644 --- a/mod/assign/tests/behat/comment_inline.feature +++ b/mod/assign/tests/behat/comment_inline.feature @@ -33,7 +33,9 @@ Feature: In an assignment, teachers can edit a students submission inline When I am on the "Test assignment name" Activity page logged in as teacher1 And I follow "View all submissions" + And I change window size to "large" And I click on "Grade" "link" in the "Student 1" "table_row" + And I change window size to "medium" And I set the following fields to these values: | Grade out of 100 | 50 | | Feedback comments | I'm the teacher feedback | diff --git a/mod/assign/tests/behat/display_grade.feature b/mod/assign/tests/behat/display_grade.feature index 022a75b3c1c..1942db72ddd 100644 --- a/mod/assign/tests/behat/display_grade.feature +++ b/mod/assign/tests/behat/display_grade.feature @@ -63,7 +63,9 @@ Feature: Check that the assignment grade can be updated correctly | groupmode | 0 | And I am on the "Test assignment name" Activity page logged in as teacher1 When I follow "View all submissions" + And I change window size to "large" And I click on "Grade" "link" in the "Student 1" "table_row" + And I change window size to "medium" And I set the field "Grade out of 100" to "50" And I set the field "Notify student" to "0" And I press "Save changes" diff --git a/mod/assign/tests/behat/edit_previous_feedback.feature b/mod/assign/tests/behat/edit_previous_feedback.feature index 3a2fe7c7d6e..2144ecabbdc 100644 --- a/mod/assign/tests/behat/edit_previous_feedback.feature +++ b/mod/assign/tests/behat/edit_previous_feedback.feature @@ -36,7 +36,9 @@ Feature: In an assignment, teachers can edit feedback for a students previous su | Test assignment name | student2 | I'm the student first submission | And I am on the "Test assignment name" Activity page logged in as teacher1 And I follow "View all submissions" + And I change window size to "large" And I click on "Grade" "link" in the "Student 2" "table_row" + And I change window size to "medium" And I set the following fields to these values: | Grade | 49 | | Feedback comments | I'm the teacher first feedback | @@ -51,7 +53,9 @@ Feature: In an assignment, teachers can edit feedback for a students previous su And I am on the "Test assignment name" Activity page logged in as teacher1 And I follow "View all submissions" + And I change window size to "large" And I click on "Grade" "link" in the "Student 2" "table_row" + And I change window size to "medium" And I click on "View a different attempt" "link" And I click on "Attempt 1" "radio" in the "View a different attempt" "dialogue" And I click on "View" "button" in the "View a different attempt" "dialogue" diff --git a/mod/assign/tests/behat/edit_student_submission.feature b/mod/assign/tests/behat/edit_student_submission.feature index 3dd78dcd990..f21f5244b49 100644 --- a/mod/assign/tests/behat/edit_student_submission.feature +++ b/mod/assign/tests/behat/edit_student_submission.feature @@ -27,7 +27,9 @@ Feature: In an assignment, the administrator can edit students' submissions And I am on the "Test assignment name" Activity page logged in as admin And I follow "View all submissions" + And I change window size to "large" And I open the action menu in "Student 1" "table_row" + And I change window size to "medium" And I choose "Edit submission" in the open action menu And I set the following fields to these values: | Online text | Have you seen the movie Chef? | diff --git a/mod/assign/tests/behat/grading_app_filters.feature b/mod/assign/tests/behat/grading_app_filters.feature index c483438d9b2..5dc9f96a7c0 100644 --- a/mod/assign/tests/behat/grading_app_filters.feature +++ b/mod/assign/tests/behat/grading_app_filters.feature @@ -50,7 +50,9 @@ Feature: In an assignment, teachers can change filters in the grading app And I set the field "filter" to "Not submitted" And I set the field "markerfilter" to "Marker 1" And I set the field "workflowfilter" to "In marking" + And I change window size to "large" And I click on "Grade" "link" in the "Student 1" "table_row" + And I change window size to "medium" Then the field "filter" matches value "Not submitted" And the field "markerfilter" matches value "Marker 1" And the field "workflowfilter" matches value "In marking" diff --git a/mod/assign/tests/behat/grading_status.feature b/mod/assign/tests/behat/grading_status.feature index 1553d95d1a6..40870f23be3 100644 --- a/mod/assign/tests/behat/grading_status.feature +++ b/mod/assign/tests/behat/grading_status.feature @@ -61,7 +61,9 @@ Feature: View the grading status of an assignment And I am on the "Test assignment name" "assign activity" page logged in as teacher1 And I follow "View all submissions" And I should see "In review" in the "Student 1" "table_row" + And I change window size to "large" And I click on "Grade" "link" in the "Student 1" "table_row" + And I change window size to "medium" And I should see "1 of 1" And I set the field "Marking workflow state" to "Released" And I press "Save changes" @@ -77,7 +79,9 @@ Feature: View the grading status of an assignment And I am on the "Test assignment name" "assign activity" page logged in as teacher1 And I follow "View all submissions" And I should see "Released" in the "Student 1" "table_row" + And I change window size to "large" And I click on "Grade" "link" in the "Student 1" "table_row" + And I change window size to "medium" And I should see "1 of 1" And I set the field "Marking workflow state" to "In marking" And I set the field "Notify student" to "0" @@ -88,7 +92,9 @@ Feature: View the grading status of an assignment # The grade should also remain displayed as it's stored in the assign DB tables, but the final grade should be empty. And "Student 1" row "Grade" column of "generaltable" table should contain "50.00" And "Student 1" row "Final grade" column of "generaltable" table should contain "-" + And I change window size to "large" And I click on "Grade" "link" in the "Student 1" "table_row" + And I change window size to "medium" And I click on "Change filters" "link" And I set the field "Workflow filter" to "In review" And I should see "0 of 0" @@ -142,7 +148,9 @@ Feature: View the grading status of an assignment And I follow "View all submissions" And I should see "Graded - resubmitted" in the "Student 1" "table_row" And I wait "10" seconds + And I change window size to "large" And I click on "Grade" "link" in the "Student 1" "table_row" + And I change window size to "medium" And I should see "1 of 1" And I set the field "Grade out of 100" to "99.99" And I set the field "Feedback comments" to "Even better job! Really." diff --git a/mod/assign/tests/behat/hide_grader.feature b/mod/assign/tests/behat/hide_grader.feature index 02c0db80cfa..87e0c4161d4 100644 --- a/mod/assign/tests/behat/hide_grader.feature +++ b/mod/assign/tests/behat/hide_grader.feature @@ -38,7 +38,9 @@ Feature: Hide grader identities identity from students And I am on the "Test assignment name" Activity page logged in as teacher1 And I follow "View all submissions" And I should not see "Graded" in the "Student 1" "table_row" + And I change window size to "large" And I click on "Grade" "link" in the "Student 1" "table_row" + And I change window size to "medium" And I set the field "Grade out of 100" to "50" And I set the field "Feedback comments" to "Catch for us the foxes." And I press "Save changes" diff --git a/mod/assign/tests/behat/quickgrading.feature b/mod/assign/tests/behat/quickgrading.feature index 99c2a68f660..170039cc62a 100644 --- a/mod/assign/tests/behat/quickgrading.feature +++ b/mod/assign/tests/behat/quickgrading.feature @@ -30,7 +30,9 @@ Feature: In an assignment, teachers grade multiple students on one page And I am on the "Test assignment name" Activity page logged in as teacher1 And I follow "View all submissions" - When I click on "Grade" "link" in the "Student 1" "table_row" + When I change window size to "large" + And I click on "Grade" "link" in the "Student 1" "table_row" + And I change window size to "medium" And I press "Save changes" And I am on the "Test assignment name" "assign activity" page Then I should see "1" in the "Needs grading" "table_row" diff --git a/mod/assign/tests/behat/reopen_locked_submission.feature b/mod/assign/tests/behat/reopen_locked_submission.feature index 3521832d28d..e6cc548d919 100644 --- a/mod/assign/tests/behat/reopen_locked_submission.feature +++ b/mod/assign/tests/behat/reopen_locked_submission.feature @@ -35,7 +35,9 @@ Feature: Submissions are unlocked when a new attempt is given And I am on the "Test assignment name" Activity page logged in as teacher1 And I follow "View all submissions" + And I change window size to "large" And I open the action menu in "Student 1" "table_row" + And I change window size to "medium" And I follow "Prevent submission changes" And I should see "Submission changes not allowed" And I click on "Quick grading" "checkbox" @@ -62,10 +64,14 @@ Feature: Submissions are unlocked when a new attempt is given And I am on the "Test assignment name" Activity page logged in as teacher1 And I follow "View all submissions" + And I change window size to "large" When I open the action menu in "Student 1" "table_row" + And I change window size to "medium" And I follow "Prevent submission changes" Then I should see "Submission changes not allowed" + And I change window size to "large" And I open the action menu in "Student 1" "table_row" + And I change window size to "medium" And I follow "Allow another attempt" And I should see "Reopened" And I should not see "Submission changes not allowed" diff --git a/mod/assign/tests/behat/rescale_grades.feature b/mod/assign/tests/behat/rescale_grades.feature index 2f5075101b7..7a3d1dba156 100644 --- a/mod/assign/tests/behat/rescale_grades.feature +++ b/mod/assign/tests/behat/rescale_grades.feature @@ -72,7 +72,9 @@ Feature: Check that the assignment grade can be rescaled when the max grade is c Scenario: Rescaling should not produce negative grades Given I follow "View all submissions" + And I change window size to "large" And I click on "Grade" "link" in the "Student 2" "table_row" + And I change window size to "medium" And I wait until the page is ready And I am on the "Test assignment name" "assign activity" page And I navigate to "Settings" in current page administration diff --git a/mod/assign/tests/behat/steps_blind_marking.feature b/mod/assign/tests/behat/steps_blind_marking.feature index 450ea075df1..cd00a7c2341 100644 --- a/mod/assign/tests/behat/steps_blind_marking.feature +++ b/mod/assign/tests/behat/steps_blind_marking.feature @@ -74,7 +74,9 @@ Feature: Assignments correctly add feedback to the grade report when workflow an And I should see "Ready for release" in the "I'm the student's first submission" "table_row" And I set the field "Grading action" to "Reveal student identities" And I press "Continue" + And I change window size to "large" And I click on "Grade" "link" in the "Student 1" "table_row" + And I change window size to "medium" And I set the field "Marking workflow state" to "Released" And I press "Save changes" And I follow "View all submissions" diff --git a/theme/boost/scss/moodle/modules.scss b/theme/boost/scss/moodle/modules.scss index efffa9d030c..81b63b67067 100644 --- a/theme/boost/scss/moodle/modules.scss +++ b/theme/boost/scss/moodle/modules.scss @@ -1497,6 +1497,12 @@ $popout-header-height: 4rem; background-color: $card-bg; } +.path-mod-assign .gradingtable thead tr { + position: sticky; + top: $navbar-height; + z-index: 1; +} + /** * Mod LTI. */ diff --git a/theme/boost/style/moodle.css b/theme/boost/style/moodle.css index d61ad02813e..21235984334 100644 --- a/theme/boost/style/moodle.css +++ b/theme/boost/style/moodle.css @@ -34764,6 +34764,12 @@ img.userpicture { background-color: #fff; } +.path-mod-assign .gradingtable thead tr { + position: sticky; + top: 60px; + z-index: 1; +} + /** * Mod LTI. */ diff --git a/theme/classic/style/moodle.css b/theme/classic/style/moodle.css index 2c36dda4a6f..635c48289e5 100644 --- a/theme/classic/style/moodle.css +++ b/theme/classic/style/moodle.css @@ -34764,6 +34764,12 @@ img.userpicture { background-color: #fff; } +.path-mod-assign .gradingtable thead tr { + position: sticky; + top: 50px; + z-index: 1; +} + /** * Mod LTI. */