本文整理汇总了PHP中JoomdleHelperContent::call_method_debug方法的典型用法代码示例。如果您正苦于以下问题:PHP JoomdleHelperContent::call_method_debug方法的具体用法?PHP JoomdleHelperContent::call_method_debug怎么用?PHP JoomdleHelperContent::call_method_debug使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类JoomdleHelperContent
的用法示例。
在下文中一共展示了JoomdleHelperContent::call_method_debug方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: check_joomdle_system
//.........这里部分代码省略.........
}
if ($system[1]['error'] != '' || $system[2]['error'] != '') {
/* If no working connection, no need to continue */
return $system;
}
// Check bare HTTP connection
$moodle_url = $params->get('MOODLE_URL');
$moodle_file_url = $moodle_url . '/auth/joomdle/connection_test.php';
$joomla_file_url = $moodle_url . '/auth/joomdle/connection_test_joomla.php';
// Joomla to Moodle
// $result = file_get_contents ($moodle_file_url);
$result = JoomdleHelperContent::get_file($moodle_file_url);
$system[6]['description'] = JText::_('COM_JOOMDLE_JOOMDLE_JOOMLA_TO_MOODLE_CONNECTION');
if (strncmp($result, 'OK', 2) != 0) {
$system[6]['value'] = 0;
$system[6]['error'] = JText::_('COM_JOOMDLE_JOOMLA_CANNOT_CONNECT_TO_MOODLE');
} else {
$system[6]['value'] = 1;
$system[6]['error'] = '';
}
// Moodle to Joomla
// $result = file_get_contents ($joomla_file_url);
$result = JoomdleHelperContent::get_file($joomla_file_url);
$system[7]['description'] = JText::_('COM_JOOMDLE_JOOMDLE_MOODLE_TO_JOOMLA_CONNECTION');
if (strncmp($result, 'OK', 2) != 0) {
$system[7]['value'] = 0;
$system[7]['error'] = JText::_('COM_JOOMDLE_MOODLE_CANNOT_CONNECT_TO_JOOMLA');
} else {
$system[7]['value'] = 1;
$system[7]['error'] = '';
}
/* Test Moodle Web services in joomdle plugin */
$system[3]['description'] = JText::_('COM_JOOMDLE_JOOMDLE_WEB_SERVICES');
$response = JoomdleHelperContent::call_method_debug('system_check');
if ($response == '') {
$system[3]['value'] = 0;
$system[3]['error'] = JText::_('COM_JOOMDLE_EMPTY_RESPONSE_FROM_MOODLE');
} else {
if (is_array($response) && xmlrpc_is_fault($response)) {
$code = $response['faultCode'];
//."): ".$response['faultString'];
switch ($code) {
case '702':
$system[3]['value'] = 0;
$system[3]['error'] = JText::_('COM_JOOMDLE_JOOMDLE_WEB_SERVICES_ERROR_702');
break;
case '704':
$system[3]['value'] = 0;
$system[3]['error'] = JText::_('COM_JOOMDLE_JOOMDLE_WEB_SERVICES_ERROR_704');
break;
case '7021':
$system[3]['value'] = 0;
$system[3]['error'] = JText::_('COM_JOOMDLE_JOOMDLE_WEB_SERVICES_ERROR 7021');
break;
case '7015':
$system[3]['value'] = 0;
$system[3]['error'] = JText::_('COM_JOOMDLE_JOOMDLE_WEB_SERVICES_ERROR 7015');
break;
case '0':
$system[3]['value'] = 0;
if (strstr($response['faultString'], 'joomdle_auth')) {
$system[3]['error'] = JText::_('COM_JOOMDLE_JOOMDLE_AUTH_NOT_ENABLED');
} else {
if (strstr($response['faultString'], 'mnet_auth')) {
$system[3]['error'] = JText::_('COM_JOOMDLE_MNET_AUTH_NOT_ENABLED');
} else {