Hi,
I have a plugin that reads text file and create courses from the data in it...
I'm using the API create_course like this:
$course->idnumber = $course_id; $course->fullname = $course_name; $course->shortname = $course_shortname; $course->category = $category_code; $course->startdate = time (); $course->password = md5 ( $course_psw ); $courseconfig = get_config ( 'moodlecourse' ); foreach ( $courseconfig as $key => $value ) { $course->$key = $value; } $course = create_course ( $course );
For reasons I can not identify some of the courses (1 out of 100) created without any enrolment methods, so I can not enroll students/teachers to them...
Any ideas for the reason or how to track the problem down would be very appreciated...
Thank you,
Peter