Grading API Methods
getAttachedItems()
Returns the list of data of each attached Items.
You would want to use this method so that you can inspect the content of the Items or retrieve a list of Items in the current grading session, for example.
Examples
// Get all the attached Items in the current grading session
gradingApp.getattachedItems();
/* Example return object structure
[
{
items: [
{
reference: 'item-reference',
content: '...'
...
}
],
element: <DOM element>,
sessionId: 'session-uuid',
userId: 'user-id'
},
...
]
*/
Arguments
None.
Return value
Type array[object]
This return the list of object with items, sessionId and userId of each attached Items.
-
items array[object]
An array of Item objects. Each array element specifies one single Item attached to the DOM.
The Item object will have the reference of the Item and the DOM element where it has been attached.
-
sessionId string
The session ID of the attached Item.
-
userId string
The user ID of the attached Item.