Skip to content

Commit defbe7c

Browse files
cawerkenthinbrianjmiller
authored andcommitted
Fix RetreiveState, add VoidStatement
Return value from RetrieveState() did not include the fetched document. Added VoidStatement() method.
1 parent c87d741 commit defbe7c

1 file changed

Lines changed: 18 additions & 0 deletions

File tree

TinCan/RemoteLRS.cs

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -524,6 +524,23 @@ public StatementsResultLRSResponse MoreStatements(StatementsResult result)
524524

525525
return r;
526526
}
527+
528+
public StatementLRSResponse VoidStatement(Guid id, Agent agent)
529+
{
530+
var voidStatement = new Statement
531+
{
532+
actor = agent,
533+
verb = new Verb
534+
{
535+
id = new Uri("http://adlnet.gov/expapi/verbs/voided"),
536+
display = new LanguageMap()
537+
},
538+
target = new StatementRef { id = id }
539+
};
540+
voidStatement.verb.display.Add("en-US", "voided");
541+
542+
return SaveStatement(voidStatement);
543+
}
527544

528545
// TODO: since param
529546
public ProfileKeysLRSResponse RetrieveStateIds(Activity activity, Agent agent, Nullable<Guid> registration = null)
@@ -567,6 +584,7 @@ public StateLRSResponse RetrieveState(String id, Activity activity, Agent agent,
567584
return r;
568585
}
569586
r.success = true;
587+
r.content = state;
570588

571589
return r;
572590
}

0 commit comments

Comments
 (0)