$hacp_version = $value; break; case 'session_id': $hacp_session_id = $value; break; case 'aicc_data': //error_log('In '.__FILE__.', '.__LINE__.' - aicc data before translation is '.$value, 0); $value = str_replace('+', ' ', $value); $value = str_replace($convert_enc, $convert_dec, $value); $hacp_aicc_data = $value; break; } } //error_log('In '.__FILE__.', '.__LINE__.' - aicc data is '.$hacp_aicc_data, 0); // Treat the incoming request: $aicc = new aicc(); $msg_array = $aicc->parse_ini_string_quotes_safe($hacp_aicc_data, array('core_lesson', 'core_vendor')); //error_log('Message is now in this form: '.print_r($msg_array, true), 0); foreach ($msg_array as $key => $dummy) { switch (strtolower($key)) { case 'core': foreach ($msg_array[$key] as $subkey => $value){ switch (strtolower($subkey)) { case 'lesson_location': //error_log('Setting lesson_location to '.$value, 0); $oItem->set_lesson_location($value); break; case 'lesson_status': //error_log('Setting lesson_status to '.$value, 0); $oItem->set_status($value); break;
} $proximity = ''; if (!empty($_REQUEST['content_proximity'])) { $proximity = Database::escape_string($_REQUEST['content_proximity']); } $maker = ''; if (!empty($_REQUEST['content_maker'])) { $maker = Database::escape_string($_REQUEST['content_maker']); } $oScorm->set_proximity($proximity); $oScorm->set_maker($maker); $oScorm->set_jslib('scorm_api.php'); break; case 'aicc': require_once 'aicc.class.php'; $oAICC = new aicc(); $config_dir = $oAICC->import_local_package($s, $current_dir); if (!empty($config_dir)) { $oAICC->parse_config_files($config_dir); $oAICC->import_aicc(api_get_course_id()); } $proximity = ''; if (!empty($_REQUEST['content_proximity'])) { $proximity = Database::escape_string($_REQUEST['content_proximity']); } $maker = ''; if (!empty($_REQUEST['content_maker'])) { $maker = Database::escape_string($_REQUEST['content_maker']); } $oAICC->set_proximity($proximity); $oAICC->set_maker($maker);
$oScorm->set_jslib('scorm_api.php'); /* if (api_get_setting('search_enabled') === 'true' && extension_loaded('xapian')) { $searchkey = new SearchEngineManager(); $searchkey->course_code = api_get_course_id(); $searchkey->idobj = $oScorm->get_id(); $searchkey->value = $_REQUEST['terms']; $searchkey->tool_id = TOOL_LEARNPATH; $learn = new learnpath(api_get_course_id(), $oScorm->get_id(), api_get_user_id()); $learn->search_engine_save(); } */ break; case 'aicc': require_once 'aicc.class.php'; $oAICC = new aicc(); $config_dir = $oAICC->import_package($_FILES['file']); if (!empty($config_dir)) { $oAICC->parse_config_files($config_dir); $oAICC->import_aicc(api_get_course_id()); } $proximity = ''; if (!empty($_REQUEST['content_proximity'])) { $proximity = $mysql->escape_string($_REQUEST['content_proximity']); } $maker = ''; if (!empty($_REQUEST['content_maker'])) { $maker = $mysql->escape_string($_REQUEST['content_maker']); } $oAICC->set_proximity($proximity); $oAICC->set_maker($maker);