2

Im doing some testing with course creation with the php valence api, everything works fine on course creation but the path information isn't correct, for whatever reason it just creates a folder in enforced with the name as the course code. Am I missing something?

$rand_course_id =  rand( 99999, 999999);
echo $rand_course_id;
$json = '{
    "Name": "Valence '.$rand_course_id.'",
    "Code": "VALENCE_'.$rand_course_id.'",
    "Path": "/content/enforced ",
    "CourseTemplateId": "6722",
    "SemesterId": null,
    "StartDate": null,
    "EndDate": null,
    "LocaleId": null,
    "ForceLocale": "false",
    "ShowAddressBook": "true"
}';`
mphs_json_request('courses',$json);
Ian
  • 208
  • 2
  • 10

1 Answers1

1

There is a config variable that forces the paths of course content into a particular form. The variable is d2l.Tools.CMS.CoursePathEnforced. Perhaps this value is on in your system?

Cadmium
  • 566
  • 3
  • 11
  • 1
    thanks for the tip, our system currently has it on. So looks like it could be a dead end road for me unless I can get it turned on. – Ian Jun 07 '12 at 14:34