SlideShare a Scribd company logo
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

More Related Content

What's hot

KubeCon EU 2016: Custom Volume Plugins
KubeCon EU 2016: Custom Volume PluginsKubeCon EU 2016: Custom Volume Plugins
KubeCon EU 2016: Custom Volume Plugins
KubeAcademy
 
Tax management-system
Tax management-systemTax management-system
Tax management-system
Fahim Faysal Kabir
 
Intro to CouchDB
Intro to CouchDBIntro to CouchDB
Intro to CouchDB
sbisbee
 
Modern php
Modern phpModern php
Modern php
Charles Anderson
 
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
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
Peter Friese
 
Pig
PigPig
Distributed training of Deep Learning Models
Distributed training of Deep Learning ModelsDistributed training of Deep Learning Models
Distributed training of Deep Learning Models
Miguel González-Fierro
 
Practical pig
Practical pigPractical pig
Practical pig
trihug
 
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
Ansible Pilot
 
Apache mod_rewrite
Apache mod_rewriteApache mod_rewrite
Apache mod_rewrite
Dave Ross
 
Intermediate OOP in PHP
Intermediate OOP in PHPIntermediate OOP in PHP
Intermediate OOP in PHP
David Stockton
 

What's hot (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
 

Similar to Automating Content Import

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
AnalyticsConf
 
Bioinformatics p5-bioperlv2014
Bioinformatics p5-bioperlv2014Bioinformatics p5-bioperlv2014
Bioinformatics p5-bioperlv2014
Prof. Wim Van Criekinge
 
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
Kurt Roggen [BE]
 
Supercharging WordPress Development in 2018
Supercharging WordPress Development in 2018Supercharging WordPress Development in 2018
Supercharging WordPress Development in 2018
Adam Tomat
 
Bioinformatica p6-bioperl
Bioinformatica p6-bioperlBioinformatica p6-bioperl
Bioinformatica p6-bioperl
Prof. Wim Van Criekinge
 
PHP-05-Objects.ppt
PHP-05-Objects.pptPHP-05-Objects.ppt
PHP-05-Objects.ppt
rani marri
 
Bioinformatics p5-bioperl v2013-wim_vancriekinge
Bioinformatics p5-bioperl v2013-wim_vancriekingeBioinformatics p5-bioperl v2013-wim_vancriekinge
Bioinformatics p5-bioperl v2013-wim_vancriekinge
Prof. Wim Van Criekinge
 
OOP Adventures with XOOPS
OOP Adventures with XOOPSOOP Adventures with XOOPS
OOP Adventures with XOOPS
xoopsproject
 
Bioinformatica 10-11-2011-p6-bioperl
Bioinformatica 10-11-2011-p6-bioperlBioinformatica 10-11-2011-p6-bioperl
Bioinformatica 10-11-2011-p6-bioperl
Prof. Wim Van Criekinge
 
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
Exove
 
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 3
Toni 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 Symfony2
Hugo 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
 

Similar to Automating Content Import (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)
 

More from 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 2015
David Lippman
 
OER Update for FACTC Oct 2014
OER Update for FACTC Oct 2014OER Update for FACTC Oct 2014
OER Update for FACTC Oct 2014
David Lippman
 
The Case for Open
The Case for OpenThe Case for Open
The Case for Open
David Lippman
 
Kaleidoscope Overview of Copyright
Kaleidoscope Overview of CopyrightKaleidoscope Overview of Copyright
Kaleidoscope Overview of Copyright
David 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 Forum
David Lippman
 
Understanding Copyright and Remixing by Example
Understanding Copyright and Remixing by ExampleUnderstanding Copyright and Remixing by Example
Understanding Copyright and Remixing by Example
David Lippman
 

More from 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
 

Recently uploaded

June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...
June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...
June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...
Levi Shapiro
 
"Protectable subject matters, Protection in biotechnology, Protection of othe...
"Protectable subject matters, Protection in biotechnology, Protection of othe..."Protectable subject matters, Protection in biotechnology, Protection of othe...
"Protectable subject matters, Protection in biotechnology, Protection of othe...
SACHIN R KONDAGURI
 
Lapbook sobre os Regimes Totalitários.pdf
Lapbook sobre os Regimes Totalitários.pdfLapbook sobre os Regimes Totalitários.pdf
Lapbook sobre os Regimes Totalitários.pdf
Jean Carlos Nunes Paixão
 
Honest Reviews of Tim Han LMA Course Program.pptx
Honest Reviews of Tim Han LMA Course Program.pptxHonest Reviews of Tim Han LMA Course Program.pptx
Honest Reviews of Tim Han LMA Course Program.pptx
timhan337
 
Introduction to AI for Nonprofits with Tapp Network
Introduction to AI for Nonprofits with Tapp NetworkIntroduction to AI for Nonprofits with Tapp Network
Introduction to AI for Nonprofits with Tapp Network
TechSoup
 
Phrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXX
Phrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXXPhrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXX
Phrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXX
MIRIAMSALINAS13
 
Embracing GenAI - A Strategic Imperative
Embracing GenAI - A Strategic ImperativeEmbracing GenAI - A Strategic Imperative
Embracing GenAI - A Strategic Imperative
Peter Windle
 
Sha'Carri Richardson Presentation 202345
Sha'Carri Richardson Presentation 202345Sha'Carri Richardson Presentation 202345
Sha'Carri Richardson Presentation 202345
beazzy04
 
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
MysoreMuleSoftMeetup
 
Unit 2- Research Aptitude (UGC NET Paper I).pdf
Unit 2- Research Aptitude (UGC NET Paper I).pdfUnit 2- Research Aptitude (UGC NET Paper I).pdf
Unit 2- Research Aptitude (UGC NET Paper I).pdf
Thiyagu K
 
Biological Screening of Herbal Drugs in detailed.
Biological Screening of Herbal Drugs in detailed.Biological Screening of Herbal Drugs in detailed.
Biological Screening of Herbal Drugs in detailed.
Ashokrao Mane college of Pharmacy Peth-Vadgaon
 
How libraries can support authors with open access requirements for UKRI fund...
How libraries can support authors with open access requirements for UKRI fund...How libraries can support authors with open access requirements for UKRI fund...
How libraries can support authors with open access requirements for UKRI fund...
Jisc
 
678020731-Sumas-y-Restas-Para-Colorear.pdf
678020731-Sumas-y-Restas-Para-Colorear.pdf678020731-Sumas-y-Restas-Para-Colorear.pdf
678020731-Sumas-y-Restas-Para-Colorear.pdf
CarlosHernanMontoyab2
 
Chapter 3 - Islamic Banking Products and Services.pptx
Chapter 3 - Islamic Banking Products and Services.pptxChapter 3 - Islamic Banking Products and Services.pptx
Chapter 3 - Islamic Banking Products and Services.pptx
Mohd Adib Abd Muin, Senior Lecturer at Universiti Utara Malaysia
 
CACJapan - GROUP Presentation 1- Wk 4.pdf
CACJapan - GROUP Presentation 1- Wk 4.pdfCACJapan - GROUP Presentation 1- Wk 4.pdf
CACJapan - GROUP Presentation 1- Wk 4.pdf
camakaiclarkmusic
 
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
siemaillard
 
The basics of sentences session 5pptx.pptx
The basics of sentences session 5pptx.pptxThe basics of sentences session 5pptx.pptx
The basics of sentences session 5pptx.pptx
heathfieldcps1
 
The Challenger.pdf DNHS Official Publication
The Challenger.pdf DNHS Official PublicationThe Challenger.pdf DNHS Official Publication
The Challenger.pdf DNHS Official Publication
Delapenabediema
 
Welcome to TechSoup New Member Orientation and Q&A (May 2024).pdf
Welcome to TechSoup   New Member Orientation and Q&A (May 2024).pdfWelcome to TechSoup   New Member Orientation and Q&A (May 2024).pdf
Welcome to TechSoup New Member Orientation and Q&A (May 2024).pdf
TechSoup
 
CLASS 11 CBSE B.St Project AIDS TO TRADE - INSURANCE
CLASS 11 CBSE B.St Project AIDS TO TRADE - INSURANCECLASS 11 CBSE B.St Project AIDS TO TRADE - INSURANCE
CLASS 11 CBSE B.St Project AIDS TO TRADE - INSURANCE
BhavyaRajput3
 

Recently uploaded (20)

June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...
June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...
June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...
 
"Protectable subject matters, Protection in biotechnology, Protection of othe...
"Protectable subject matters, Protection in biotechnology, Protection of othe..."Protectable subject matters, Protection in biotechnology, Protection of othe...
"Protectable subject matters, Protection in biotechnology, Protection of othe...
 
Lapbook sobre os Regimes Totalitários.pdf
Lapbook sobre os Regimes Totalitários.pdfLapbook sobre os Regimes Totalitários.pdf
Lapbook sobre os Regimes Totalitários.pdf
 
Honest Reviews of Tim Han LMA Course Program.pptx
Honest Reviews of Tim Han LMA Course Program.pptxHonest Reviews of Tim Han LMA Course Program.pptx
Honest Reviews of Tim Han LMA Course Program.pptx
 
Introduction to AI for Nonprofits with Tapp Network
Introduction to AI for Nonprofits with Tapp NetworkIntroduction to AI for Nonprofits with Tapp Network
Introduction to AI for Nonprofits with Tapp Network
 
Phrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXX
Phrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXXPhrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXX
Phrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXX
 
Embracing GenAI - A Strategic Imperative
Embracing GenAI - A Strategic ImperativeEmbracing GenAI - A Strategic Imperative
Embracing GenAI - A Strategic Imperative
 
Sha'Carri Richardson Presentation 202345
Sha'Carri Richardson Presentation 202345Sha'Carri Richardson Presentation 202345
Sha'Carri Richardson Presentation 202345
 
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
 
Unit 2- Research Aptitude (UGC NET Paper I).pdf
Unit 2- Research Aptitude (UGC NET Paper I).pdfUnit 2- Research Aptitude (UGC NET Paper I).pdf
Unit 2- Research Aptitude (UGC NET Paper I).pdf
 
Biological Screening of Herbal Drugs in detailed.
Biological Screening of Herbal Drugs in detailed.Biological Screening of Herbal Drugs in detailed.
Biological Screening of Herbal Drugs in detailed.
 
How libraries can support authors with open access requirements for UKRI fund...
How libraries can support authors with open access requirements for UKRI fund...How libraries can support authors with open access requirements for UKRI fund...
How libraries can support authors with open access requirements for UKRI fund...
 
678020731-Sumas-y-Restas-Para-Colorear.pdf
678020731-Sumas-y-Restas-Para-Colorear.pdf678020731-Sumas-y-Restas-Para-Colorear.pdf
678020731-Sumas-y-Restas-Para-Colorear.pdf
 
Chapter 3 - Islamic Banking Products and Services.pptx
Chapter 3 - Islamic Banking Products and Services.pptxChapter 3 - Islamic Banking Products and Services.pptx
Chapter 3 - Islamic Banking Products and Services.pptx
 
CACJapan - GROUP Presentation 1- Wk 4.pdf
CACJapan - GROUP Presentation 1- Wk 4.pdfCACJapan - GROUP Presentation 1- Wk 4.pdf
CACJapan - GROUP Presentation 1- Wk 4.pdf
 
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
 
The basics of sentences session 5pptx.pptx
The basics of sentences session 5pptx.pptxThe basics of sentences session 5pptx.pptx
The basics of sentences session 5pptx.pptx
 
The Challenger.pdf DNHS Official Publication
The Challenger.pdf DNHS Official PublicationThe Challenger.pdf DNHS Official Publication
The Challenger.pdf DNHS Official Publication
 
Welcome to TechSoup New Member Orientation and Q&A (May 2024).pdf
Welcome to TechSoup   New Member Orientation and Q&A (May 2024).pdfWelcome to TechSoup   New Member Orientation and Q&A (May 2024).pdf
Welcome to TechSoup New Member Orientation and Q&A (May 2024).pdf
 
CLASS 11 CBSE B.St Project AIDS TO TRADE - INSURANCE
CLASS 11 CBSE B.St Project AIDS TO TRADE - INSURANCECLASS 11 CBSE B.St Project AIDS TO TRADE - INSURANCE
CLASS 11 CBSE B.St Project AIDS TO TRADE - INSURANCE
 

Automating Content Import

  • 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

Editor's Notes

  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