From a53a80cc3f23726a4c4fcf924f0dc7bb0ae6f16e Mon Sep 17 00:00:00 2001 From: Mehal Shah Date: Thu, 23 Mar 2017 17:03:48 -0700 Subject: [PATCH] Fix a couple bugs with organizer view - blank comments should not get bullets - should not include enrollments for pending classes for workshop aggregations --- .../pd/workshop_dashboard/components/survey_results_header.jsx | 2 +- .../api/v1/pd/workshop_organizer_survey_report_controller.rb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/apps/src/code-studio/pd/workshop_dashboard/components/survey_results_header.jsx b/apps/src/code-studio/pd/workshop_dashboard/components/survey_results_header.jsx index 78d061391c840..c3e91dd8b671a 100644 --- a/apps/src/code-studio/pd/workshop_dashboard/components/survey_results_header.jsx +++ b/apps/src/code-studio/pd/workshop_dashboard/components/survey_results_header.jsx @@ -307,7 +307,7 @@ const SurveyResultsHeader = React.createClass({ {question['text']} { thisWorkshop[question['key']].map((answer, j) => { - return ( + return !!(_.trim(answer)) && (
  • {answer}
  • diff --git a/dashboard/app/controllers/api/v1/pd/workshop_organizer_survey_report_controller.rb b/dashboard/app/controllers/api/v1/pd/workshop_organizer_survey_report_controller.rb index 1b8cf677c1b80..844e6cba07b31 100644 --- a/dashboard/app/controllers/api/v1/pd/workshop_organizer_survey_report_controller.rb +++ b/dashboard/app/controllers/api/v1/pd/workshop_organizer_survey_report_controller.rb @@ -13,7 +13,7 @@ def index survey_report[:all_workshops_for_course] = aggregate_for_all_workshops[params[:course]] survey_report[:all_my_workshops_for_course], facilitator_scores = get_score_for_workshops( - ::Pd::Workshop.where(course: params[:course], organizer_id: current_user.id), facilitator_breakdown: true + ::Pd::Workshop.where(course: params[:course], organizer_id: current_user.id).in_state(::Pd::Workshop::STATE_ENDED), facilitator_breakdown: true ) survey_report.merge!(facilitator_scores)