create link to "create course" from custom controller

16 views
Skip to first unread message

federico....@gmail.com

unread,
Sep 30, 2015, 6:05:50 AM9/30/15
to OpenOLAT
Hi all, 

i need to create a new link to create course window. 
I have my custom controller that intercepts a click (formInnerEvent method) and I need to redirect user to create course page. 

Do you have some example code to implement this behaviour?

thanks 
Federico

Florian Gnägi

unread,
Oct 1, 2015, 12:11:42 PM10/1/15
to open...@googlegroups.com
Hi Federico

Basically you have to execute the following code: 

// Create a business path with the address of the course
String businessPath = "[RepositoryEntry:" + entry.getKey() + "];
// Launch the run controller for this business path in the current window
NewControllerFactory.getInstance().launch(businessPath, ureq, getWindowControl());

For an example, have a look at RepositoryEntryListController.doOpen() method. This is called when you click on the “start” link in the courses site. 

Cheers
Florian

--
--
Sie erhalten diese Nachricht, weil Sie Mitglied sind von Google
Groups-Gruppe "OpenOLAT".
Für das Erstellen von Beiträgen in dieser Gruppe senden Sie eine E-Mail
an open...@googlegroups.com
Um sich von dieser Gruppe abzumelden, senden Sie eine E-Mail an
openolat+u...@googlegroups.com
Weitere Optionen finden Sie in dieser Gruppe unter
http://groups.google.com/group/openolat?hl=de
-------------------------------------------------------------------------------------------------------------------
OpenOLAT - infinite learning - http://www.openolat.org

---
You received this message because you are subscribed to the Google Groups "OpenOLAT" group.
To unsubscribe from this group and stop receiving emails from it, send an email to openolat+u...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

----------------------------------------------------------
professional services for the e-learning system OpenOLAT
 hosting - operating - support - development - consulting
----------------------------------------------------------

frentix  GmbH
Florian Gnägi, Geschäftsführer
Hardturmstrasse 76
CH-8005 Zürich, Switzerland

skype:gnaegi  twitter:gnaegi  xing:Florian_Gnaegi 
----------------------------------------------------------




Reply all
Reply to author
Forward
0 new messages