djplaner / word-to-canvas-module

A userscript that will create a Canvas Module (including all module items) from a Word document (using special styles)

Home Page:https://djplaner.github.io/word-to-canvas-module/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Word to Canvas (word2canvas) Module

What is word2canvas?

A userscript that will create a new Canvas LMS module from a Word document (using some specific Word styles) - see sample w2c.docx for an annotated example.

❗ The contents of your Word documents always remain on your computer, your web browser, and eventually as a Module in the Canvas instance you are working with.

Why use word2canvas?

Manually creating a complex module using the Canvas web interface can be a touch tedious. Each item must be edited on its individual page. Multiple clicks... Especially if you already have the module content in a Word document and/or you are creating many modules. (e.g. migrating from one LMS to another)

Why not?

  1. Doesn't handle images embedded in Word documents.

    The Canvas editor removes base64 encoded images from HTML. The method word2canvas uses to convert the Word document to HTML converts images to base64 encoded images. The current suggested "solution" requires manual saving of these images and using them to replace placeholder images via the Canvas RCE.

  2. Required to use very specific Word styles.

    Your Word document must use very specific styles to correctly create Canvas Modules and their items. There is a learning curve involved.

  3. Doesn't work for new Quizzes.

    Entirely because Canvas does not yet have an API for new Quizzes.

How to use word2canvas

  1. Install the userscript

    Install a userscript manager (e.g. TamperMonkey) on your browser of choice and then install the word-2-canvas userscript.

  2. Test the userscript

    By creating a module from the sample Word document.

  3. Create a Word document containing content for your new Canvas module.

  4. Visit the modules page of a Canvas course and use word-2-canvas to create a new module.

❔ Feel free to use this repo's Issues to ask questions. Especially in these early development stages.

Canvas modules page with the word-2-canvas button added

Current Status

Note: ⚠️ ```word2canvas`` is largely working and is being used. There remain some rough edges and missing features.

Currently creates Canvas modules including

  • Creating new: pages, sub-headers, and external urls.
  • Links to existing: pages, assignments, files, discussions, quizzes (only old quizzes), and external tools.

To be done

  1. Better error checking and messaging
  2. Figure out how to handle embedded images.

⚠️ Known issues

  1. The word-2-canvas button may not always appear on the Modules page. Solution: Reload the modules page. Apparent cause: Navigation between pages in a Canvas course doesn't always invoke word2Canvas to check if it's on the module page. A reload of the modules page forces the issue

    ⚠️ It appears that this is a particular problem when using Firefox. Chromium-based browsers (e.g. Chrome and Edge) appear to work better.

Development

Userscript

For local development it is suggested to

  1. Use Chrome, with TamperMonkey installed and configured to allow local file acess.
  2. Install the dev userscript version of the userscript.
  3. Modify the dev script updating the local file: require to match the path on your computer.

About

A userscript that will create a Canvas Module (including all module items) from a Word document (using special styles)

https://djplaner.github.io/word-to-canvas-module/

License:MIT License


Languages

Language:HTML 63.5%Language:JavaScript 35.6%Language:CSS 0.9%Language:Shell 0.0%