8: 2021-09-04 (土) 01:48:00 iseki |
9: 2021-09-05 (日) 00:13:33 iseki |
| ** Hack for [[Moodle]] - [[LTI]] [#w4c22429] | | ** Hack for [[Moodle]] - [[LTI]] [#w4c22429] |
| + | - [[Moodle+JupyterHub]] |
| + | - [[Moodle]], [[JupyterHub]] |
| + | - [[LTI]] |
| + | #br |
| | | |
| *** iframe を使用すると,chrome, edgeでは 405 : Method Not Allowed が返される件 [#id5b6e70] | | *** iframe を使用すると,chrome, edgeでは 405 : Method Not Allowed が返される件 [#id5b6e70] |
| - ''問題点: Moodleと JupyterHubを別のホストで動かすと,iframe を使用した場合,chrome, edge から cookieが送信されない.''(その内 FireFoxもだよね) | | - ''問題点: Moodleと JupyterHubを別のホストで動かすと,iframe を使用した場合,chrome, edge から cookieが送信されない.''(その内 FireFoxもだよね) |
| #br | | #br |
| + | **** 解決方法 [#f974d825] |
| + | |
| + | 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 [#vf633496] |
| + | 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 情報の受け取り処理 [#vd91a1e1] | | *** [[JupyterHub]] の Swapner での LTI 情報の受け取り処理 [#vd91a1e1] |