Skip to content

Commit

Permalink
Merge branch 'MDL-33469' of git://github.com/danpoltawski/moodle
Browse files Browse the repository at this point in the history
  • Loading branch information
stronk7 committed Jun 19, 2012
2 parents f98973c + 8b50393 commit 25c94ed
Show file tree
Hide file tree
Showing 12 changed files with 32 additions and 24 deletions.
6 changes: 4 additions & 2 deletions portfolio/googledocs/db/upgrade.php
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,8 @@ function portfolio_googledocs_admin_upgrade_notification() {
return;
}
$mainadmin = reset($admins);
$a = new stdClass;
$a->docsurl = get_docs_url('Google_OAuth_2.0_setup');

foreach ($admins as $admin) {
$message = new stdClass();
Expand All @@ -58,8 +60,8 @@ function portfolio_googledocs_admin_upgrade_notification() {
$message->userto = $admin;
$message->smallmessage = get_string('oauth2upgrade_message_small', 'portfolio_googledocs');
$message->subject = get_string('oauth2upgrade_message_subject', 'portfolio_googledocs');
$message->fullmessage = get_string('oauth2upgrade_message_content', 'portfolio_googledocs');
$message->fullmessagehtml = get_string('oauth2upgrade_message_content', 'portfolio_googledocs');
$message->fullmessage = get_string('oauth2upgrade_message_content', 'portfolio_googledocs', $a);
$message->fullmessagehtml = get_string('oauth2upgrade_message_content', 'portfolio_googledocs', $a);
$message->fullmessageformat = FORMAT_PLAIN;
$message->notification = 1;
message_send($message);
Expand Down
6 changes: 3 additions & 3 deletions portfolio/googledocs/lang/en/portfolio_googledocs.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,10 @@
$string['nooauthcredentials'] = 'OAuth credentials required.';
$string['nooauthcredentials_help'] = 'To use the Google Docs portfolio plugin you must configure OAuth credentials in the portfolio settings.';
$string['nosessiontoken'] = 'A session token does not exist preventing export to google.';
$string['oauthinfo'] = '<p>To use the google docs portfolio you must be registered with Google. Instructions for registing your installation with Google are described in <a href="{$a->docsurl}">Moodle Docs</a>. The redirect url should be set to:</p><p>{$a->callbackurl}</p>';
$string['oauthinfo'] = '<p>To use this plugin, you must register your site with Google, as described in the documentation <a href="{$a->docsurl}">Google OAuth 2.0 setup</a>.</p><p>As part of the registration process, you will need to enter the following URL as \'Authorized Redirect URIs\':</p><p>{$a->callbackurl}</p>Once registered, you will be provided with a client ID and secret which can be used to configure all Google Docs and Picasa plugins.</p>';
$string['oauth2upgrade_message_subject'] = 'Important information regarding Google Docs portfolio plugin';
$string['oauth2upgrade_message_content'] = 'As part of the upgrade to Moodle 2.3, the Google Docs portfolio plugin has been disabled due to changes in Googles API. To re-enable your plugin, you must configure oauth credentials in this plugin.';
$string['oauth2upgrade_message_small'] = 'The Google Docs portfolio plugin has been disabled until configured with OAuth2';
$string['oauth2upgrade_message_content'] = 'As part of the upgrade to Moodle 2.3, the Google Docs portfolio plugin has been disabled. To re-enable it, your Moodle site needs to be registered with Google, as described in the documentation {$a->docsurl}, in order to obtain a client ID and secret. The client ID and secret can then be used to configure all Google Docs and Picasa plugins.';
$string['oauth2upgrade_message_small'] = 'This plugin has been disabled, as it requires configuration as described in the documentation Google OAuth 2.0 setup.';
$string['pluginname'] = 'Google Docs';
$string['sendfailed'] = 'The file {$a} failed to transfer to google';
$string['secret'] = 'Secret';
2 changes: 1 addition & 1 deletion portfolio/googledocs/lib.php
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ public static function get_allowed_config() {

public static function admin_config_form(&$mform) {
$a = new stdClass;
$a->docsurl = get_docs_url('Google_OAuth2_Setup');
$a->docsurl = get_docs_url('Google_OAuth_2.0_setup');
$a->callbackurl = google_oauth::callback_url()->out(false);

$mform->addElement('static', null, '', get_string('oauthinfo', 'portfolio_googledocs', $a));
Expand Down
6 changes: 4 additions & 2 deletions portfolio/picasa/db/upgrade.php
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,8 @@ function portfolio_picasa_admin_upgrade_notification() {
return;
}
$mainadmin = reset($admins);
$a = new stdClass;
$a->docsurl = get_docs_url('Google_OAuth_2.0_setup');

foreach ($admins as $admin) {
$message = new stdClass();
Expand All @@ -58,8 +60,8 @@ function portfolio_picasa_admin_upgrade_notification() {
$message->userto = $admin;
$message->smallmessage = get_string('oauth2upgrade_message_small', 'portfolio_picasa');
$message->subject = get_string('oauth2upgrade_message_subject', 'portfolio_picasa');
$message->fullmessage = get_string('oauth2upgrade_message_content', 'portfolio_picasa');
$message->fullmessagehtml = get_string('oauth2upgrade_message_content', 'portfolio_picasa');
$message->fullmessage = get_string('oauth2upgrade_message_content', 'portfolio_picasa', $a);
$message->fullmessagehtml = get_string('oauth2upgrade_message_content', 'portfolio_picasa', $a);
$message->fullmessageformat = FORMAT_PLAIN;
$message->notification = 1;
message_send($message);
Expand Down
6 changes: 3 additions & 3 deletions portfolio/picasa/lang/en/portfolio_picasa.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,10 @@
$string['noauthtoken'] = 'An authentication token has not been recieved from google. Please ensure you are allowing moodle to access your google account';
$string['nooauthcredentials'] = 'OAuth credentials required.';
$string['nooauthcredentials_help'] = 'To use the Picasa portfolio plugin you must configure OAuth credentials in the portfolio settings.';
$string['oauthinfo'] = '<p>To use the Picasa portfolio you must be registered with Google. Instructions for registing your installation with Google are described in <a href="{$a->docsurl}">Moodle Docs</a>. The redirect url should be set to:</p><p>{$a->callbackurl}</p>';
$string['oauthinfo'] = '<p>To use this plugin, you must register your site with Google, as described in the documentation <a href="{$a->docsurl}">Google OAuth 2.0 setup</a>.</p><p>As part of the registration process, you will need to enter the following URL as \'Authorized Redirect URIs\':</p><p>{$a->callbackurl}</p>Once registered, you will be provided with a client ID and secret which can be used to configure all Google Docs and Picasa plugins.</p>';
$string['oauth2upgrade_message_subject'] = 'Important information regarding Picasa portfolio plugin';
$string['oauth2upgrade_message_content'] = 'As part of the upgrade to Moodle 2.3, the Picasa portfolio plugin has been disabled due to changes in Googles API. To re-enable your plugin, you must configure oauth credentials in this plugin.';
$string['oauth2upgrade_message_small'] = 'The Picasa portfolio plugin has been disabled until configured with OAuth2';
$string['oauth2upgrade_message_content'] = 'As part of the upgrade to Moodle 2.3, the Picasa portfolio plugin has been disabled. To re-enable it, your Moodle site needs to be registered with Google, as described in the documentation {$a->docsurl}, in order to obtain a client ID and secret. The client ID and secret can then be used to configure all Google Docs and Picasa plugins.';
$string['oauth2upgrade_message_small'] = 'This plugin has been disabled, as it requires configuration as described in the documentation Google OAuth 2.0 setup.';
$string['pluginname'] = 'Picasa';
$string['sendfailed'] = 'The file {$a} failed to transfer to picasa';
$string['secret'] = 'Secret';
2 changes: 1 addition & 1 deletion portfolio/picasa/lib.php
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ public static function get_allowed_config() {

public static function admin_config_form(&$mform) {
$a = new stdClass;
$a->docsurl = get_docs_url('Google_OAuth2_Setup');
$a->docsurl = get_docs_url('Google_OAuth_2.0_setup');
$a->callbackurl = google_oauth::callback_url()->out(false);

$mform->addElement('static', null, '', get_string('oauthinfo', 'portfolio_picasa', $a));
Expand Down
6 changes: 4 additions & 2 deletions repository/googledocs/db/upgrade.php
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,8 @@ function repository_googledocs_admin_upgrade_notification() {
}
$mainadmin = reset($admins);

$a = new stdClass;
$a->docsurl = get_docs_url('Google_OAuth_2.0_setup');
foreach ($admins as $admin) {
$message = new stdClass();
$message->component = 'moodle';
Expand All @@ -61,8 +63,8 @@ function repository_googledocs_admin_upgrade_notification() {
$message->userto = $admin;
$message->smallmessage = get_string('oauth2upgrade_message_small', 'repository_googledocs');
$message->subject = get_string('oauth2upgrade_message_subject', 'repository_googledocs');
$message->fullmessage = get_string('oauth2upgrade_message_content', 'repository_googledocs');
$message->fullmessagehtml = get_string('oauth2upgrade_message_content', 'repository_googledocs');
$message->fullmessage = get_string('oauth2upgrade_message_content', 'repository_googledocs', $a);
$message->fullmessagehtml = get_string('oauth2upgrade_message_content', 'repository_googledocs', $a);
$message->fullmessageformat = FORMAT_PLAIN;
$message->notification = 1;
message_send($message);
Expand Down
6 changes: 3 additions & 3 deletions repository/googledocs/lang/en/repository_googledocs.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,10 @@
$string['clientid'] = 'Client ID';
$string['configplugin'] = 'Configure Google Docs plugin';
$string['googledocs:view'] = 'View google docs repository';
$string['oauthinfo'] = '<p>To use the Google Docs repository you must be registered with Google. Instructions for registing your installation with Google are described in <a href="{$a->docsurl}">Moodle Docs</a>. The redirect url should be set to:</p><p>{$a->callbackurl}</p>';
$string['oauthinfo'] = '<p>To use this plugin, you must register your site with Google, as described in the documentation <a href="{$a->docsurl}">Google OAuth 2.0 setup</a>.</p><p>As part of the registration process, you will need to enter the following URL as \'Authorized Redirect URIs\':</p><p>{$a->callbackurl}</p>Once registered, you will be provided with a client ID and secret which can be used to configure all Google Docs and Picasa plugins.</p>';
$string['oauth2upgrade_message_subject'] = 'Important information regarding Google Docs repository plugin';
$string['oauth2upgrade_message_content'] = 'As part of the upgrade to Moodle 2.3, the Google Docs repository plugin has been disabled due to changes in Googles API. To re-enable your plugin, you must add and reconfigure configure oauth credentials of this plugin.';
$string['oauth2upgrade_message_small'] = 'The Google Docs repository plugin has been disabled until configured with OAuth2';
$string['oauth2upgrade_message_content'] = 'As part of the upgrade to Moodle 2.3, the Google Docs portfolio plugin has been disabled. To re-enable it, your Moodle site needs to be registered with Google, as described in the documentation {$a->docsurl}, in order to obtain a client ID and secret. The client ID and secret can then be used to configure all Google Docs and Picasa plugins.';
$string['oauth2upgrade_message_small'] = 'This plugin has been disabled, as it requires configuration as described in the documentation Google OAuth 2.0 setup.';
$string['pluginname'] = 'Google Docs';
$string['secret'] = 'Secret';

2 changes: 1 addition & 1 deletion repository/googledocs/lib.php
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ public static function get_type_option_names() {
public static function type_config_form($mform, $classname = 'repository') {

$a = new stdClass;
$a->docsurl = get_docs_url('Google_OAuth2_Setup');
$a->docsurl = get_docs_url('Google_OAuth_2.0_setup');
$a->callbackurl = google_oauth::callback_url()->out(false);

$mform->addElement('static', null, '', get_string('oauthinfo', 'repository_googledocs', $a));
Expand Down
6 changes: 4 additions & 2 deletions repository/picasa/db/upgrade.php
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,8 @@ function repository_picasa_admin_upgrade_notification() {
return;
}
$mainadmin = reset($admins);
$a = new stdClass;
$a->docsurl = get_docs_url('Google_OAuth_2.0_setup');

foreach ($admins as $admin) {
$message = new stdClass();
Expand All @@ -61,8 +63,8 @@ function repository_picasa_admin_upgrade_notification() {
$message->userto = $admin;
$message->smallmessage = get_string('oauth2upgrade_message_small', 'repository_picasa');
$message->subject = get_string('oauth2upgrade_message_subject', 'repository_picasa');
$message->fullmessage = get_string('oauth2upgrade_message_content', 'repository_picasa');
$message->fullmessagehtml = get_string('oauth2upgrade_message_content', 'repository_picasa');
$message->fullmessage = get_string('oauth2upgrade_message_content', 'repository_picasa', $a);
$message->fullmessagehtml = get_string('oauth2upgrade_message_content', 'repository_picasa', $a);
$message->fullmessageformat = FORMAT_PLAIN;
$message->notification = 1;
message_send($message);
Expand Down
6 changes: 3 additions & 3 deletions repository/picasa/lang/en/repository_picasa.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,10 @@

$string['clientid'] = 'Client ID';
$string['configplugin'] = 'Picasa repository configuration';
$string['oauthinfo'] = '<p>To use the Picasa repository you must be registered with Google. Instructions for registing your installation with Google are described in <a href="{$a->docsurl}">Moodle Docs</a>. The redirect url should be set to:</p><p>{$a->callbackurl}</p>';
$string['oauthinfo'] = '<p>To use this plugin, you must register your site with Google, as described in the documentation <a href="{$a->docsurl}">Google OAuth 2.0 setup</a>.</p><p>As part of the registration process, you will need to enter the following URL as \'Authorized Redirect URIs\':</p><p>{$a->callbackurl}</p>Once registered, you will be provided with a client ID and secret which can be used to configure all Google Docs and Picasa plugins.</p>';
$string['oauth2upgrade_message_subject'] = 'Important information regarding Picasa repository plugin';
$string['oauth2upgrade_message_content'] = 'As part of the upgrade to Moodle 2.3, the Picasa repository plugin has been disabled due to changes in Googles API. To re-enable your plugin, you must add and reconfigure configure oauth credentials of this plugin.';
$string['oauth2upgrade_message_small'] = 'The Picasa repository plugin has been disabled until configured with OAuth2';
$string['oauth2upgrade_message_content'] = 'As part of the upgrade to Moodle 2.3, the Google Docs portfolio plugin has been disabled. To re-enable it, your Moodle site needs to be registered with Google, as described in the documentation {$a->docsurl}, in order to obtain a client ID and secret. The client ID and secret can then be used to configure all Google Docs and Picasa plugins.';
$string['oauth2upgrade_message_small'] = 'This plugin has been disabled, as it requires configuration as described in the documentation Google OAuth 2.0 setup.';
$string['picasa:view'] = 'View picasa repository';
$string['pluginname'] = 'Picasa web album';
$string['secret'] = 'Secret';
2 changes: 1 addition & 1 deletion repository/picasa/lib.php
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ public static function get_type_option_names() {

public static function type_config_form($mform, $classname = 'repository') {
$a = new stdClass;
$a->docsurl = get_docs_url('Google_OAuth2_Setup');
$a->docsurl = get_docs_url('Google_OAuth_2.0_setup');
$a->callbackurl = google_oauth::callback_url()->out(false);

$mform->addElement('static', null, '', get_string('oauthinfo', 'repository_picasa', $a));
Expand Down

0 comments on commit 25c94ed

Please sign in to comment.