Quantcast
Channel: General developer forum
Viewing all articles
Browse latest Browse all 37679

Re: How please to access core_course_renderer::tagged_courses from a Block

$
0
0
by Jenny Gray.  

If you look at tag/index.php you can copy where the tagged_courses() function has already been used.

Basically you need to declare a renderer object and then call the function on it, something like this:

$courserenderer = $PAGE->get_renderer('core', 'course');
$courserenderer->tagged_courses(XXX);

You also need to pass the id number rather than a text string into the function, which will probably solve the fatal error.


Viewing all articles
Browse latest Browse all 37679

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>