Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Suggestion - Set expanded state in browser storage #20

Open
arvindm1991 opened this issue Nov 21, 2020 · 3 comments
Open

Suggestion - Set expanded state in browser storage #20

arvindm1991 opened this issue Nov 21, 2020 · 3 comments
Labels
enhancement New feature or request

Comments

@arvindm1991
Copy link

A minor suggestion - You might consider creating a storing the expanded state for a tab in the browsers local storage. I've seen it help Ux.

Collapsible Topics format does it here:
https://github.com/cellule-tice/moodle-format_collapsibletopics/blob/master/amd/src/collapsibletopics.js

@arvindm1991
Copy link
Author

I also personally like their section progressbar and woud love to see that implemented in multitopic format as well. Kudos on building this format!

@james-cnz
Copy link
Owner

james-cnz commented Dec 6, 2020

Sorry, I don't think I'll have time to look into this properly (and I'm somewhat apprehensive about adding new features anyway). In case it's of interest, though:

I've tried something out for storing the expanded state for topics, based on the code you linked, in this branch:
https://github.com/james-cnz/moodle-format_multitopic/tree/expand_state_save
I'm not really happy with how it remembers expanded state across Moodle logins, although I guess the sesskey could probably be saved with the toggles, and compared on load to address this.

I've also started something for completion progress, in this branch:
https://github.com/james-cnz/moodle-format_multitopic/tree/completion_progress
I'm not sure about a progress bar. There seems to be some ambiguity around this: The section progress bar within the Collapsible Topics format (like the section progress fraction within Topics format) seems to exclude completed failed activities, whereas the course progress bar on the Dashboard in recent versions of Moodle seems to include them. Also, I think it would be nice to do something that could be used hierarchically--on pages and subpages as well as topics--but this would need to be small enough to fit on tabs. So I've tried a tick box, which is ticked if all included activities are ticked. This seems to mostly work, although it doesn't automatically update when an activity is marked complete (the page needs to be reloaded) and I can't think of any good way to fix this. There are also several display issues I am aware of, but haven't looked in to: The completion tick box in a section header is too high when edit mode's off, and appears under the edit menu rather than to the right of it when edit mode's on. A spacer should also probably be included in place of any missing tick boxes in section headings, so Edit menus will line up correctly. And I haven't included tooltips.

[EDIT: These branches were based off the code_prechecks branch. So you'd have to compare with that to see relevant changes.]

@james-cnz james-cnz added the enhancement New feature or request label Nov 10, 2022
@james-cnz
Copy link
Owner

Expanded state is now stored in the latest release for Moodle 4. Since it's default Moodle 4 behaviour, it came basically for free with the update to support drag and drop.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants