Skip to content

Commit

Permalink
Support for rich outcomes
Browse files Browse the repository at this point in the history
  • Loading branch information
Greg McFall committed Dec 2, 2013
1 parent 48942de commit 4398454
Show file tree
Hide file tree
Showing 11 changed files with 3,158 additions and 1,170 deletions.
23 changes: 23 additions & 0 deletions examples/lti/src/main/resources/rdf/LineItem/context.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
mediaType=application/vnd.ims.lis.v2.lineitem+json
mediaTypeURI=http://www.imslobal.org/lti/v2p0/media/application/vnd/ims/lis/v2/lineitem+json/index.html
rdfType=http://purl.imsglobal.org/vocab/lis/v2/outcomes#LineItem
contextURI=http://purl.imsglobal.org/ctx/lis/v2/LineItem
contextRef=[LIS-v2-LineItem]

expandedValue=http://purl.imsglobal.org/vocab/lis/v2/outcomes#resultScore

LineItem.excludes=http://purl.imsglobal.org/vocab/lis/v2/outcomes#result

idref=\
http://purl.imsglobal.org/vocab/lis/v2/outcomes#results \
http://purl.imsglobal.org/vocab/lis/v2/outcomes#assessmentContext \
http://purl.imsglobal.org/vocab/lis/v2/outcomes#associatedActivity

abstract= \
This specification defines a JSON-LD representation of an LIS LineItem object.

introduction= \
This specification defines a JSON-LD representation of an LIS LineItem object.



17 changes: 17 additions & 0 deletions examples/lti/src/main/resources/rdf/LineItem/sample.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{
"@context" : "http://purl.imsglobal.org/ctx/lis/v2/LineItem",
"@type" : "LineItem",
"@id" : "http://tc.example.com/resources/LineItem/13702",
"assessmentContext" : "http://server.example.com/resources/section/85426",
"scoreConstraints" : {
"@type" : "NumericLimits",
"normalMaximum" : 100,
"extraCreditMaximum" : 10,
"totalMaximum" : 110
},
"assessedActivity" : {
"@id" : "http://tp.example.com/resources/assessment/66400"
},
"results" : "http://tc.example.com/resources/LineItem/13702/results",
"label" : "Chapter 5 Test"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
mediaType=application/vnd.ims.lis.v2.lineitem+json
status=IMS Public Draft
methods=GET POST PUT DELETE
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
mediaType=application/vnd.ims.lis.v2.resultcontainer+json
rdfType=http://purl.imsglobal.org/vocab/lis/v2/outcomes#ResultContainer
contextURI=http://purl.imsglobal.org/ctx/lis/v2/outcomes/ResultContainer
contextRef=[LIS, 14 RC]
title=ResultContainer in the <code>application/vnd.ims.lis.v2.resultcontainer+json</code> format.

status=IMS Working Draft

abstract= \
In the IMS LIS standard, a ResultContainer defines the endpoint to which clients \n\
POST new Result resources and from which they GET the list of Results associated with a \n\
a given LineItem. This specification document describes a media type suitable for \n\
the response to a GET request. The response is based on the W3C Linked Data Platform recommendations. \n\

idref=\
http://www.w3.org/ns/ldp#nextPage

LineItem.includes=\
http://purl.imsglobal.org/vocab/lis/v2/outcomes#result



29 changes: 29 additions & 0 deletions examples/lti/src/main/resources/rdf/ResultContainer/sample.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
{
"@context" : "http://purl.imsglobal.org/ctx/lis/v2/outcomes/ResultContainer",
"@type" : "Page",
"@id" : "http://tc.example.com/resources/LineItem/94188/results?firstPage",
"nextPage" : "http://tc.example.com/resources/LineItem/94188/results?p=2",
"pageOf" : {
"@type" : "ResultContainer",
"membershipSubject" :
{ "@id" : "http://tc.example.com/resources/LineItem/94188",
"result" : [
{ "@id" : "http://tc.example.com/resources/LineItem/94188/results/923937",
"comment" : "Nice work!",
"normalScore" : 85,
"penalty" : 0,
"totalScore" : 88,
"extraCreditScore" : 3,
"curvedScore" : 96
},
{ "@id" : "http://tc.example.com/resources/LineItem/94188/results/9237264",
"comment" : "Please come see me.",
"normalScore" : 42,
"penalty" : 10,
"totalScore" : 52,
"extraCreditScore" : 0,
"curvedScore" : 61
}
]
}
}
160 changes: 154 additions & 6 deletions examples/lti/src/main/resources/rdf/liso.ttl
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
@prefix liso: <http://purl.imsglobal.org/vocab/lis/v2/outcomes#> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
@prefix liscm: <http://purl.imsglobal.org/vocab/lis/v2/cm#> .
@prefix exp: <http://purl.imsglobal.org/vocab/lis/v2/experience#> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@prefix ldp: <http://www.w3.org/ns/ldp#> .
@prefix owl: <http://www.w3.org/2002/07/owl#> .
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@prefix bind: <http://purl.org/semantictools/v1/vocab/bind#> .

<http://purl.imsglobal.org/vocab/lis/v2/outcomes#> a owl:Ontology ;
Expand All @@ -17,18 +20,163 @@ liso:Result rdf:type owl:Class;
rdfs:comment "A comment about this Result suitable for display to the learner. Typically, this is a comment made by the instructor or grader."
] ,
[ a owl:Restriction ;
owl:onProperty liso:resultScore;
rdfs:comment "The score that the Learner received for engaging in some activity or submitting an assignment."
owl:onProperty liso:normalScore;
rdfs:comment "The score earned by the learner before adding extra credit or subtracting penalties."
] ,
[ a owl:Restriction ;
owl:onProperty liso:extraCreditScore;
rdfs:comment "The number of exta credit points earned by the learner."
] ,
[ a owl:Restriction ;
owl:onProperty liso:penalty;
rdfs:comment "The number of points deducted from the normal score due to some penalty such as submitting an assignment after the due date."
] ,
[ a owl:Restriction ;
owl:onProperty liso:totalScore;
rdfs:comment """The total score on the assignment given by
<pre>
totalScore = normalScore + extraCreditScore - penalty
</pre>
This value does not take into account the effects of curving.
"""
] ,
[ a owl:Restriction ;
owl:onProperty liso:curvedScore;
rdfs:comment "The final score received by the learner after curving has been applied. If the <code>curvedScore</code> is omitted, the result has not been curved and the <code>totalScore</code> is the final score."
] ;
rdfs:comment "An object that holds the result of some scorable activity or assignment." .

liso:LineItem rdf:type owl:Class;
rdfs:subClassOf
[ a owl:Restriction ;
owl:onProperty rdfs:label;
owl:maxCardinality 1
] ,
[ a owl:Restriction ;
owl:onProperty liso:assessmentContext;
rdfs:comment "The context in which the assessment occurred. Typically this is a course section, but it may be any kind of learning context."
] ,
[ a owl:Restriction ;
owl:onProperty liso:result;
rdfs:comment "A result associated with this LineItem."
] ,
[ a owl:Restriction ;
owl:onProperty liso:results;
owl:minCardinality 1;
rdfs:comment "The container holding the Results for this LineItem. This property is <em>read-only</em>; it should not be supplied in POST or PUT requests."
] .

liso:ScoreConstraints rdf:type owl:Class ;
rdfs:comment "The abstract base class for all the various kinds of constraints that might be imposed on the Results associated with a LineItem." .

liso:NumericLimits rdf:type owl:Class ;
rdfs:subClassOf liso:ScoreConstraints ,
[ a owl:Restriction ;
owl:onProperty liso:normalMaximum;
rdfs:comment "The maximum number of points that a learner may earn without extra credit."
] ,
[ a owl:Restriction ;
owl:onProperty liso:extraCreditMaximum;
rdfs:comment "The maximum number of extra credit points that a learner may earn."
] ,
[ a owl:Restriction ;
owl:onProperty liso:totalMaximum;
rdfs:comment """The maximum number of points that a learner may earn. This value is given by
<pre>
totalMaximum = normalMaximum + extraCreditMaximum
</pre>"""
] ;
rdfs:comment "Defines the maximum values for numerical scores." .

liso:ResultContainer rdf:type owl:Class ;
rdfs:subClassOf ldp:Container ,
[ a owl:Restriction ;
owl:onProperty ldp:membershipPredicate;
owl:hasValue liso:result
] ,
[ a owl:Restriction ;
owl:onProperty ldp:membershipSubject;
owl:allValuesFrom liso:LineItem
] ;
rdfs:comment "A container that holds the result of some scorable activity or assignment." .
rdfs:comment "A container that holds a collection of Result resources." .

liso:LineItemContainer rdf:type owl:Class ;
rdfs:subClassOf ldp:Container ;
rdfs:comment "A container that holds a collection of LineItem resources." .

liso:comment rdf:type owl:FunctionalProperty ;
rdfs:domain liso:Result ;
rdfs:range xsd:string ;
rdfs:comment "A comment about this Result suitable for display to the learner. Typically, this is a comment made by the instructor or grader." .

liso:resultScore rdf:type owl:FunctionalProperty ;
liso:normalScore rdf:type owl:FunctionalProperty ;
rdfs:domain liso:Result ;
rdfs:range xsd:float ;
rdfs:comment "The score earned by the learner before adding extra credit or subtracting penalties." .

liso:extraCreditScore rdf:type owl:FunctionalProperty ;
rdfs:domain liso:Result ;
rdfs:range xsd:float ;
rdfs:comment "The number of exta credit points earned by the learner." .

liso:penalty rdf:type owl:FunctionalProperty ;
rdfs:domain liso:Result ;
rdfs:range xsd:float ;
rdfs:comment "The number of points deducted from the normal score due to some penalty such as submitting an assignment after the due date." .

liso:totalScore rdf:type owl:FunctionalProperty ;
rdfs:domain liso:Result ;
rdfs:range xsd:float ;
rdfs:comment "The score that the Learner received for engaging in some activity or submitting an assignment." .
rdfs:comment """The total score on the assignment given by
<pre>
totalScore = normalScore + extraCreditScore - penalty
</pre>
This value does not take into account the effects of curving.
""" .

liso:curvedScore rdf:type owl:FunctionalProperty ;
rdfs:domain liso:Result ;
rdfs:range xsd:float ;
rdfs:comment "The final score received by the learner after curving has been applied. If the <code>curvedScore</code> is omitted, the result has not been curved and the <code>totalScore</code> is the final score." .

liso:assessmentContext rdf:type owl:FunctionalProperty ;
rdfs:domain liso:LineItem ;
rdfs:range liscm:Context ;
rdfs:comment "The context in which the assessment occurred. Typically this is a course section, but it may be any kind of learning context." .

liso:assessedActivity rdf:type owl:FunctionalProperty ;
rdfs:domain liso:LineItem ;
rdfs:range exp:Activity .

liso:scoreConstraints rdf:type owl:FunctionalProperty ;
rdfs:domain liso:LineItem ;
rdfs:range liso:ScoreConstraints .

liso:result rdf:type rdf:Property ;
rdfs:domain liso:LineItem ;
rdfs:range liso:Result ;
rdfs:comment "A result associated with this LineItem." .

liso:results rdf:type owl:FunctionalProperty ;
rdfs:domain liso:LineItem ;
rdfs:range liso:ResultContainer ;
rdfs:comment "The container holding the Results for this LineItem. This property is <em>read-only</em>; it should not be supplied in POST or PUT requests." .

liso:normalMaximum rdf:type owl:FunctionalProperty ;
rdfs:domain liso:NumericLimits ;
rdfs:range xsd:float ;
rdfs:comment "The maximum number of points that a learner may earn without extra credit." .

liso:extraCreditMaximum rdf:type owl:FunctionalProperty ;
rdfs:domain liso:NumericLimits ;
rdfs:range xsd:float ;
rdfs:comment "The maximum number of extra credit points that a learner may earn." .

liso:totalMaximum rdf:type owl:FunctionalProperty ;
rdfs:domain liso:NumericLimits ;
rdfs:range xsd:float ;
rdfs:comment """The maximum number of points that a learner may earn. This value is given by
<pre>
totalMaximum = normalMaximum + extraCreditMaximum
</pre>""" .

24 changes: 22 additions & 2 deletions examples/lti/src/main/resources/rdf/liso_binding.ttl
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,29 @@
@prefix liso: <http://purl.imsglobal.org/vocab/lis/v2/outcomes#> .

liso:Result rdf:type bind:Addressable .
liso:Result rdfs:subClassOf
liso:LineItem rdf:type bind:Addressable .
liso:LineItem rdfs:subClassOf
[ rdf:type bind:AssociationQualifier ;
bind:onProperty liso:resultScore ;
bind:onProperty liso:assessmentContext ;
bind:inverseAssociationType bind:Composition
],
[ rdf:type bind:AssociationQualifier ;
bind:onProperty liso:assessedActivity ;
bind:associationType bind:Aggregation
],
[ rdf:type bind:AssociationQualifier ;
bind:onProperty liso:scoreConstraints ;
bind:associationType bind:Aggregation
],
[ rdf:type bind:AssociationQualifier ;
bind:onProperty liso:result ;
bind:associationType bind:Composition
],
[ rdf:type bind:AssociationQualifier ;
bind:onProperty liso:results ;
bind:associationType bind:Composition
] .
liso:ScoreConstraints rdf:type bind:Addressable .
liso:ScoreConstraints rdf:type bind:AbstractClass .
liso:NumericLimits rdf:type bind:Addressable .

20 changes: 11 additions & 9 deletions examples/lti/src/main/resources/rdf/lti.ttl
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
@prefix owl: <http://www.w3.org/2002/07/owl#> .
@prefix lti-type: <http://purl.imsglobal.org/xsd/lti/v2/ltid#> .
@prefix liso: <http://purl.imsglobal.org/vocab/lis/v2/outcomes#> .
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@prefix bind: <http://purl.org/semantictools/v1/vocab/bind#> .
Expand Down Expand Up @@ -205,7 +206,6 @@ lti:ProductProfile rdf:type owl:Class;
rdfs:subClassOf
[ a owl:Restriction ;
owl:onProperty lti:lti_version;
owl:allValuesFrom xsd:normalizedString;
owl:minCardinality 1;
rdfs:comment "The identifier for an LTI version that the version supports. A given product (Tool or Tool Consumer) may support multiple versions, but only one version is selected for use in the integration contract."
] ,
Expand Down Expand Up @@ -475,7 +475,6 @@ lti:ToolProxy rdf:type owl:Class ;
rdfs:subClassOf lti:ToolSettingsContainer ,
[ a owl:Restriction ;
owl:onProperty lti:lti_version;
owl:allValuesFrom xsd:token;
owl:minCardinality 1;
rdfs:comment "The LTI version that governs the integration between the Tool and ToolConsumer. "
] ,
Expand Down Expand Up @@ -516,6 +515,10 @@ lti:LtiLink rdf:type owl:Class ;
owl:onProperty lti:resource_link_id;
owl:minCardinality 1;
rdfs:comment "A globally unique identifier for this LTI link."
] ,
[ a owl:Restriction ;
owl:onProperty lti:lineItem;
rdfs:comment "A LineItem associated with this LtiLink. Scores on the assignment launched from this link should be recorded in the ResultContainer belonging to this LineItem."
] ;
rdfs:comment "An <code>LtiLink</code> represents a link within the Tool Consumer system pointing to a resource within the Tool Provider." .

Expand Down Expand Up @@ -749,13 +752,7 @@ lti:lti_version rdf:type owl:FunctionalProperty ;
lti:ToolProxy
)
] ;
rdfs:range [
rdf:type owl:Class ;
owl:unionOf (
xsd:normalizedString
xsd:token
)
] ;
rdfs:range xsd:token ;
rdfs:comment "The identifier for an LTI version that the version supports. A given product (Tool or Tool Consumer) may support multiple versions, but only one version is selected for use in the integration contract." .

lti:service_offered rdf:type rdf:Property ;
Expand Down Expand Up @@ -966,6 +963,11 @@ lti:resource_link_id rdf:type owl:FunctionalProperty ;
rdfs:range lti-type:GUID.Type ;
rdfs:comment "A globally unique identifier for this LTI link." .

lti:lineItem rdf:type owl:FunctionalProperty ;
rdfs:domain lti:LtiLink ;
rdfs:range liso:LineItem ;
rdfs:comment "A LineItem associated with this LtiLink. Scores on the assignment launched from this link should be recorded in the ResultContainer belonging to this LineItem." .

lti:id rdf:type owl:FunctionalProperty ;
rdfs:domain lti:Context ;
rdfs:range xsd:normalizedString .
Expand Down
5 changes: 5 additions & 0 deletions examples/lti/src/main/resources/rdf/lti_binding.ttl
Original file line number Diff line number Diff line change
Expand Up @@ -210,6 +210,11 @@ lti:ToolProxyBinding rdfs:subClassOf
bind:associationType bind:Aggregation
] .
lti:LtiLink rdf:type bind:Addressable .
lti:LtiLink rdfs:subClassOf
[ rdf:type bind:AssociationQualifier ;
bind:onProperty lti:lineItem ;
bind:associationType bind:Aggregation
] .
lti:Context rdf:type bind:Addressable .
lti:ToolSettingsContainer rdfs:subClassOf
[ rdf:type bind:AssociationQualifier ;
Expand Down
3 changes: 3 additions & 0 deletions examples/lti/src/main/resources/rdf/xmlDatatypes.ttl
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
@prefix owl: <http://www.w3.org/2002/07/owl#> .
@prefix bind: <http://purl.org/semantictools/v1/vocab/bind#> .

<http://purl.imsglobal.org/xsd/lti/v2/ltid#> a owl:Ontology ;
bind:suggestedPrefix "lti-type" .

Loading

0 comments on commit 4398454

Please sign in to comment.