From ace525dd0c65e0ac9790cd34c4ec50940361801e Mon Sep 17 00:00:00 2001 From: Ali-D-Akbar Date: Mon, 24 Aug 2020 15:24:24 +0500 Subject: [PATCH] add logs in get_problem_responses --- .../instructor/ProblemBrowser/data/actions/problemResponses.js | 2 +- lms/djangoapps/instructor/views/api.py | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/lms/djangoapps/instructor/static/instructor/ProblemBrowser/data/actions/problemResponses.js b/lms/djangoapps/instructor/static/instructor/ProblemBrowser/data/actions/problemResponses.js index a129340767..5f09b4ba12 100644 --- a/lms/djangoapps/instructor/static/instructor/ProblemBrowser/data/actions/problemResponses.js +++ b/lms/djangoapps/instructor/static/instructor/ProblemBrowser/data/actions/problemResponses.js @@ -79,7 +79,7 @@ const createProblemResponsesReportTask = ( }) .then( json => dispatch(getTaskStatus(taskStatusEndpoint, json.task_id)), - () => dispatch(problemResponsesFailure(gettext('Unable to submit request to generate report.'))), + err => dispatch(problemResponsesFailure(gettext('Unable to submit request to generate report.'))), // eslint-disable-line no-unused-vars ); }; diff --git a/lms/djangoapps/instructor/views/api.py b/lms/djangoapps/instructor/views/api.py index 904d8dfe7d..3dba30c9a1 100644 --- a/lms/djangoapps/instructor/views/api.py +++ b/lms/djangoapps/instructor/views/api.py @@ -1055,6 +1055,7 @@ def get_problem_responses(request, course_id): for problem_location in problem_locations.split(','): problem_key = UsageKey.from_string(problem_location).map_into_course(course_key) except InvalidKeyError: + log.exception("ProblemResponsesError: Location: %s", problem_locations) return JsonResponseBadRequest(_("Could not find problem with this location.")) task = task_api.submit_calculate_problem_responses_csv(