Improve LP speed

1.10.x
jmontoyaa 10 years ago
parent 919fb74111
commit 06fcbe2f88
  1. 8
      main/inc/ajax/lp.ajax.php

@ -65,7 +65,6 @@ switch ($action) {
if (api_is_allowed_to_edit(null, true)) { if (api_is_allowed_to_edit(null, true)) {
$new_order = $_POST['new_order']; $new_order = $_POST['new_order'];
$sections = explode('^', $new_order); $sections = explode('^', $new_order);
$new_array = array(); $new_array = array();
@ -189,12 +188,7 @@ switch ($action) {
break; break;
} }
$learningPath = new learnpath( $learningPath = learnpath::getLpFromSession(api_get_course_id(), $lpId, api_get_user_id());
api_get_course_id(),
$lpId,
api_get_user_id()
);
$lpItem = $learningPath->getItem($lpItemId); $lpItem = $learningPath->getItem($lpItemId);
if (empty($lpItem)) { if (empty($lpItem)) {

Loading…
Cancel
Save