Wolfram Tech in Online Course Platforms like edX/Moodle/Coursera/… (with auto-grading)

Andrea Griffin, MIT
Kyle Keane, MIT

Join the Conversation #WolframTechConf

ABSTRACT

This talk will introduce a new, publicly available Wolfram Language package for embedding content in online course platforms such as edX, Moodle and Coursera. The package allows the Wolfram Cloud to inject grades directly into the course’s grade book after students submit their work. We will start with a walkthrough of how to embed a set of the simplest examples to demonstrate the package’s functionality. Then we will demonstrate three examples of how we have used the package at MIT to augment our online courses. First, we deployed a collaborative photo gallery where students get credit for submitting photos with descriptions to a community board where they could view everyone else’s submissions. Second, we deployed a web form where students entered data to create a downloadable PDF document that included their input. Lastly, we will share a set of interactive physics widgets that let students explore common variations of their homework problems to discover new insights. We will discuss how we used this package to cohort students into small groups and perform educational research through studying the effects of differentiated instructional materials. The LTI package is available for others to use in their courses.

LTI - Learning Tools Interoperability

Projects

Launching Innovation in Schools

Artifact Generator

Gallery

8.01x Mechanics: Kinematics and Dynamics

Problem Sets

Discussions

Bonus (next talk): Research Study

Functions in the package

LTI`VerifyRequest[secret]
LTI`LaunchForm[form, secret]
LTI`getUserID[secret]
LTI`getResourceLinkID[secret]
LTI`getRoles[secret]
LTI`SendGrade[grade,key,secret]
LTI`getEmail[secret]

Simple Example 1

Using tech inside a course platform

Something embedded in online course platform, that cannot be accessed outside of the course platform.

Simple Example 1

Using tech inside a course platform

LTI Functionality: VerifyRequest

CloudDeploy[
Delayed[
CloudGet["https://www.wolframcloud.com/objects/atg0/MITx/LTI/Package.wl"];
LTI`VerifyRequest[secret];
"This will only be seen within the course"
],
"presentation/examples/verify"
,Permissions->"Public"]

Simple Example 2

Taking a poll

Something embedded in online course platform, that cannot be accessed outside of the course platform.

Simple Example 2

Taking a poll

LTI Functionality: Launch Form

poll=CloudDeploy[
Delayed[
CloudGet["https://www.wolframcloud.com/objects/atg0/MITx/LTI/Package.wl"];
LTI`VerifyRequest[secret];
FormFunction[{
"flavor"-><|
"Label"->"What is your favorite flavor of ice cream?",
"Interpreter"->{"vanilla","chocolate","strawberry"}
|>
},
(DatabinAdd[Databin["yojA3xmi"],#];
BarChart[Counts[Flatten[Values[Values[Databin["yojA3xmi"]]]]],ChartLabels->Automatic])&
]
]
,"presentation/examples/poll/poll"]

CloudDeploy[
Delayed[
CloudGet["https://www.wolframcloud.com/objects/atg0/MITx/LTI/Package.wl"];
LTI`VerifyRequest[secret];
LTI`LaunchForm[First@poll,secret]
],
"presentation/examples/poll/begin"]

Launching Innovation in Schools

Artifact Generator

Creating a Work Plan

Take a minute to scan the syllabus and your calendar and think about how you’ll fit the course into your life. Use the Work Plan Generator below to create a plan for yourself.

Launching Innovation in Schools

Artifact Generator

LTI Functionality: UserID

formResults=<|
"name"->"Andrea Griffin",
"why"->{"To learn new things about leadership and innovation."},
"other"->"This is why I want to take this course.",
"share"->"Kyle Keane",
"days"->{"Sunday","Friday"},
"time"->{"Morning"},
"goalW1"->"This is my goal for the first week of the course.",
"goal"->"This is my goal for the entire course",
"image"->|>;
CloudPut[
KeyDrop[formResults,"image"],
CloudObject[
URLBuild[{"dataStoragePath",LTI`getUserID[$consumerSecret],"info"}
]]]

CloudExport[
formResults["image"],
"JPG",
CloudObject[
URLBuild[{"dataStoragePath",LTI`getUserID[$consumerSecret],"pic"}
]]]

submittedInfo=CloudGet[
CloudObject[
URLBuild[{
"dataStoragePath",LTI`getUserID[$consumerSecret],"info"}
]]];
FormFunction[{
"name"-><|"Label"->"Your name as it will appear on this Work Plan.",
"Input"->If[
MatchQ[submittedInfo,$Failed],
"",
submittedInfo["name"]
]|>
}
(*code that stores the info*)
]

Launching Innovation in Schools

Gallery

Exploring what a powerful learning environment is

Create an image that evokes your vision of a powerful learning environment. Explain how your image represents your idea of a powerful learning environment. Share your image in the gallery.

Asset Map

This assignment is all about recognizing strengths and resources. In this assignment, you will develop an asset map. An asset map is a visual representation of the valuable resources around you and how they connect. You will share the image of your map in the Asset Map Gallery

Launching Innovation in Schools

Gallery

LTI Functionality: Resource Link ID

formResults=<|
"title"->"Cute Puppy",
"sentence"->"This is an image of a really cute puppy sleeping in a ball.",
"image"->|>;

CloudPut[
KeyDrop[formResults,"image"],
CloudObject[
URLBuild[{"dataStoragePath",
"Galleries",LTI`getResourceLinkID[$consumerSecret],
"data",LTI`getUserID[$consumerSecret],"info"}
]]]

CloudExport[
formResults["image"],
"JPG",
CloudObject[
URLBuild[{"dataStoragePath",
"Galleries",LTI`getResourceLinkID[$consumerSecret],
"data",LTI`getUserID[$consumerSecret],"pic"}
]]]

updateGallery:=CloudDeploy[
ExportForm[
StringJoin[
convertDataIntoHTML/@
CloudObjects[
URLBuild[{"dataStoragePath","Galleries",LTI`getResourceLinkID[$consumerSecret],"data"}]]
],
"HTML"],
CloudObject[
URLBuild[{"dataStoragePath","Galleries",LTI`getResourceLinkID[$consumerSecret],"gallery.html"}]],
Permissions->"Public"]

Launching Innovation in Schools

Gallery

What about “bad” posts?

Launching Innovation in Schools

Gallery

LTI Functionality: Roles

CloudDeploy[
Delayed[
CloudGet["https://www.wolframcloud.com/objects/atg0/MITx/LTI/Package.wl"];
LTI`VerifyRequest[$consumerSecret];
 
If[TrueQ@MatchQ[LTI`getRoles[$consumerSecret],"Administrator"|"Instructor"],

(*Admin view with delete powers*)
adminView,

(*Student view*)
If[
MatchQ[Get[
CloudObject[
URLBuild[{"dataStoragePath",
"Galleries",LTI`getResourceLinkID[$consumerSecret],"data",LTI`getUserID[$consumerSecret],"info"}
]]],
$Failed],

(*Student that has not submitted, send to student form*)
LTI`LaunchForm[First @ studentform, $consumerSecret],

(*Student that has submitted, send to gallery*)
HTTPRedirect[First@CloudObject[
URLBuild[{"dataStoragePath",
"Galleries",LTI`getResourceLinkID[$consumerSecret],
"gallery.html"}
]]]
	]
]],
	URLBuild[{"dataStoragePath","Begin"}],
	Permissions -> "Public"
]

8.01x Mechanics: Kinematics and Dynamics

Problem Sets

Grade someone’s work

8.01x Mechanics: Kinematics and Dynamics

Problem Sets

LTI Functionality: SendGrade

grade[results_]:=
(Boole[
TrueQ[2.01286-.2≤ results["a"]≤ 2.01286+.2]
]+Boole[
TrueQ[14.8411-.2≤ results["b"]≤ 14.8411+.2]
])/2//N

FormFunction[
{"a"-><|
"Label"->"Solve for initial velocity",
"Interpreter"->"Number"|>,
"b"-><|
"Label"->"Solve for final velocity",
"Interpreter"->"Number"|>},

LTI`SendGrade[
grade[#],
key,secret]&
]

Note: you don’t need user ID or resource ID.

8.01x Mechanics: Kinematics and Dynamics

Discussions

If someone has trouble solving a problem, they need to be able to talk to us.

8.01x Mechanics: Kinematics and Dynamics

Discussions

LTI Functionality: getEmail

FormFunction[
{"response"-><|
"Label"->"Comment or Question",
"Interpreter"->"TextArea"|>},

SendMail[<|
"To"->{"atg@mit.edu","kkeane@mit.edu"},
"Subject"->"8.01x Week 3 HW Discussion Post",
"Body"->
LTI`getUserID[secret]<>" - "<>LTI`getEmail[secret]<>
" posted : "<>#response|>]&

]

8.01x Mechanics: Kinematics and Dynamics

Bonus (next talk): Research Study