Example #1
0
 case 'copy':
     if (!$is_allowed_to_edit) {
         api_not_allowed(true);
     }
     $hideScormCopyLink = api_get_setting('course.hide_scorm_copy_link');
     if ($hideScormCopyLink === 'true') {
         api_not_allowed(true);
     }
     if ($debug > 0) {
         error_log('New LP - export action triggered', 0);
     }
     if (!$lp_found) {
         error_log('New LP - No learnpath given for copy', 0);
         require 'lp_list.php';
     } else {
         $learnPath->copy();
     }
     require 'lp_list.php';
     break;
 case 'export':
     if (!$is_allowed_to_edit) {
         api_not_allowed(true);
     }
     $hideScormExportLink = api_get_setting('course.hide_scorm_export_link');
     if ($hideScormExportLink === 'true') {
         api_not_allowed(true);
     }
     if ($debug > 0) {
         error_log('New LP - export action triggered', 0);
     }
     if (!$lp_found) {