small improvement to list_courses() function

More
11 years 8 months ago #1 by Jordi
Hi Antonio and Chris,

you've done an awesome job, thanks for sharing this software.

We are using a custom module in Joomla that calls the list_courses function in Moodle (/auth/joomdle/auth.php).

Everything works fine, only thing missing is that the function rewrites the plugin file URLs for the course summary, but not for the category description. Do you think it's possible to add this in the next release of Joomdle. It would be very useful if this was included (we would not need to tweak the code every time we decide to update).

This is the code we are using (after line 1011 of auth.php, version 0.95):
Code:
$context = get_context_instance(CONTEXT_COURSECAT, $curso->cat_id); $c['cat_description'] = file_rewrite_pluginfile_urls ($c['cat_description'], 'pluginfile.php', $context->id, 'coursecat', 'description', NULL); $c['cat_description'] = str_replace ('pluginfile.php', '/auth/joomdle/pluginfile_joomdle.php', $c['cat_description']); $c['cat_description'] = format_text($c['cat_description'], FORMAT_MOODLE, $options);


Thanks!

Jordi

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

More
11 years 8 months ago #2 by Antonio Durán
Replied by Antonio Durán on topic small improvement to list_courses() function
Hi Jordi.

Thanks for your kind words, and for sharing your modification. I have updated my code with them, so they will ship in next release.

Antonio

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