Adding links automatically when copying an LP see #5760

skala
Julio Montoya 12 years ago
parent 61ac3f9942
commit d95a3afc32
  1. 17
      main/coursecopy/classes/CourseSelectForm.class.php

@ -446,6 +446,23 @@ class CourseSelectForm
}
}
break;
case RESOURCE_LEARNPATH:
$lps = $_POST['resource'][RESOURCE_LEARNPATH];
if (!empty($lps)) {
foreach ($lps as $id => $obj) {
$lp_resource = $course->resources[RESOURCE_LEARNPATH][$id];
if (isset($lp_resource) && !empty($lp_resource) && isset($lp_resource->items)) {
foreach ($lp_resource->items as $item) {
switch ($item['item_type']) {
//Add links added in a LP see #5760
case 'link':
$_POST['resource'][RESOURCE_LINK][$item['path']] = 1;
break;
}
}
}
}
}
case RESOURCE_LINKCATEGORY :
case RESOURCE_FORUMCATEGORY :
case RESOURCE_QUIZQUESTION :

Loading…
Cancel
Save