flagflag  If you want to see English page, please click "English" Button at Left.
1: 2021-09-04 (土) 00:12:16 iseki ソース 2: 2021-09-04 (土) 02:04:43 iseki ソース
Line 1: Line 1:
-* LTI () [#y2ccd68a]+* LTI (Learning Tools Interoperability) [#y2ccd68a] 
 +- IMS グローバル ラーニング コンソーシアムが開発している ELシステム間の接続規格 
 +#br 
 + 
 +** jupyterhub-ltia​uthenticator (Moodle - JupyterHub) [#o7520050] 
 +- https://pypi.org/project/jupyterhub-ltia​uthenticator/ 
 + 
 +- 各種LMS - [[JupyterHub]] 接続 
 +- LMS([[Moodle]]) が TC(Tool Consumer),JupyterHub が TP(Tool Provider) としてうごく. 
 +- see also. [[Moodle+JupyterHub]] 
 +#br 
 + 
 +*** v1.2.0 [#f62333d7] 
 +- Moodle については Patch 不要 
 + 
 + (jupyterhub)# pip install jupyterhub-ltiauthenticator==1.2.0 
 +#br 
 + 
 +**** jupyterhub_config.py [#yc7afb52] 
 + # for LTI v1.2.0 
 + c.JupyterHub.authenticator_class = 'ltiauthenticator.LTIAuthenticator' 
 + c.LTI11Authenticator.consumers = { 
 +   "b18e82ec683724743236fade71350720029a2914​4a585c66f6741d8e9c6e0d83" : "c0fe2924dbb0f4701d898d36aaf9fd89c7a3ed3a​7db6f0003d0e825a7eccb41c" 
 + } 
 + c.LTI11Authenticator.username_key = 'ext_user_username' 
 +#br 
 + 
 +*** Moodle 側 [#sd9e4f7f] 
 +- 管理者‘IDで,「サイト管理」=> 「プラグイン」=> 「外部ツール:ツールを管理する」(=>「ツールを手動設定する」) 
 +-- デフォルト起動コンテナは「新しいウィンドウ」にする. 
 +#br 
 +- 埋め込み表示に設定した場合,chrome, edge では cookieが送信されないので,ログインできない(Firefox は可能 2021 9/3) 
 +-- SameSite=Lax であるため,iframe 使用時は Moodleのホストと JupyterHub のホストが異なる場合は cookie が送信されない. 
 +-- JupyterHub のソースコードを散々引っ掻き回して,ようやく理解した. 
 + 
 +- [[Hack>Moodle/Moodle-LTI]] 
 +#br 
 + 
 +*** etc [#fd7583af] 
 + 
 +**** error : module 'oauthlib.oauth1.rfc5849.signature' has no attribute 'signature_base_string' [#l6c7a130] 
 +- ライブラリが足りない 
 +-- conda install oauthlib 
 +#br 
 + 
 +**** 欠点:利点? [#w4038708] 
 +- %%一度 Moodle 経由でログインすると,ブラウザがアカウントを覚えているらしく,次回からは Moodle 経由で無くともログイン可能.%% ログアウトすればOK 
 +- その他の一般ユーザ認証と併用できない. 
 +#br 
 + 
 +*** OLD: v1.0.0 [#a6e2e114] 
 + 
 +***** Learning Tools Interoperability [#lde959fa] 
 +- https://github.com/jupyterhub/ltiauthent​icator 
 + 
 +- 既にインストールされている ltiauthenticator だと Moodle にログインできない. 
 +-- "Moodleと Jupyter Notebookの 連携 によるプログラミング 教育環境 の 構築" 石坂徹,桑田喜隆, et. al., Moodle Moot Japan 2019 Proceedings (2019), pp.32-37 
 +--- /usr/local/anaconda/envs/jupyterhub/lib/​python3.8/site-packages/ltiauthenticator​/__init__.py 
 + 152            # Before we return lti_user_id, check to see if a canvas_custom_user_id was sent. 
 + 153            # If so, this indicates two things: 
 + 154            # 1. The request was sent from Canvas, not edX 
 + 155            # 2. The request was sent from a Canvas course not running in anonymous mode 
 + 156            # If this is the case we want to use the canvas ID to allow grade returns through the Canvas API 
 + 157            # If Canvas is running in anonymous mode, we\'ll still want the \'user_id\' (which is the `lti_user_id``) 
 + 158 
 + 159            canvas_id = handler.get_body_argument('custom_canvas​_user_id', default=None) 
 + 160 +          product_code = handler.get_body_argument('tool_consumer​_info_product_family_code', default=None) 
 + 161 
 + 162            if canvas_id is not None: 
 + 163                user_id = handler.get_body_argument('custom_canvas​_user_id') 
 + 164 +          elif 'moodle' in product_code: 
 + 165 +                user_id = handler.get_body_argument('ext_user_user​name') 
 + 166            else: 
 + 167                user_id = handler.get_body_argument('user_id') 
 + 168 
 + 
 +***** jupyterhub_config.py [#c6db4f7a] 
 + c.JupyterHub.authenticator_class = 'ltiauthenticator.LTIAuthenticator' 
 + c.LTIAuthenticator.consumers = { 
 +     "b18e82ec683724743236fade71350720029a2914​4a585c66f6741d8e9c6e0d83" : "c0fe2924dbb0f4701d898d36aaf9fd89c7a3ed3a​7db6f0003d0e825a7eccb41c" 
 + } 
 +- キーは二つとも openssl rand -hex 32 で生成. 
 +-- openssl rand -hex 32 
 +#br


トップ   新規 ページ一覧 単語検索 最終更新   ヘルプ   最終更新のRSS 1.0 最終更新のRSS 2.0 最終更新のRSS Atom

サイト内 検索

ログイン

ユーザー名:

パスワード:


パスワード紛失
新規登録

サブ メニュー

ミニカレンダー

前月2024年 5月翌月
1 2 3 4
5 6 7 8 9 10 11
12 13 14 15 16 17 18
19 20 21 22 23 24 25
26 27 28 29 30 31
<今日>

オンライン状況

56 人のユーザが現在オンラインです。 (11 人のユーザが xpwiki を参照しています。)

登録ユーザ: 0
ゲスト: 56

もっと...

アクセスカウンタ

今日 : 2887288728872887
昨日 : 1016210162101621016210162
総計 : 2342664623426646234266462342664623426646234266462342664623426646
Powered by XOOPS Cube 2.1© 2001-2006 XOOPS Cube Project
Design by XoopsDesign.com