--- id: "f3e7cc3b-c5fa-4975-8338-7e116c053623" name: "canvas_simnet_go()" micro_summary: "Call when you need to navigate from a Canvas assignment page into its SIMnet or McGraw Hill Connect external tool." status: "resolved" see_also: [] scope: "Navigate from a Canvas assignment page to the SIMnet/Connect external tool assignment. Call from any Canvas assignment page. Field-tested on both simbook (Access) and project (Excel) assignments." --- ## canvas_simnet_go() Call from any Canvas assignment page. Detects the `iframe.tool_launch` LTI iframe, navigates to its `src` URL to trigger the LTI redirect chain, and lands on the SIMnet/Connect assignment page. **Returns JSON** (parse with `json.loads`): ```json {"ok": true, "url": "...", "type": "simnet"} {"ok": false, "url": null, "type": "other", "error": "no tool_launch iframe on this page"} ``` ### When to call After `canvas_open_next()` opens an assignment, call `canvas_simnet_go()` to navigate into the SIMnet/Connect assignment. If it returns `ok: false` with "no tool_launch iframe", the assignment is Canvas-native — fall back to reading page text. ### Redirect chain The SIMnet redirect chain is documented on the SIMnet Discovery methodology node. In brief: tool_launch → LTI authorize → envcheck/SSO → assignment (~5s total). The redirect wait loop handles envcheck pages that redirect after the `load` event. ### Detection signals - `type: "simnet"` → URL contains `simnetonline.com/sp/assignments` or `/sp/simbooks` - `type: "connect"` → URL contains `connect.router` - `type: "other"` → no tool_launch iframe (Canvas-native assignment) ### Warnings - Uses `goto_url()` in the current tab — replaces whatever page is open. Always open the assignment in a **new tab** first. - Redirect wait loop is timing-sensitive. Do not reduce sleep durations without testing both simbook (envcheck path) and project (direct SSO path) assignment types. - If SIMnet introduces new URL patterns, update the `ok` detection.