自動更新適用

提供:MoodleDocs
移動先:案内検索


作成中です - Mitsuhiro Yoshida (トーク)

更新提供を有効にする (Enabling updates deployment)

プラグイン概要 - 利用可能な更新がハイライトおよびインストールボタンが表示されます

Moodle 2.4以降、管理者は「管理 > サイト管理 > サーバ > 更新通知」ページで更新適用を有効にすることができます。更新を利用できる場合、「この更新をインストールする」ボタンがプラグイン概要およびプラグインチェックページに表示されます。

注意: この機能を動作させるには、利用可能な更新通知を有効にする必要があります。

どのように動作するのか (How it works)

  1. インストール済みプラグインに関して、新しいバージョンのZIPパッケージのURLを含む利用可能な更新情報はdownload.moodle.orgのウェブサービスとして利用することができます。
  2. 「この更新をインストールする」ボタンがクリックされて、次のページの確認が適用された場合、「mdeploy.php」という名称のスタンドアロンユーティリティが実行されます。
  3. あなたが「厳密」に前のステップで表示されたページからアクセスしているのか確認するため、mdeployユーティリティはリクエストを認証します。
  4. 新しいバージョンのZIPパッケージは Moodleプラグインディレクトリから取得されます。
  5. ZIPファイルが正しくダウンロードされたかどうか確認するため、シンプルな整合性チェックが実行されます。
  6. 現在のバージョンのプラグインコードは「moodledata/mdeploy/archive/」フォルダ内にアーカイブされます(例えば、あなたが独自にコードを修正している場合)。
  7. 現在のプラグインを含むフォルダは削除され、ダウンロードしたZIPファイルのコンテンツと置換されます。
  8. あなたのブラウザは通常のアップグレード処理が実施されるページにリダイレクトされます。

現時点では、あなたは (もし、ある場合) 別の利用可能な更新を適用、またはあなたのサイトにZIPコンテンツを手動でアップロードしたかのように、アップグレード処理を実行することができます。

更新提供を無効にする (Disabling updates deployment)

特別な環境 (完全に管理されたサーバ、多くのローカルでの修正、または例えば Gitチェックアウトのように独自更新方法を取り入れて 完全に管理されたサーバ等) では自動更新の適用を許可しないことをお勧めします。この機能は次のコードをconfig.phpファイルに追加することにより、完全に無効にするこができます:

$CFG->disableupdateautodeploy = true;

考えられ得るトラブル(Possible problems)

インストールボタンの喪失 (Missing install button)

自動更新適用機能が有効にされていない場合 (または、config.phpファイルで無効にされている場合)、更新をインストールするためのボタンは表示されません。自動更新適用機能が有効にされている場合、適用が正常に動作するか確認するため、事前チェックするための利用可能な更新一覧が表示されます。事前チェックに失敗した場合、ヘルプポップアップに情報が表示されます。

プラグインファイルに書き込めない (Plugin files not writable)

自動更新の適用中、Moodleは新しいバージョンの入ったディレクトリ (フォルダ) と既存のディレクトリを置換します。ウェブサーバプロセスにはディレクトリおよびそのコンテンツすべてに対して、書込み権を必要とします。あなたのウェブサーバの設定および個人的な設定により、目的に到達するための方法がいくつかあります。プラグインフォルダの正確な場所はプラグインタイプに依存します。プラグインフォルダの完全な場所に関して、プラグイン開発者ドキュメントの「Moodle path」欄をご覧ください。

例: あなたのウェブサーバがユーザ「www-data」としてLinuxサーバ上で動作するApacheであると仮定しましょう。あなたのMoodleは「/var/www/vhosts/moodle/htdocs」にインストールされています。Your Moodle is installed at /var/www/vhosts/moodle/htdocs. You want to give it write access to the folder with your Stamp collection activity module:

   # cd /var/www/vhosts/moodle/htdocs
   # cd mod
   # chown -R www-data stampcoll
   # chmod -R u+w stampcoll

See also more about Installing plugins.

パッケージをダウンロードできない (Can not download the package)

Make sure that http://moodle.org/plugins is up. If the site is down, your Moodle site will not be able to fetch the ZIP packages from it. Wait for http://moodle.org/plugins to be up again and then try to repeat the deployment procedure.

There can also be a problem with the validation of the SSL certificate. See SSL certificate for moodle.org for more info.

エラーおよび例外 (Errors and exceptions)

ファイル:mdeploy-exception.png
Error screen during the plugin deployment

If anything goes wrong during the deployment, please read the error page carefully and copy the error message together with the debugging information for later reference. Also, check the mdeploy.log file. The mdeploy utility logs all the steps into this file located at moodledata/mdeploy/mdeploy.log. The log file usually contains additional details and debugging information describing the cause of the failure.

When you navigate back from the error screen, always remember to go back up to the screen with the list of available plugins (where you clicked the 'Install this update' button originally). Just going back to the previous confirmation screen or even reloading the current page will not work, as the request would not be authorized any more. Doing so leads to the unauthorized_access_exception with the message Unable to read the passphrase file.

The following section describes some errors that you may encounter and how to deal with them.

パッケージをダウンロードできない (Unable to download the package (download_file_exception))

Check the bottom of the mdeploy.log file. It will probably contain a line starting with "cURL error" followed by the error number and the cURL error description.

cURL error 7 couldn't connect to host
Make sure that the site http://download.moodle.org is up and running at the moment. If it is down, your site can't call the web service to fetch the available updates info. Wait for http://download.moodle.org to be up again then re-check.
cURL error 60 (SSL certificate problem)
This suggests problems with the validation of the SSL certificate of the remote (moodle.org) site. See SSL certificate for moodle.org for more info.