assistants.feedback_manager

All the logic about giving feedback.

Module Contents

assistants.feedback_manager.get_questions_feedback(params, questions)

Get the message that needs to be sent to the student, when they should receive question feedback.

Parameters
  • params (dict(str, str)) – Info about the attempt.

  • question_feedback (bool) – Whether or not there needs to be feedback on specific questions.

  • questions (dict(int, dict(str, str))) – Questions and whether they are answered correctly or not.

Returns

The message that needs to be sent.

Return type

str

assistants.feedback_manager.get_quiz_feedback(params, action)

Quiz feedback that needs to be sent to the student.

Parameters
  • params (dict(str, str)) – Info about the students attempt.

  • action (Assistant) – The agents variables.

Returns

Message that needs to be sent to the Student.

Return type

str

Make a feedback string for the completed quiz feedback based on the content or subject linked to the quiz.

Parameters

quiz_id (int) – Id from the quiz.

Returns

A message that contains the feedback.

Return type

str

Generate the link that is sent to the student.

Parameters

questions (dict(int, dict(str, str))) – Attempt its questions and whether they are correctly answered or not.

Returns

The message that needs to be sent, including HTML.

Return type

str

assistants.feedback_manager.build_completed_quiz_feedback(actor_name, quiz_name, course_name, score, feedback)

Build the feedback when an user has completed the quiz and has failed the quiz.

Parameters
  • actor_name (str) – Name of the user that has completed the quiz.

  • quiz_name (str) – Name of the quiz.

  • course_name (str) – Name of the course.

  • score (int) – Result of the user.

  • feedback (str) – String with the feedback.

Returns

String of the message.

Return type

str

assistants.feedback_manager.build_completed_questions_feedback(actor_name, quiz_name, course_name, score, feedback)

Build the feedback when an user has completed the quiz and has failed the quiz.

Parameters
  • actor_name (str) – Name of the user that has completed the quiz.

  • quiz_name (str) – Name of the quiz.

  • course_name (str) – Name of the course.

  • score (str) – Result of the user.

  • feedback (str) – String with the feedback.

Returns

String of the message.

Return type

str