create coruse from back end

21 views
Skip to first unread message

swarnika kumari

unread,
Mar 13, 2014, 7:05:44 AM3/13/14
to open...@googlegroups.com

Hi,

I am trying to create a course from back end (inserting different values from backend in same set of tables affected by create course through application).

While accessing that created course I am getting below error message on front end 

 

Error message:

The learning resource is corrupted and cannot be displayed. Contact your support staff or use the delete link to remove this resource from the system.

 

Below are the lists of table used for course creation from backend:

a.       o_repositoryentry.

b.      o_repositoryentry_cycle.

c.       o_bs_identity.

d.      o_bs_membership.

e.      o_bs_policy.

f.        o_bs_secgroup.

 

 

Could you please tell me why I am getting this error message? And what may be the possibilities to remove this error.

 

Stéphane Rossé

unread,
Mar 14, 2014, 6:03:18 AM3/14/14
to open...@googlegroups.com
Hi

Not a good idea, OpenOLAT have a REST API which can create empty courses. The course is made of a set of rows in different tables, and files on the files system.

Within OpenOLAT code, you can follow the method:

org.olat.restapi.repository.course.CoursesWebService   createEmptyCourse


Or better call it directly with a REST call to OpenOLAT which looks like:


See the documentation for the possible parameters.

If you create a course directly by inserting rows in the database, you will must change your code every time we made a change in the course mode in OpenOLAT (and there are some big changes to come with OpenOLAT 10).

Best regards
Stéphane Rossé
Reply all
Reply to author
Forward
0 new messages