「コースをアップロードする」の版間の差分

提供:MoodleDocs
移動先:案内検索
編集の要約なし
3行目: 3行目:
作成中です - [[利用者:Mitsuhiro Yoshida|Mitsuhiro Yoshida]] ([[利用者・トーク:Mitsuhiro Yoshida|トーク]])
作成中です - [[利用者:Mitsuhiro Yoshida|Mitsuhiro Yoshida]] ([[利用者・トーク:Mitsuhiro Yoshida|トーク]])


==コースをアップロードする Upload courses==
==コースをアップロードする==
新しいコースの作成に加えてコースアップロード機能はコースの更新および削除、別のコースからのコンテンツのインポートに使用することができます。この機能を使用したコーステンプレートの作成に関する情報は[[新しいコースの追加]]をご覧ください。
新しいコースの作成に加えてコースアップロード機能はコースの更新および削除、別のコースからのコンテンツのインポートに使用することができます。この機能を使用したコーステンプレートの作成に関する情報は[[新しいコースの追加]]をご覧ください。
1つ以上のコースをアップロードするには:
1つ以上のコースをアップロードするには:
89行目: 89行目:
: 「1」は活動完了を有効にします。「0」は活動完了を有効にしません。
: 「1」は活動完了を有効にします。「0」は活動完了を有効にしません。


====登録フィールド Enrolment fields====
====登録フィールド====


いくつかのフィールドは登録方法を有効化および設定するために作成されています。登録フィールドは登録方法名に「enrolment_[number]」、プロパティに「enrolment_[number]_property」のような名称をつける必要があります。
いくつかのフィールドは登録方法を有効化および設定するために作成されています。登録フィールドは登録方法名に「enrolment_[number]」、プロパティに「enrolment_[number]_property」のような名称をつける必要があります。
123行目: 123行目:
  enrolment_2_startdate: 2013-01-30
  enrolment_2_startdate: 2013-01-30


====ロールのリネーム Role renaming ====
====ロールのリネーム====


ロールをリネームするには以下の例を参考にしてください:
ロールをリネームするには以下の例を参考にしてください:
143行目: 143行目:


;delete
;delete
: 1 to delete the course
: 「1」でコースを削除します。
: 「1」でコースを削除します。
;rename
;rename
: The shortname to rename the course to
: The shortname to rename the course to
: リネーム後のコース省略名です。
;backupfile
;backupfile
: An absolute path to a backup file (.mbz) to import in the course.
: An absolute path to a backup file (.mbz) to import in the course.

2017年9月23日 (土) 15:02時点における版


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

コースをアップロードする

新しいコースの作成に加えてコースアップロード機能はコースの更新および削除、別のコースからのコンテンツのインポートに使用することができます。この機能を使用したコーステンプレートの作成に関する情報は新しいコースの追加をご覧ください。 1つ以上のコースをアップロードするには:

  1. 「管理 > サイト管理 > コース > コースをアップロードする」にアクセスしてください。
  2. CSVファイルをドラッグ&ドロップするか、「ファイルを選択する」ボタンをクリックしてファイルピッカ内のファイルを選択してください。
  3. 適切なインポートオプションを慎重に選択した後、プレビューボタンをクリックしてください。
ファイル:26uploadcourses.png
コースアップロード管理画面
コースアップロード正常完了

メモ: コマンドラインツール「admin/tool/uploadcourse/cli/uploadcourse.php」を使用することもできます。

ウェブインターフェースを使用する場合、プレビューした行にエラーが検出されているかどうか確認するため「プレビュー」オプションを使用してください。コースのアップロード時にエラーが発生した場合、無視されます。

ファイル例

uploadcourse.csv:

メモ: 「shortname」「fullname」「category」は必須です。

カテゴリ (category ) フィールドにはカテゴリIDが入ります。デフォルトカテゴリの「Miscellaneous」にはID「1」が割り当てられます。カテゴリはすでに存在している必要があります。あなたが存在しないカテゴリIDを使用した場合、アップロードのプレビューに「IDでカテゴリを解決できませんでした」エラーが表示されてそのカテゴリ内のコースは作成されません。

shortname,fullname,category,summary,enrolment_1,enrolment_1_role,enrolment_1_enrolperiod,role_student courserestored,Course restored,1,a summary,manual,student,1 month, courserestored2,Course restored 2,1,a summary,,,, courserestored3,Course restored 3,1,a summary,,,,padawan courserestored4,Course restored 4,1,"a summary, with comma",manual,student,1 month,padawan アイテム間に空白を入れないよう注意してください。

テキストファイルを作成する

コースをアップロードするテキストファイルはCSVファイルにしてください。CSVファイルには「コース情報」および「コースアクション」の2つのカテゴリに分けられた以下のカラムを記述することができます。

コース情報フィールド

以下ほとんどの設定はコースの設定ページで利用することができます。詳細はコース設定をご覧ください。フィールド名は小文字にしてください。

shortname
コース省略名
fullname
長いコース名
idnumber
IDナンバー
category
コースが入れられるカテゴリのIDです。これは「category_idnumber」および「category_path」に優先します。
category_idnumber
コースが入れられるカテゴリのIDナンバーです。これは「category_path」に優先します。
category_path
コースが入れられるカテゴリのパスです。あなたがカテゴリ「Movies」内のカテゴリ「Science-Fiction」にコースを入れたい場合、次のような記述になります: Movies / Science-Fiction

分離記号は[space]/[space]のように記述してください。また、カテゴリは作成されないため存在している必要があります。あなたがトップレベルのカテゴリ「Movies 」にコースを置きたい場合、記述する内容は次のようになります: Movies

visible
コースを表示する場合 = 1、コースを非表示にする場合 = 2
startdate
コースの開始日時です。この値はタイムスタンプを生成するためにPHP関数strtotimeに渡されることに留意してください。例 01.12.2014 (2014年12月1日)
enddate
コースの終了日時です。この値はstartdateと同じくタイムスタンプを生成するためにPHP関数strtotimeに渡されることに留意してください。例 01.12.2014 (2014年12月1日)
summary
コース概要です。
format
使用するコースフォーマットです。これは有効なコースフォーマットプラグイン名である必要があります。例) 「週」「トピック」
theme
使用するテーマです。
lang
使用する言語です。
newsitems
ニュースアイテム数です。
showgrades
「1」は学生に評定表を表示します。「0」は学生から評定表を隠します。
showreports
「1」は活動レポートを表示します。「0」は活動レポートを隠します。
legacyfiles
「1」はレガシーコースファイルを有効にします。「0」はレガシーコースファイルを無効にします。
maxbytes
コースの最大アップロードサイズ (バイト) です。無制限にする場合、「0」を使用してください。
groupmode
「0」は「グループなし」、「1」は「分離グループ」、「2」は「可視グループ」です。
groupmodeforce
「1」はグループモードを強制します。グループモードを強制しない場合、「0」を入力してください。
enablecompletion
「1」は活動完了を有効にします。「0」は活動完了を有効にしません。

登録フィールド

いくつかのフィールドは登録方法を有効化および設定するために作成されています。登録フィールドは登録方法名に「enrolment_[number]」、プロパティに「enrolment_[number]_property」のような名称をつける必要があります。

enrolment_[number]
登録方法名です (例 「manual」「guest」「self」)。
enrolment_[number]_delete
「1」を設定した場合、この登録方法をコースから削除します。「1」を設定した場合、他のすべての属性は無視されます。
enrolment_[number]_disable
「1」を設定した場合、この登録方法をコースで無効にします。「1」を設定した場合、他のすべての属性は無視されます。
enrolment_[number]_startdate
登録開始日です。この値はPHP関数strtotime()から渡されます。
enrolment_[number]_enddate
登録終了日です。この値はPHP関数strtotime()から渡されます。
enrolment_[number]_enrolperiod
秒数です。「4 days」 のように値がstrtotime()によって理解されない場合に使用されます。
enrolment_[number]_role
ロール省略名です。
enrolment_[number]_[property]
指定された登録方法によってプロパティを判定します。
enrolment_[number]_password
コース登録キーです。

注意: コースのアップロードはまだすべての登録方法とは互換性がありません (MDL-43127)。

enrolment_1: manual
enrolment_1_role: student
enrolment_1_enrolperiod: 1 month

enrolment_2: self
enrolment_2_startdate: 2013-01-30

ロールのリネーム

ロールをリネームするには以下の例を参考にしてください:

role_[shortname]
新しいロール名 [shortname] です。

例'

role_student: Apprentice
role_teacher: Master
role_mycustomrole: Jedi

教師のロール省略名は「editingteacher」、編集権限のない教師のロール省略名は「teacher」であることに留意してください。

コースアクションフィールド Course action fields

これらの設定は「コース処理」パラメータに優先します。

delete
「1」でコースを削除します。
rename
The shortname to rename the course to
リネーム後のコース省略名です。
backupfile
An absolute path to a backup file (.mbz) to import in the course.

(This means the full path to your course, for example /home/yourmoodle/public_html/moodle27/transfert/backup.mbz . If you are unsure of this, look at include_path in Site administration>Server>PHP info.)

templatecourse
The short name of a course to import the content from
reset
1 to reset the course

必須フィールド Mandatory fields

shortname
This field is mandatory for every operation, with the only exception of creating new courses. See details on the course process parameter Shortname template for more information.
fullname
Required when creating a new course.
category, category_idnumber, category_path
One of these is required when creating a course.

インポートオプション Import options

To prevent unexpected behaviour, you have to specify what you want the tool to be able to do.

Upload mode
This allows you to specify if courses can be created and/or updated.
Update mode
If you allow courses to be updated, you also have to tell the tool what to update the courses with.
Allow deletes
Whether the delete field is accepted or not
Allow renames
Whether the rename field is accepted or not
Allow resets
Whether the reset field is accepted or not

コース処理 Course process

This allows you to specify actions to be taken for every course uploaded.

Shortname template
If you are creating courses without a shortname, you can use this field to automatically generate a shortname. This field accepts two placeholders: %i for the ID number, %f for the summary.
Restore file
A backup file (.mbz) to import in the course after create/update.
Restore from course
The shortname of a course to import content from after create/update.
Reset after upload
Whether to reset the course after creating/updating it.

デフォルトコース値 Default course values

Those are values that can be set in the web interface for all the fields that are not specified in the CSV file. Note that they are always used when creating a course, but only when specified during update (see Update mode).

アップロードをスピードアップする Increasing speed

When importing the content of a backup file, or another course, you are advised to enable the setting keeptempdirectoriesonbackup. This will considerably speed up the process of the upload if you are importing multiple times from the same source.

関連情報