Yannick Warnier 9 years ago
parent
commit
685a71e35b
2 changed files with 5 additions and 2 deletions
  1. 2 2
      main/newscorm/aicc.class.php
  2. 3 0
      main/newscorm/learnpath.class.php

+ 2 - 2
main/newscorm/aicc.class.php

@@ -294,12 +294,12 @@ class aicc extends learnpath
             $parent = 0; // TODO: Deal with the parent.
             $previous = 0;
             $prereq = $oAu->prereq_string;
-            $sql_item = "INSERT INTO $new_lp_item (c_id, lp_id,item_type,ref,title, path,min_score,max_score, $field_add parent_item_id,previous_item_id,next_item_id, prerequisite,display_order) " .
+            $sql_item = "INSERT INTO $new_lp_item (c_id, lp_id,item_type,ref,title, path,min_score,max_score, $field_add parent_item_id,previous_item_id,next_item_id, prerequisite,display_order,parameters) " .
                     "VALUES " .
                     "($course_id, $lp_id, 'au','".$oAu->identifier."','".$title."'," .
                     "'$path',0,100, $value_add" .
                     "$parent, $previous, 0, " .
-                    "'$prereq', 0" .
+                    "'$prereq', 0,'".(!empty($oAu->parameters)?Database::escape_string($oAu->parameters):'')."'" .
                     ")";
             Database::query($sql_item);
             if ($this->debug > 1) { error_log('New LP - In aicc::import_aicc() - inserting item : '.$sql_item.' : ', 0); }

+ 3 - 0
main/newscorm/learnpath.class.php

@@ -3570,6 +3570,9 @@ class learnpath
                     }
                     // Formatting AICC HACP append URL.
                     $aicc_append = '?aicc_sid=' . urlencode(session_id()) . '&aicc_url=' . urlencode(api_get_path(WEB_CODE_PATH) . 'newscorm/aicc_hacp.php') . '&';
+                    if (!empty($lp_item_params)) {
+                        $aicc_append .= $lp_item_params . '&';
+                    }
                     if ($lp_item_type != 'dir') {
                         // Quite complex here:
                         // We want to make sure 'http://' (and similar) links can