Hack for Moodle - LTI[edit]

iframe を使用すると,chrome, edgeでは 405 : Method Not Allowed が返される件[edit]

JupyterHub の log[edit]
ソースコード トレース (数字はトレース順)[edit]
Moodle ホスト上で,JupyterHub へ接続するための feserver を動かしてみる.[edit]
解決方法[edit]
c.JupyterHub.tornado_settings = {
    "headers":{ "Content-Security-Policy": "frame-ancestors 'self' https://www.nsl.tuis.ac.jp" },
    "cookie_options": {"SameSite": "None", "Secure": True }
}
c.Spawner.args = ['--NotebookApp.tornado_settings={
        "headers":{"Content-Security-Policy": "frame-ancestors \'self\' https://www.nsl.tuis.ac.jp" }, 
        "cookie_options": { "SameSite": "None", "Secure": True } 
    }'
]
参考:DB[edit]
MariaDB [moodle_db]> show columns from mdl_lti;
+-------------------------------+--------------+------+-----+---------+----------------+
| Field                         | Type         | Null | Key | Default | Extra          |
+-------------------------------+--------------+------+-----+---------+----------------+
| id                            | bigint(10)   | NO   | PRI | NULL    | auto_increment |
| course                        | bigint(10)   | NO   | MUL | 0       |                |
| name                          | varchar(255) | NO   |     |         |                |
| intro                         | longtext     | YES  |     | NULL    |                |
| introformat                   | smallint(4)  | YES  |     | 0       |                |
| timecreated                   | bigint(10)   | NO   |     | 0       |                |
| timemodified                  | bigint(10)   | NO   |     | 0       |                |
| typeid                        | bigint(10)   | YES  |     | NULL    |                |
| toolurl                       | longtext     | NO   |     | NULL    |                |
| securetoolurl                 | longtext     | YES  |     | NULL    |                |
| instructorchoicesendname      | tinyint(1)   | YES  |     | NULL    |                |
| instructorchoicesendemailaddr | tinyint(1)   | YES  |     | NULL    |                |
| instructorchoiceallowroster   | tinyint(1)   | YES  |     | NULL    |                |
| instructorchoiceallowsetting  | tinyint(1)   | YES  |     | NULL    |                |
| instructorcustomparameters    | longtext     | YES  |     | NULL    |                |
| instructorchoiceacceptgrades  | tinyint(1)   | YES  |     | NULL    |                |
| grade                         | bigint(10)   | NO   |     | 100     |                |
| launchcontainer               | tinyint(2)   | NO   |     | 1       |                |
| resourcekey                   | varchar(255) | YES  |     | NULL    |                |
| password                      | varchar(255) | YES  |     | NULL    |                |
| debuglaunch                   | tinyint(1)   | NO   |     | 0       |                |
| showtitlelaunch               | tinyint(1)   | NO   |     | 0       |                |
| showdescriptionlaunch         | tinyint(1)   | NO   |     | 0       |                |
| servicesalt                   | varchar(40)  | YES  |     | NULL    |                |
| icon                          | longtext     | YES  |     | NULL    |                |
| secureicon                    | longtext     | YES  |     | NULL    |                |
+-------------------------------+--------------+------+-----+---------+----------------+
           <option value="1" selected="">デフォルト</option>
           <option value="2">埋め込み</option>
           <option value="3">埋め込み (ブロックなし)</option>
           <option value="5">既存のウィンドウ</option>
           <option value="4">新しいウィンドウ</option>

JupyterHub の Swapner での LTI 情報の受け取り処理[edit]

JupyterHub へのパラメータ送信[edit]

JupyterHubMoodle から受け取ったデータ[edit]

Moodle DB[edit]

LTIの typeid (External Tool 情報) を格納するテーブル[edit]

MariaDB [moodle_db]> select id, name,baseurl,tooldomain,state,course,clientid  from   mdl_lti_types ;
+----+------------------+----------------------------------------------------+-----------------------------+-------+--------+-----------------+
| id | name             | baseurl                                            | tooldomain                  | state | course | clientid        |
+----+------------------+----------------------------------------------------+-----------------------------+-------+--------+-----------------+
|  3 | antares:443      | https://antares.nsl.tuis.ac.jp/hub/lti/launch      | antares.nsl.tuis.ac.jp      |     1 |      1 | Oh9MyHxutcfbvhA |
|  4 | GITLAB:FE 8100  | https://gitlab.nsl.tuis.ac.jp:8100/hub/lti/launch  | gitlab.nsl.tuis.ac.jp:8100  |     1 |      1 | NULL            |
| 10 | procyon:443      | https://jupyterhub.nsl.tuis.ac.jp/hub/lti/launch   | jupyterhub.nsl.tuis.ac.jp   |     1 |      1 | NULL            |
| 12 | JupyterHub00:443 | https://jupyterhub00.nsl.tuis.ac.jp/hub/lti/launch | jupyterhub00.nsl.tuis.ac.jp |     1 |      1 | NULL            |
| 13 | JupyterHub01:443 | https://jupyterhub01.nsl.tuis.ac.jp/hub/lti/launch | jupyterhub01.nsl.tuis.ac.jp |     1 |      1 | NULL            |
| 14 | JupyterHub02:443 | https://jupyterhub02.nsl.tuis.ac.jp/hub/lti/launch | jupyterhub02.nsl.tuis.ac.jp |     1 |      1 | NULL            |
| 15 | JupyterHub03:443 | https://jupyterhub03.nsl.tuis.ac.jp/hub/lti/launch | jupyterhub03.nsl.tuis.ac.jp |     1 |      1 | NULL            |
| 19 | antares:8000     | https://antares.nsl.tuis.ac.jp:8000/hub/lti/launch | antares.nsl.tuis.ac.jp:8000 |     1 |      1 | NULL            |
| 20 | aldebaran:443    | https://aldebaran.nsl.tuis.ac.jp/hub/lti/launch    | aldebaran.nsl.tuis.ac.jp    |     1 |      1 | NULL            |
+----+------------------+----------------------------------------------------+-----------------------------+-------+--------+-----------------+

トップ   編集 凍結 差分 履歴 添付 複製 名前変更 リロード   新規 ページ一覧 検索 最終更新   ヘルプ   最終更新のRSS
Last-modified: 2023-08-29 (火) 12:21:30