Link to open a course in the app from my custom plugin

Link to open a course in the app from my custom plugin

de către Mahmoud msa-
Număr de răspunsuri: 3

Hello Moodlers,

I'm searching for a way to  make a link opens a course from my custom plugin, how can this be done?

it should be link ion-item or a tag when click it will open the course

also can i open it like we have in the website i can view the course with enrolled in it? or i have to be enrolled in the course so it can be opened

Appreciate any help 

Regards,


Media aprecierilor: -
Ca răspuns la Mahmoud msa

Re: Link to open a course in the app from my custom plugin

de către Mike Churchward-
Fotografia lui Core developers Fotografia lui Plugin developers Fotografia lui Testers
I have successfully used the 'core-link' directive with capture set to "true" to do this. But if the user is not currently enrolled in the course, it requires them to jump out to a browser. Not sure why.
So, my template has this:
<a href="<%url%>" core-link capture="true"><%fullname%></a>