This commit displays all the module forms together in the default
activity completion page:
- The checkboxes have been removed. Now the activity names are
displayed as accordions.
- Module names have been changed from plural to singular.
- The activity completion form is displayed below each module name,
when the chevron icon is expanded. The cancel button is not displayed.
- The CSS has been updated to meet the prototype styling.
Many times the action menu item triggers modals to show more information
to the user. In most cases this is enough, however, a modal will close
the menu and the user is not able to see the modal content in the page
context. To solve this now menus can define subpanels that are displayed
next the the menu item when the item is focused or hover. This will be
used to group options like the group mode in activities or to replace
the adhoc solution implemented to select language in the user menu.
Drawers have several JS logic depending on the screen size. However,
some generic components like action menu subpanels require fake drawers
to test the behaviour when it is displayed in a drawer (for example in a
block). This patch allow a behat page to have a div with data-region as
fixed-drawer so the component can detect as it is inside a a drawer but
without the autoclose on small screens.
Add a new global module to get information from the page. Some methods
are just local functions moved to as a global library. For example, the
drawers isSmall or isLarge to detect the page width. The other funcionts
added are to detect focusable elements and they are needed to loop on
elements, especially when accessibility keyboard navigation is implemented.
- Update completion dropdown button styles for students depending on activity
overall completion status.
- Add new behat partial named selector 'core_courseformat > Activity completion'
- Add new behat Feature to test activity completion criteria button or dropdown
for students and teachers.
- Move completion information to a new output class 'core_courseformat\output\local\content\cm\completion'
- Replace current dropdown with 'core\output\local\dropdown\dialog'
- Modify manual conditions logic in course page. Now 'Mark as done' button will only be displayed to
tracked users (with moodle/course:isincompletionreports capability)
- Add new styles for completion dialog contents
Also removed the 10rem bottom margin form the quiz editing page. It was
there to make sure that there is enough room for the 'add new question'
dropdown. But it's not needed anymore (hasn't been since long time ago).
- Create a new 'showmore' template that receives both collapsed and expanded content.
Initially only the collapsed content will be displayed with a "Show more" button. When it is expanded,
only the expanded content will be displayed with "Show less" button.
- Add 'showmore' component to component library