webservice MDL-23345 fix moodledocs link in the ws doc

This commit is contained in:
jerome mouneyrac 2010-07-20 03:22:55 +00:00
parent ac1870e330
commit 390cc887da
2 changed files with 10 additions and 3 deletions

View File

@ -174,9 +174,10 @@ $string['webservicetokens'] = 'Web service tokens';
$string['wrongusernamepassword'] = 'Wrong username or password';
$string['wsauthmissing'] = 'The web service authentication plugin is missing.';
$string['wsauthnotenabled'] = 'The web service authentication plugin is disabled.';
$string['wsclientdoc'] = 'Moodle web service client documentation';
$string['wsdocumentation'] = 'Web service documentation';
$string['wsdocumentationdisable'] = 'Web service documentation is disabled.';
$string['wsdocumentationintro'] = 'Following is a listing of web service functions available for the username <b>{$a}</b>.<br/>To create a client we advise you to read the <a href="http://docs.moodle.org/en/Development:Creating_a_web_service_and_a_web_service_function#Create_your_own_client">Moodle documentation</a>';
$string['wsdocumentationintro'] = 'Following is a listing of web service functions available for the username <b>{$a->username}</b>.<br/>To create a client we advise you to read the {$a->doclink}';
$string['wsdocumentationlogin'] = 'or enter your web service username and password:';
$string['wspassword'] = 'Web service password';
$string['wsusername'] = 'Web service username';

View File

@ -446,10 +446,16 @@ EOF;
EOF;
/// Some general information
$documentationhtml = html_writer::start_tag('table', array('style' => "margin-left:auto; margin-right:auto;"));
$docinfo = new stdClass();
$docinfo->username = $authparams['wsusername'];
$docurl = new moodle_url('http://docs.moodle.org/en/Development:Creating_a_web_service_client');
$docinfo->doclink = html_writer::tag('a',
get_string('wsclientdoc', 'webservice'), array('href' => $docurl));
$documentationhtml = html_writer::start_tag('table',
array('style' => "margin-left:auto; margin-right:auto;"));
$documentationhtml .= html_writer::start_tag('tr', array());
$documentationhtml .= html_writer::start_tag('td', array());
$documentationhtml .= get_string('wsdocumentationintro', 'webservice', $authparams['wsusername']);
$documentationhtml .= get_string('wsdocumentationintro', 'webservice', $docinfo);
$documentationhtml .= $br . $br;