Skip to content

Commit

Permalink
Merge branch 'MDL-28990-MOODLE_21_STABLE' of git://github.com/mouneyr…
Browse files Browse the repository at this point in the history
…ac/moodle into MOODLE_21_STABLE
  • Loading branch information
stronk7 committed Aug 23, 2011
2 parents 092c608 + fc218ba commit 5cfb119
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 2 deletions.
3 changes: 3 additions & 0 deletions lang/en/webservice.php
Expand Up @@ -67,6 +67,7 @@
$string['enabled'] = 'Enabled';
$string['enabledocumentation'] = 'Enable developer documentation';
$string['enabledocumentationdescription'] = 'Detailed web services documentation is available for enabled protocols.';
$string['enablemobilewsoverview'] = 'Go to {$a->manageservicelink} administration page, check the "{$a->enablemobileservice}" setting and Save. Everything will be setup for you and all site\'s users will be able to use the offical Moodle app. Current status: {$a->wsmobilestatus}';
$string['enableprotocols'] = 'Enable protocols';
$string['enableprotocolsdescription'] = 'At least one protocol should be enabled. For security reasons, only protocols that are to be used should be enabled.';
$string['enablews'] = 'Enable web services';
Expand Down Expand Up @@ -120,6 +121,8 @@
$string['missingpassword'] = 'Missing password';
$string['missingusername'] = 'Missing username';
$string['missingversionfile'] = 'Coding error: version.php file is missing for the component {$a}';
$string['mobilewsdisabled'] = 'Disabled';
$string['mobilewsenabled'] = 'Enabled';
$string['nofunctions'] = 'This service has no functions.';
$string['norequiredcapability'] = 'No required capability';
$string['notoken'] = 'The token list is empty.';
Expand Down
19 changes: 17 additions & 2 deletions lib/adminlib.php
Expand Up @@ -7059,10 +7059,25 @@ public function output_html($data, $query='') {
global $CFG, $OUTPUT;

$return = "";

/// One system controlling Moodle with Token
$brtag = html_writer::empty_tag('br');

// Enable mobile web service
$enablemobile = new admin_setting_enablemobileservice('enablemobilewebservice',
get_string('enablemobilewebservice', 'admin'),
get_string('configenablemobilewebservice',
'admin', ''), 0); //we don't want to display it but to know the ws mobile status
$manageserviceurl = new moodle_url("/admin/settings.php?section=externalservices");
$wsmobileparam = new stdClass();
$wsmobileparam->enablemobileservice = get_string('enablemobilewebservice', 'admin');
$wsmobileparam->manageservicelink = html_writer::link($manageserviceurl,
get_string('externalservices', 'webservice'));
$mobilestatus = $enablemobile->get_setting()?get_string('mobilewsenabled', 'webservice'):get_string('mobilewsdisabled', 'webservice');
$wsmobileparam->wsmobilestatus = html_writer::tag('strong', $mobilestatus);
$return .= $OUTPUT->heading(get_string('enablemobilewebservice', 'admin'), 3, 'main');
$return .= $brtag . get_string('enablemobilewsoverview', 'webservice', $wsmobileparam)
. $brtag . $brtag;

/// One system controlling Moodle with Token
$return .= $OUTPUT->heading(get_string('onesystemcontrolling', 'webservice'), 3, 'main');
$table = new html_table();
$table->head = array(get_string('step', 'webservice'), get_string('status'),
Expand Down

0 comments on commit 5cfb119

Please sign in to comment.