Skip to content

Commit

Permalink
webservice MDL-23345 fix moodledocs link in the ws doc
Browse files Browse the repository at this point in the history
  • Loading branch information
mouneyrac committed Jul 20, 2010
1 parent ac1870e commit 390cc88
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 deletions.
3 changes: 2 additions & 1 deletion lang/en/webservice.php
Original file line number Diff line number Diff line change
Expand Up @@ -174,9 +174,10 @@
$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';
10 changes: 8 additions & 2 deletions webservice/renderer.php
Original file line number Diff line number Diff line change
Expand Up @@ -446,10 +446,16 @@ public function documentation_html($functions, $printableformat, $activatedproto
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;


Expand Down

0 comments on commit 390cc88

Please sign in to comment.