SlideShare ist ein Scribd-Unternehmen logo
1 von 20
Automating Content Import
David Lippman
Pierce College
Lumen Learning
The Problem
You have large quantities of content (text,
quizzes, etc.) you want in Canvas.
Option 1: Cut and Paste
Option 2: Use the API
Option 3: Build a course cartridge
Key Format
Common Cartridge
• Basis for Canvas’s export format
• Exports are renamed zip files
Cartridge Components
Course settings XML
Files info XML
Syllabus HTML
Module layout as
modules_meta.xml
Using this will provide a more
predictable Module structure
than using standard common
cartridge
Cartridge Components
One folder per
assignment/discussion/quiz
Quizzes contain:
assessment_meta.xml
Display settings
assessment_qti.xml
Actual questions, in QTI format
Cartridge Components
All the wiki pages for the
course, in HTML format
Note: spaces and dots in wiki
page names get converted to
dashes in the file name.
Cartridge Components
The main mainfest for the whole
cartridge
<resource>
shows type and location of items
<organization> <item>
shows item structure (modules)
Best way to get familiar
Export a course
Rename it .zip and unzip it
Go exploring
So what can we do with this?
Universal search and replace on all wiki pages
Approach 1:
• Unzip the cartridge
• Use an editor that can do multi-file search
and replace
• Run against the wiki_content directory
• Rezip and upload
So what can we do with this?
Universal search and replace on all wiki pages
Approach 2:
• Write a script
require("phpQuery-onefile.php");
$zip = new ZipArchive;
$zip->open($file);
phpQuery::newDocumentXML(
$zip->getFromName("imsmanifest.xml"));
$ref = pq("resource");
foreach ($ref as $r) {
$reflist[pq($r)->attr("identifier")] =
pq($r)->attr("href");
$reftype[pq($r)->attr("identifier")] =
pq($r)->attr("type");
}
$items = pq(“item”);
foreach ($items as $item) {
$iref = pq($item)->attr("identifierref");
if (isset($reftype[$iref]) &&
$reftype[$iref]=="webcontent") {
$filename = $reflist[$iref]);
$html = $zip->getFromName($filename);
$html = str_replace(„</body>‟,
$attribution.‟</body>‟, $html);
$zip->addFromString($filename, $html);
}
}
So what can we do with this?
Import a collection of files as wiki pages
• Start with a clean export file
• Add pages in wiki_content
• Add new <resource> listings
• Add new <item> to imsmanifest and
modules_meta
• Or, just create new imsmanifest and
modules_meta files
QTI
• Standard format for quiz exchange
• Can import a QTI quiz into Canvas without a
full cartridge
Making it Easier
Generate QTI files from HTML or pasted Word
https://www.myopenmath.com/util/wordtoquiz.php
https://www.myopenmath.com/util/wordtoquiz2.php
https://www.myopenmath.com/util/wordtoquiz3.php
Sample Code
https://github.com/drlippman/canvas-scripts
• Search-and-replace in a cartridge example
• Generic content-to-CC
• Some specific examples of content-to-CC
• QTI generating scripts

Weitere ähnliche Inhalte

Was ist angesagt?

KubeCon EU 2016: Custom Volume Plugins
KubeCon EU 2016: Custom Volume PluginsKubeCon EU 2016: Custom Volume Plugins
KubeCon EU 2016: Custom Volume PluginsKubeAcademy
 
Intro to CouchDB
Intro to CouchDBIntro to CouchDB
Intro to CouchDBsbisbee
 
Integrating Google Search Appliance with Mura CMS
Integrating Google Search Appliance with Mura CMSIntegrating Google Search Appliance with Mura CMS
Integrating Google Search Appliance with Mura CMSMura CMS
 
Rapid Application Development with SwiftUI and Firebase
Rapid Application Development with SwiftUI and FirebaseRapid Application Development with SwiftUI and Firebase
Rapid Application Development with SwiftUI and FirebasePeter Friese
 
Distributed training of Deep Learning Models
Distributed training of Deep Learning ModelsDistributed training of Deep Learning Models
Distributed training of Deep Learning ModelsMiguel González-Fierro
 
Practical pig
Practical pigPractical pig
Practical pigtrihug
 
Check if a directory exists - ansible module stat
Check if a directory exists - ansible module statCheck if a directory exists - ansible module stat
Check if a directory exists - ansible module statAnsible Pilot
 
Apache mod_rewrite
Apache mod_rewriteApache mod_rewrite
Apache mod_rewriteDave Ross
 
Intermediate OOP in PHP
Intermediate OOP in PHPIntermediate OOP in PHP
Intermediate OOP in PHPDavid Stockton
 

Was ist angesagt? (14)

KubeCon EU 2016: Custom Volume Plugins
KubeCon EU 2016: Custom Volume PluginsKubeCon EU 2016: Custom Volume Plugins
KubeCon EU 2016: Custom Volume Plugins
 
Tax management-system
Tax management-systemTax management-system
Tax management-system
 
Cscope and ctags
Cscope and ctagsCscope and ctags
Cscope and ctags
 
REST API with CakePHP
REST API with CakePHPREST API with CakePHP
REST API with CakePHP
 
Intro to CouchDB
Intro to CouchDBIntro to CouchDB
Intro to CouchDB
 
Modern php
Modern phpModern php
Modern php
 
Integrating Google Search Appliance with Mura CMS
Integrating Google Search Appliance with Mura CMSIntegrating Google Search Appliance with Mura CMS
Integrating Google Search Appliance with Mura CMS
 
Rapid Application Development with SwiftUI and Firebase
Rapid Application Development with SwiftUI and FirebaseRapid Application Development with SwiftUI and Firebase
Rapid Application Development with SwiftUI and Firebase
 
Pig
PigPig
Pig
 
Distributed training of Deep Learning Models
Distributed training of Deep Learning ModelsDistributed training of Deep Learning Models
Distributed training of Deep Learning Models
 
Practical pig
Practical pigPractical pig
Practical pig
 
Check if a directory exists - ansible module stat
Check if a directory exists - ansible module statCheck if a directory exists - ansible module stat
Check if a directory exists - ansible module stat
 
Apache mod_rewrite
Apache mod_rewriteApache mod_rewrite
Apache mod_rewrite
 
Intermediate OOP in PHP
Intermediate OOP in PHPIntermediate OOP in PHP
Intermediate OOP in PHP
 

Ähnlich wie Automating Content Import into Canvas with Course Cartridges

Wiesław Kałkus: C# functional programming
Wiesław Kałkus: C# functional programmingWiesław Kałkus: C# functional programming
Wiesław Kałkus: C# functional programmingAnalyticsConf
 
ITPROceed 2016 - The Art of PowerShell Toolmaking
ITPROceed 2016 - The Art of PowerShell ToolmakingITPROceed 2016 - The Art of PowerShell Toolmaking
ITPROceed 2016 - The Art of PowerShell ToolmakingKurt Roggen [BE]
 
Supercharging WordPress Development in 2018
Supercharging WordPress Development in 2018Supercharging WordPress Development in 2018
Supercharging WordPress Development in 2018Adam Tomat
 
PHP-05-Objects.ppt
PHP-05-Objects.pptPHP-05-Objects.ppt
PHP-05-Objects.pptrani marri
 
Bioinformatics p5-bioperl v2013-wim_vancriekinge
Bioinformatics p5-bioperl v2013-wim_vancriekingeBioinformatics p5-bioperl v2013-wim_vancriekinge
Bioinformatics p5-bioperl v2013-wim_vancriekingeProf. Wim Van Criekinge
 
OOP Adventures with XOOPS
OOP Adventures with XOOPSOOP Adventures with XOOPS
OOP Adventures with XOOPSxoopsproject
 
WordPress Café: Using WordPress as a Framework
WordPress Café: Using WordPress as a FrameworkWordPress Café: Using WordPress as a Framework
WordPress Café: Using WordPress as a FrameworkExove
 
Week 7 introduction to theme development
Week 7   introduction to theme developmentWeek 7   introduction to theme development
Week 7 introduction to theme developmenthenri_makembe
 
Powershell Training
Powershell TrainingPowershell Training
Powershell TrainingFahad Noaman
 
FFW Gabrovo PMG - PHP OOP Part 3
FFW Gabrovo PMG - PHP OOP Part 3FFW Gabrovo PMG - PHP OOP Part 3
FFW Gabrovo PMG - PHP OOP Part 3Toni Kolev
 
Build powerfull and smart web applications with Symfony2
Build powerfull and smart web applications with Symfony2Build powerfull and smart web applications with Symfony2
Build powerfull and smart web applications with Symfony2Hugo Hamon
 
The Role of Atom/AtomPub in Digital Archive Services at The University of Tex...
The Role of Atom/AtomPub in Digital Archive Services at The University of Tex...The Role of Atom/AtomPub in Digital Archive Services at The University of Tex...
The Role of Atom/AtomPub in Digital Archive Services at The University of Tex...Peter Keane
 
Introducing Assetic (NYPHP)
Introducing Assetic (NYPHP)Introducing Assetic (NYPHP)
Introducing Assetic (NYPHP)Kris Wallsmith
 

Ähnlich wie Automating Content Import into Canvas with Course Cartridges (20)

Wiesław Kałkus: C# functional programming
Wiesław Kałkus: C# functional programmingWiesław Kałkus: C# functional programming
Wiesław Kałkus: C# functional programming
 
Bioinformatics p5-bioperlv2014
Bioinformatics p5-bioperlv2014Bioinformatics p5-bioperlv2014
Bioinformatics p5-bioperlv2014
 
ITPROceed 2016 - The Art of PowerShell Toolmaking
ITPROceed 2016 - The Art of PowerShell ToolmakingITPROceed 2016 - The Art of PowerShell Toolmaking
ITPROceed 2016 - The Art of PowerShell Toolmaking
 
Supercharging WordPress Development in 2018
Supercharging WordPress Development in 2018Supercharging WordPress Development in 2018
Supercharging WordPress Development in 2018
 
Bioinformatica p6-bioperl
Bioinformatica p6-bioperlBioinformatica p6-bioperl
Bioinformatica p6-bioperl
 
PHP-05-Objects.ppt
PHP-05-Objects.pptPHP-05-Objects.ppt
PHP-05-Objects.ppt
 
Bioinformatics p5-bioperl v2013-wim_vancriekinge
Bioinformatics p5-bioperl v2013-wim_vancriekingeBioinformatics p5-bioperl v2013-wim_vancriekinge
Bioinformatics p5-bioperl v2013-wim_vancriekinge
 
Assetic (OSCON)
Assetic (OSCON)Assetic (OSCON)
Assetic (OSCON)
 
OOP Adventures with XOOPS
OOP Adventures with XOOPSOOP Adventures with XOOPS
OOP Adventures with XOOPS
 
Bioinformatica 10-11-2011-p6-bioperl
Bioinformatica 10-11-2011-p6-bioperlBioinformatica 10-11-2011-p6-bioperl
Bioinformatica 10-11-2011-p6-bioperl
 
WordPress Café: Using WordPress as a Framework
WordPress Café: Using WordPress as a FrameworkWordPress Café: Using WordPress as a Framework
WordPress Café: Using WordPress as a Framework
 
CodeIgniter & MVC
CodeIgniter & MVCCodeIgniter & MVC
CodeIgniter & MVC
 
Helberg acl-final
Helberg acl-finalHelberg acl-final
Helberg acl-final
 
Week 7 introduction to theme development
Week 7   introduction to theme developmentWeek 7   introduction to theme development
Week 7 introduction to theme development
 
Powershell Training
Powershell TrainingPowershell Training
Powershell Training
 
Magento code audit
Magento code auditMagento code audit
Magento code audit
 
FFW Gabrovo PMG - PHP OOP Part 3
FFW Gabrovo PMG - PHP OOP Part 3FFW Gabrovo PMG - PHP OOP Part 3
FFW Gabrovo PMG - PHP OOP Part 3
 
Build powerfull and smart web applications with Symfony2
Build powerfull and smart web applications with Symfony2Build powerfull and smart web applications with Symfony2
Build powerfull and smart web applications with Symfony2
 
The Role of Atom/AtomPub in Digital Archive Services at The University of Tex...
The Role of Atom/AtomPub in Digital Archive Services at The University of Tex...The Role of Atom/AtomPub in Digital Archive Services at The University of Tex...
The Role of Atom/AtomPub in Digital Archive Services at The University of Tex...
 
Introducing Assetic (NYPHP)
Introducing Assetic (NYPHP)Introducing Assetic (NYPHP)
Introducing Assetic (NYPHP)
 

Mehr von David Lippman

My Journey to Open - USNH ATI 2015
My Journey to Open - USNH ATI 2015My Journey to Open - USNH ATI 2015
My Journey to Open - USNH ATI 2015David Lippman
 
OER Update for FACTC Oct 2014
OER Update for FACTC Oct 2014OER Update for FACTC Oct 2014
OER Update for FACTC Oct 2014David Lippman
 
Kaleidoscope Overview of Copyright
Kaleidoscope Overview of CopyrightKaleidoscope Overview of Copyright
Kaleidoscope Overview of CopyrightDavid Lippman
 
Open Course Library presentation, AMATYC 2013
Open Course Library presentation, AMATYC 2013Open Course Library presentation, AMATYC 2013
Open Course Library presentation, AMATYC 2013David Lippman
 
Santa Ana Open Math Forum
Santa Ana Open Math ForumSanta Ana Open Math Forum
Santa Ana Open Math ForumDavid Lippman
 
Understanding Copyright and Remixing by Example
Understanding Copyright and Remixing by ExampleUnderstanding Copyright and Remixing by Example
Understanding Copyright and Remixing by ExampleDavid Lippman
 

Mehr von David Lippman (8)

My Journey to Open - USNH ATI 2015
My Journey to Open - USNH ATI 2015My Journey to Open - USNH ATI 2015
My Journey to Open - USNH ATI 2015
 
OER Update for FACTC Oct 2014
OER Update for FACTC Oct 2014OER Update for FACTC Oct 2014
OER Update for FACTC Oct 2014
 
The Case for Open
The Case for OpenThe Case for Open
The Case for Open
 
Kaleidoscope Overview of Copyright
Kaleidoscope Overview of CopyrightKaleidoscope Overview of Copyright
Kaleidoscope Overview of Copyright
 
Open Course Library presentation, AMATYC 2013
Open Course Library presentation, AMATYC 2013Open Course Library presentation, AMATYC 2013
Open Course Library presentation, AMATYC 2013
 
Santa Ana Open Math Forum
Santa Ana Open Math ForumSanta Ana Open Math Forum
Santa Ana Open Math Forum
 
Understanding Copyright and Remixing by Example
Understanding Copyright and Remixing by ExampleUnderstanding Copyright and Remixing by Example
Understanding Copyright and Remixing by Example
 
Denver
DenverDenver
Denver
 

Kürzlich hochgeladen

Grant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingGrant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingTechSoup
 
Measures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SDMeasures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SDThiyagu K
 
Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17Celine George
 
APM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across SectorsAPM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across SectorsAssociation for Project Management
 
Measures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeMeasures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeThiyagu K
 
JAPAN: ORGANISATION OF PMDA, PHARMACEUTICAL LAWS & REGULATIONS, TYPES OF REGI...
JAPAN: ORGANISATION OF PMDA, PHARMACEUTICAL LAWS & REGULATIONS, TYPES OF REGI...JAPAN: ORGANISATION OF PMDA, PHARMACEUTICAL LAWS & REGULATIONS, TYPES OF REGI...
JAPAN: ORGANISATION OF PMDA, PHARMACEUTICAL LAWS & REGULATIONS, TYPES OF REGI...anjaliyadav012327
 
Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104misteraugie
 
Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)eniolaolutunde
 
Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3JemimahLaneBuaron
 
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Sapana Sha
 
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...fonyou31
 
Beyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global ImpactBeyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global ImpactPECB
 
CARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxCARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxGaneshChakor2
 
Mastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory InspectionMastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory InspectionSafetyChain Software
 
Separation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and ActinidesSeparation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and ActinidesFatimaKhan178732
 
Introduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsIntroduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsTechSoup
 
Russian Call Girls in Andheri Airport Mumbai WhatsApp 9167673311 💞 Full Nigh...
Russian Call Girls in Andheri Airport Mumbai WhatsApp  9167673311 💞 Full Nigh...Russian Call Girls in Andheri Airport Mumbai WhatsApp  9167673311 💞 Full Nigh...
Russian Call Girls in Andheri Airport Mumbai WhatsApp 9167673311 💞 Full Nigh...Pooja Nehwal
 
Arihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdfArihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdfchloefrazer622
 

Kürzlich hochgeladen (20)

Grant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingGrant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy Consulting
 
Measures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SDMeasures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SD
 
Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17
 
APM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across SectorsAPM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across Sectors
 
Measures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeMeasures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and Mode
 
JAPAN: ORGANISATION OF PMDA, PHARMACEUTICAL LAWS & REGULATIONS, TYPES OF REGI...
JAPAN: ORGANISATION OF PMDA, PHARMACEUTICAL LAWS & REGULATIONS, TYPES OF REGI...JAPAN: ORGANISATION OF PMDA, PHARMACEUTICAL LAWS & REGULATIONS, TYPES OF REGI...
JAPAN: ORGANISATION OF PMDA, PHARMACEUTICAL LAWS & REGULATIONS, TYPES OF REGI...
 
Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104
 
Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)
 
Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3
 
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
 
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...
 
Beyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global ImpactBeyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global Impact
 
CARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxCARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptx
 
Mastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory InspectionMastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory Inspection
 
Separation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and ActinidesSeparation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and Actinides
 
Mattingly "AI & Prompt Design: The Basics of Prompt Design"
Mattingly "AI & Prompt Design: The Basics of Prompt Design"Mattingly "AI & Prompt Design: The Basics of Prompt Design"
Mattingly "AI & Prompt Design: The Basics of Prompt Design"
 
Introduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsIntroduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The Basics
 
Russian Call Girls in Andheri Airport Mumbai WhatsApp 9167673311 💞 Full Nigh...
Russian Call Girls in Andheri Airport Mumbai WhatsApp  9167673311 💞 Full Nigh...Russian Call Girls in Andheri Airport Mumbai WhatsApp  9167673311 💞 Full Nigh...
Russian Call Girls in Andheri Airport Mumbai WhatsApp 9167673311 💞 Full Nigh...
 
Advance Mobile Application Development class 07
Advance Mobile Application Development class 07Advance Mobile Application Development class 07
Advance Mobile Application Development class 07
 
Arihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdfArihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdf
 

Automating Content Import into Canvas with Course Cartridges

  • 1. Automating Content Import David Lippman Pierce College Lumen Learning
  • 2. The Problem You have large quantities of content (text, quizzes, etc.) you want in Canvas. Option 1: Cut and Paste Option 2: Use the API Option 3: Build a course cartridge
  • 3. Key Format Common Cartridge • Basis for Canvas’s export format • Exports are renamed zip files
  • 4. Cartridge Components Course settings XML Files info XML Syllabus HTML Module layout as modules_meta.xml Using this will provide a more predictable Module structure than using standard common cartridge
  • 5. Cartridge Components One folder per assignment/discussion/quiz Quizzes contain: assessment_meta.xml Display settings assessment_qti.xml Actual questions, in QTI format
  • 6. Cartridge Components All the wiki pages for the course, in HTML format Note: spaces and dots in wiki page names get converted to dashes in the file name.
  • 7. Cartridge Components The main mainfest for the whole cartridge <resource> shows type and location of items <organization> <item> shows item structure (modules)
  • 8.
  • 9. Best way to get familiar Export a course Rename it .zip and unzip it Go exploring
  • 10. So what can we do with this? Universal search and replace on all wiki pages Approach 1: • Unzip the cartridge • Use an editor that can do multi-file search and replace • Run against the wiki_content directory • Rezip and upload
  • 11. So what can we do with this? Universal search and replace on all wiki pages Approach 2: • Write a script
  • 12. require("phpQuery-onefile.php"); $zip = new ZipArchive; $zip->open($file); phpQuery::newDocumentXML( $zip->getFromName("imsmanifest.xml")); $ref = pq("resource"); foreach ($ref as $r) { $reflist[pq($r)->attr("identifier")] = pq($r)->attr("href"); $reftype[pq($r)->attr("identifier")] = pq($r)->attr("type"); }
  • 13. $items = pq(“item”); foreach ($items as $item) { $iref = pq($item)->attr("identifierref"); if (isset($reftype[$iref]) && $reftype[$iref]=="webcontent") { $filename = $reflist[$iref]); $html = $zip->getFromName($filename); $html = str_replace(„</body>‟, $attribution.‟</body>‟, $html); $zip->addFromString($filename, $html); } }
  • 14. So what can we do with this? Import a collection of files as wiki pages • Start with a clean export file • Add pages in wiki_content • Add new <resource> listings • Add new <item> to imsmanifest and modules_meta • Or, just create new imsmanifest and modules_meta files
  • 15. QTI • Standard format for quiz exchange • Can import a QTI quiz into Canvas without a full cartridge
  • 16.
  • 17.
  • 18.
  • 19. Making it Easier Generate QTI files from HTML or pasted Word https://www.myopenmath.com/util/wordtoquiz.php https://www.myopenmath.com/util/wordtoquiz2.php https://www.myopenmath.com/util/wordtoquiz3.php
  • 20. Sample Code https://github.com/drlippman/canvas-scripts • Search-and-replace in a cartridge example • Generic content-to-CC • Some specific examples of content-to-CC • QTI generating scripts

Hinweis der Redaktion

  1. Before you start:Load up a Canvascourse https://lumen.instructure.com/courses/196787Load up one of the wordtoquiz.php pagesPaste in some quiz questions
  2. Show a course