FMCorz / moodle-block_xp

A gamification plugin for Moodle allowing students to gain experience points and level up.
https://levelup.plus/?ref=github
150 stars 41 forks source link

Refactor settings page #92

Closed jrm-unamur closed 5 years ago

jrm-unamur commented 5 years ago

Hi there, Here is a little enhancement proposal. IMHO it would be better to refactor settings into a "admin_settingspage_tabs" (defined in boost theme) to keep only one entry for the block in the administration page (in boost-like themes). This way, it's easier for admins to browse plugin settings by selecting tabs rather than having to get back to admin menu. Furthermore this keeps compatibility with non boost themes). Regards Jean-Roch

FMCorz commented 5 years ago

Thanks for the suggestion. At first glance it doesn't look like we can use the core class, because it requires admin_settingpage and thus does not support admin_externalpage which Level up! uses. We'll look into it however. Thanks.

FMCorz commented 5 years ago

Moreover, the admin_settingspage_tabs doesn't maintain the tab selection after a post submission, which means that the user is sent back to the first tab after they save the values. This is a drawback to using this class. We may reconsider when the above two points are addressed.

Nonetheless, thank you for suggesting this improvement!