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

Speed up gathering of information for each course section #16

Open
wants to merge 1 commit into
base: MOODLE_23_STABLE
Choose a base branch
from

Conversation

davosmith
Copy link

Firstly, this checks section visibility at the start of the section processing, so that hidden sections are skipped immediately (rather than processing each activity in the section and then not adding them at the end).

Secondly, the cm_info functions 'get_url()' and 'get_icon_url()' are used, which both simplifies the code and removes a slow call to 'resource_get_coursemodule_info()' (which needs to access the DB to get the details of the file(s) included in the resource).

Also, the use of 'has_view()' allows for compatibility with any 3rd-party addons that, like the label module, do not have a 'view' link.

@suesussi
Copy link

suesussi commented Sep 9, 2013

På semester. Återkommer 16 september.

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

Successfully merging this pull request may close these issues.

2 participants