Feature Requests

Please do NOT use this section of the forum to request help if Joomdle does not work for you in some particular way. Your post will be deleted.

Adding the Moodle Resources view

  • Jonathan Morgan-Jones
  • Topic Author
  • Offline
  • New Member
  • New Member
More
11 years 9 months ago #1 by Jonathan Morgan-Jones
Adding the Moodle Resources view was created by Jonathan Morgan-Jones
How easy or otherwise is it to add the Moodle Resources view for a course? - http://<moodle site>/course/resources.php?id=xxx

I've been asked to add this into Joomla as part of the user profile i.e. My site with user profile that includes <Resources> tab that displays the Course name list with links to Course resources only. I was hoping to display the results within the Joomdle wrapper, either direct from Moodle or with the option of a separate Joomdle view.

I'm happy to code this myself and add it back to the community, if anyone can point me at the code to look at, to get started.

Please Log in or Create an account to join the conversation.

  • Jonathan Morgan-Jones
  • Topic Author
  • Offline
  • New Member
  • New Member
More
11 years 9 months ago #2 by Jonathan Morgan-Jones
Replied by Jonathan Morgan-Jones on topic Adding the Moodle Resources view
Just an update to this...
I've found \components\com_joomdle\views\wrapper\view.html.php and added the following to the $mtype case statement:

case "crsresource" :
$path = '/course/resources.php?id=';
$this->wrapper->url = $params->get( 'MOODLE_URL' ).$path.$id;
break;

That does the trick as far as the layout is concerned within the moodle output (with a manually applied URL).
e.g. Given - /index.php?option=com_joomdle&view=wrapper&moodle_page_type=course&id=2&Itemid=172 replacing 'course' with 'crsresource' updates the wrapper view with just the course resources.

I'm now back tracking through the code to add the appropriate interface options.

Please Log in or Create an account to join the conversation.