Skip to content

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