[Bugfix:CourseMaterials] Open/Close All Folders for Students (#8425)
[Bugfix:CourseMaterials] Open/Close All Folders for Students (#8425)

* open/close all folders for students

* test change

* adjust for course_material error

* using else instead of elseif

* no duplicate code
Submitty/Submitty,Submitty/Submitty,Submitty/Submitty,Submitty/Submitty,Submitty/Submitty,Submitty/Submitty,Submitty/Submitty,Submitty/Submitty,Submitty/Submitty