pwcoleman / tincanruby Goto Github PK
View Code? Open in Web Editor NEWTin Can ruby client library
License: MIT License
Tin Can ruby client library
License: MIT License
Am attempting to pass a statement for an activity with name and decription, including a result
agent = TinCanApi::Agent.new(mbox: 'mailto:[email protected]')
verb = TinCanApi::Verb.new(id: 'http://adlnet.gov/expapi/verbs/completed', name: 'completed')
object = TinCanApi::Activity.new(id: "https://somelms/quizzes/numerical-reasoning",
name: 'Numerical Reasoning',
type: 'http://adlnet.gov/expapi/activities/assessment',
description: 'Numerical ability tests are used to establish a candidate’s ability to read and understand the information presented in numerical form and then use the correct and most effective operations to find the right answer. Although it is senior-school level maths, you will still need to be efficient and well-practiced.',
extensions: { "http://id.tincanapi.com/extension/planned-duration" => 'PT20M' }
)
result = TinCanApi::Result.new(
response: 'Passed',
score: {min: 0, raw: 1, max: 2},
success: true,
extensions: {"https://somelms/quizzes/numerical-reasoning" => [
'Xavier calls each of his employees on Monday mornings. He speaks to John second, Henry third, Joanna fifth and Layla sixth. Based on the information above, which of the following statements CANNOT be true?',
'Lola lives in the United States of America but visits Canada twice a year, bringing her three dogs with her. She needs to buy new insurance for her dogs. Which plan is the best for Lola’s needs?'
]})
statement = TinCanApi::Statement.new do |s|
s.actor = agent
s.verb = verb
s.object = object
s.result = result
end
response = remote_lrs.save_statement(statement)
Can somebody help with the correct syntax to make the above calls.
When serializing Statements in RemoteLRS, the latest_version
is always used, regardless of the version
provided in the initializer.
This repo seems to be relatively unmaintained, but in case it helps the next person 🤷 here ya go!
Any advice on how to add interactions specifically choices to the Activity Definition model class to create the following activity definition
"definition": {
"description": {
"en-US": "Which of these prototypes are available at the beta site?"
},
"type": "http://adlnet.gov/expapi/activities/cmi.interaction",
"interactionType": "choice",
"correctResponsesPattern": [
"golf[,]tetris"
],
"choices": [
{
"id": "golf",
"description": {
"en-US": "Golf Example"
}
},
{
"id": "facebook",
"description": {
"en-US": "Facebook App"
}
},
{
"id": "tetris",
"description": {
"en-US": "Tetris Example"
}
},
{
"id": "scrabble",
"description": {
"en-US": "Scrabble Example"
}
}
]
}
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.