project: Moodle
summary: Course hierarchy (Short-term solution)
description: Indentation functionality was removed in Moodle 4.0 for reasons including: poor accessibility poor mobile experience potential content formatting issues. Based on the discovery phase outcomes, the key requirement identified was the need of having a proper course structure functionality that allows content creators to add subsections within sections and the ability to create nested content to build a better course hierarchy. The technical discussion with the team highlighted the complexity of this solution and the impossibility of including this project to the 4.2 release, so the internal stakeholders agreed on proposing a short-term temporary solution to cover the users needs around this issue while working on the long-term solution. The short-term solution of the Course hierarchy project within the scope: Back the indentation in 3 levels of the hierarchy Section > Primary activity (Non-indented) > Secondary activity (Indented) = 3 levels of hierarchy Primary and Secondary activity cards visual differentiation. Show visual indentation on the course index. Add a new setting in the site config to ignore indentation. Simplify activity cards Backport the short-term solution to 4.0 and 4.1 Prototype for 4.2| UX tasks related to short-term| Epic for long-term solution|

1.summary: Recover move right/left functionality removed/hidden for 4.0
description: As a teacher I want to be able to indent activities so I could simulate a hierarchy on my course Move right/left functionality was removed from Moodle 4.0. We want to recover the functionality as in 3.11 but with some changes: This issue doesnt include any migration/upgrading process. So the value for indent field in the course_modules table of the database wont change by default. There is only one indentation level allowed. So the teacher could move the activity once to the right. That means that when the teacher moves any activity to the right, the new value for indent field in the course_modules table will be 1. And when the teacher moves any activity to the left, the new value for indent field in the course_modules table will be 0. Whatever the previous value of the indent field was. For activities with indent value 0 or any negative value, there will be an option to Move right, but not to Move left. For activities with indent value higher than 0, there will be an option to Move left, but not to Move right. For activities with indent value higher than 0, the activity card will have a bigger margin on the left part as shown in the prototype| : Remember for RTL languages the functionality should be the opposite, as in 3.11 Note: A backporting request would be raised once this issue is integrated, so we should try to implement the patch following the rules to be backportable. More information about backporting request:
2.summary: New course format setting to enable/disable course indentation in Weeks and Topics
description: As an admin I want to decide whether the teacher could use course indentation or not so we dont need to redesign current existing courses A new setting will be available at site level for admins. Whenever the setting is enabled, the teacher will have Move right/Move left options to indent elements on their courses, and the value indent of the course_modules table would have an impact on the look&feel of the course. Whenever the setting is disabled, the teacher wont have Move right/Move left options to indent elements on their courses, and the value indent of the course_modules table wont have any impact on the look&feel of the course. The default value of the setting will be: True/Enable for new sites. True/Enable for sites migrating from 3.11 or earlier versions. False/Disable for sites migrating from 4.0 and 4.1 versions. Note: A backporting request would be raised once this issue is integrated, so we should try to implement the patch following the rules to be backportable. More information about backporting request:
3.summary: Apply indentation on the course index
description: As a teacher I want to be able to show the students activity indentation in the course index so I could simulate a hierarchy on my courses course index For activities with indent value higher than 0 and when the indentation site setting is enabled, the activity element in the course index will have a bigger margin on the left part as shown in the prototype| Remember for RTL languages the margin should be on the right side, as in 3.11 Note: A backporting request would be raised once this issue is integrated, so we should try to implement the patch following the rules to be backportable. More information about backporting request:
4.summary: Add an option for admins to reset indentation for courses on the site
description: As an admin I want to reset indentation from site courses so I can start using indentation for courses created from now As we removed indentation for 4.0 and 4.1, some sites that were using indentation on 3.11 or earlier versions, have redesign their course on 4.0 because 4.1 not to need indentation. But the indent field on course_modules table has not been reset. So When they upgrade to latest versions and activate site indentation, the existing courses will be "changed" to use the indentation again. To reset the indentation for existing courses and use indentation for newly create courses, the teachers/admins would need to change and remove indentation from all courses manually one by one. To avoid this manual work, we want to add a link for admins to reset indent field from all existing courses. The execution should update to 0 all indent values on course_modules table. Note: A backporting request would be raised once this issue is integrated, so we should try to implement the patch following the rules to be backportable. More information about backporting request:
5.summary: Recover move right/left functionality removed/hidden for 4.0 (backport of )
description: As indentation was removed for 4.0, we want to recover it for 4.0 and 4.1
6.summary: New course format level setting to enable/disable course indentation in 4.0 and 4.1 (backport of )
description: As indentation was removed for 4.0, we want to recover it for 4.0 and 4.1
7.summary: Apply indentation on the course index (backport of )
description: As indentation was removed for 4.0, we want to recover it for 4.0 and 4.1
8.summary: Add an option for admins to reset indentation for courses on the site for 4.0 and 4.1 (backport of )
description: As indentation was removed for 4.0, we want to recover it for 4.0 and 4.1 .

Below is an instruction that describes a task, paired with an input that provides an epic with this format: 
"project": "Name of the project" 
"summary": "Summary of the epic user story" 
"description": "Description of the epic user story". Write a response that appropriately completes the request.### Instruction:
Break this epic user story into smaller tasks to help the developers understand the epic better, you can divide this epic into as much as you want depending on the complexity of the epic.
### Input:
project: Moodle
summary: Course hierarchy (Short-term solution)
description: Indentation functionality was removed in Moodle 4.0 for reasons including: poor accessibility poor mobile experience potential content formatting issues. Based on the discovery phase outcomes, the key requirement identified was the need of having a proper course structure functionality that allows content creators to add subsections within sections and the ability to create nested content to build a better course hierarchy. The technical discussion with the team highlighted the complexity of this solution and the impossibility of including this project to the 4.2 release, so the internal stakeholders agreed on proposing a short-term temporary solution to cover the users needs around this issue while working on the long-term solution. The short-term solution of the Course hierarchy project within the scope: Back the indentation in 3 levels of the hierarchy Section > Primary activity (Non-indented) > Secondary activity (Indented) = 3 levels of hierarchy Primary and Secondary activity cards visual differentiation. Show visual indentation on the course index. Add a new setting in the site config to ignore indentation. Simplify activity cards Backport the short-term solution to 4.0 and 4.1 Prototype for 4.2| UX tasks related to short-term| Epic for long-term solution|

### Response:
1.summary: Recover move right/left functionality removed/hidden for 4.0
description: As a teacher I want to be able to indent activities so I could simulate a hierarchy on my course Move right/left functionality was removed from Moodle 4.0. We want to recover the functionality as in 3.11 but with some changes: This issue doesnt include any migration/upgrading process. So the value for indent field in the course_modules table of the database wont change by default. There is only one indentation level allowed. So the teacher could move the activity once to the right. That means that when the teacher moves any activity to the right, the new value for indent field in the course_modules table will be 1. And when the teacher moves any activity to the left, the new value for indent field in the course_modules table will be 0. Whatever the previous value of the indent field was. For activities with indent value 0 or any negative value, there will be an option to Move right, but not to Move left. For activities with indent value higher than 0, there will be an option to Move left, but not to Move right. For activities with indent value higher than 0, the activity card will have a bigger margin on the left part as shown in the prototype| : Remember for RTL languages the functionality should be the opposite, as in 3.11 Note: A backporting request would be raised once this issue is integrated, so we should try to implement the patch following the rules to be backportable. More information about backporting request:
2.summary: New course format setting to enable/disable course indentation in Weeks and Topics
description: As an admin I want to decide whether the teacher could use course indentation or not so we dont need to redesign current existing courses A new setting will be available at site level for admins. Whenever the setting is enabled, the teacher will have Move right/Move left options to indent elements on their courses, and the value indent of the course_modules table would have an impact on the look&feel of the course. Whenever the setting is disabled, the teacher wont have Move right/Move left options to indent elements on their courses, and the value indent of the course_modules table wont have any impact on the look&feel of the course. The default value of the setting will be: True/Enable for new sites. True/Enable for sites migrating from 3.11 or earlier versions. False/Disable for sites migrating from 4.0 and 4.1 versions. Note: A backporting request would be raised once this issue is integrated, so we should try to implement the patch following the rules to be backportable. More information about backporting request:
3.summary: Apply indentation on the course index
description: As a teacher I want to be able to show the students activity indentation in the course index so I could simulate a hierarchy on my courses course index For activities with indent value higher than 0 and when the indentation site setting is enabled, the activity element in the course index will have a bigger margin on the left part as shown in the prototype| Remember for RTL languages the margin should be on the right side, as in 3.11 Note: A backporting request would be raised once this issue is integrated, so we should try to implement the patch following the rules to be backportable. More information about backporting request:
4.summary: Add an option for admins to reset indentation for courses on the site
description: As an admin I want to reset indentation from site courses so I can start using indentation for courses created from now As we removed indentation for 4.0 and 4.1, some sites that were using indentation on 3.11 or earlier versions, have redesign their course on 4.0 because 4.1 not to need indentation. But the indent field on course_modules table has not been reset. So When they upgrade to latest versions and activate site indentation, the existing courses will be "changed" to use the indentation again. To reset the indentation for existing courses and use indentation for newly create courses, the teachers/admins would need to change and remove indentation from all courses manually one by one. To avoid this manual work, we want to add a link for admins to reset indent field from all existing courses. The execution should update to 0 all indent values on course_modules table. Note: A backporting request would be raised once this issue is integrated, so we should try to implement the patch following the rules to be backportable. More information about backporting request:
5.summary: Recover move right/left functionality removed/hidden for 4.0 (backport of )
description: As indentation was removed for 4.0, we want to recover it for 4.0 and 4.1
6.summary: New course format level setting to enable/disable course indentation in 4.0 and 4.1 (backport of )
description: As indentation was removed for 4.0, we want to recover it for 4.0 and 4.1
7.summary: Apply indentation on the course index (backport of )
description: As indentation was removed for 4.0, we want to recover it for 4.0 and 4.1
8.summary: Add an option for admins to reset indentation for courses on the site for 4.0 and 4.1 (backport of )
description: As indentation was removed for 4.0, we want to recover it for 4.0 and 4.1 .
