lib.ll_get_parsers

This file contains all parsers that parse information gotten from LearningLocker API calls.

Module Contents

lib.ll_get_parsers.parse_statement_forwarder_id(json)

Extract the statement forwarder id from the post response.

Parameters

json (dict(str, dict(str, str))) – JSON from the post response from LearningLocker.

Returns

The extracted statement forwarder id.

Return type

str

lib.ll_get_parsers.parse_batch_parse_statement_forwarder_id_url(json)

Extract the statement forwarder ids from a batch of statement forwarders.

Parameters

json (list(dict(str, dict(str, str)))) – JSON text to parse.

Returns

List of ids from statement forwarders.

Return type

list(dict(str, str))

lib.ll_get_parsers.parse_quiz_questions(json)

Extract the quiz questions from a LearningLocker statement.

Parameters

json (dict(str, str)) – A LearningLocker statement.

Returns

A dictionary containing the quiz questions.

Return type

dict(int, list(dict(str, str)))

lib.ll_get_parsers.parse_sync_agent_forwarder_id(json)

Extract the sync agent forwarder id from the get response of LearningLocker.

Parameters

json (dict(str, list(dict(str, str))) – JSON statement from the get response.

Returns

The statement forwarder id from the sync agent.

Return type

str

lib.ll_get_parsers.parse_questions_answered(json)

Parse the statement to extract answered questions.

Parameters

json (dict(str, list)) – A statement containing answered questions.

Returns

The question id of the answered question.

Return type

str