From 03069241fe590e49c49e0b948ae8a523f5a0844f Mon Sep 17 00:00:00 2001 From: Eugene Oliveros Date: Wed, 23 Aug 2017 11:56:43 +0800 Subject: [PATCH 1/5] Specify language --- kalite/coachreports/api_views.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/kalite/coachreports/api_views.py b/kalite/coachreports/api_views.py index 4be0bc73d6..2e55b8c835 100644 --- a/kalite/coachreports/api_views.py +++ b/kalite/coachreports/api_views.py @@ -57,7 +57,7 @@ def get_learners_from_GET(request): return FacilityUser.objects.filter(learner_filter & Q(is_teacher=False)).order_by("last_name") -def return_log_type_details(log_type, topic_ids=None): +def return_log_type_details(log_type, topic_ids=None, language=None): fields = ["user", "points", "complete", "completion_timestamp", "completion_counter", "latest_activity_timestamp"] if log_type == "exercise": LogModel = ExerciseLog @@ -75,7 +75,7 @@ def return_log_type_details(log_type, topic_ids=None): return None id_field = obj_id_field.split("__")[0] if topic_ids: - objects = [obj for topic_id in topic_ids for obj in get_topic_contents(topic_id=topic_id, kinds=[log_type.title()])] + objects = [obj for topic_id in topic_ids for obj in get_topic_contents(topic_id=topic_id, kinds=[log_type.title()], language=language)] obj_ids = {obj_id_field: [obj.get("id") for obj in objects]} else: objects = [] @@ -117,7 +117,7 @@ def learner_logs(request): start_date = datetime.datetime.strptime(start_date,'%Y/%m/%d') if start_date else end_date - datetime.timedelta(time_window) for log_type in log_types: - LogModel, fields, id_field, obj_ids, objects = return_log_type_details(log_type, topic_ids) + LogModel, fields, id_field, obj_ids, objects = return_log_type_details(log_type, topic_ids, request.language) log_objects = LogModel.objects.filter(user__in=learners, **obj_ids).values(*fields) if not topic_ids: @@ -192,7 +192,7 @@ def aggregate_learner_logs(request): for log_type in log_types: - LogModel, fields, id_field, obj_ids, objects = return_log_type_details(log_type, topic_ids) + LogModel, fields, id_field, obj_ids, objects = return_log_type_details(log_type, topic_ids, request.language) log_objects = LogModel.objects.filter( user__in=learners, From d787b6ac52f150073de0835a1d63b1c595e061e8 Mon Sep 17 00:00:00 2001 From: Eugene Oliveros Date: Wed, 30 Aug 2017 15:09:28 +0800 Subject: [PATCH 2/5] Fix untranslated strings --- .../coachreports/coach_reports/hbtemplates/landing.handlebars | 2 +- .../coachreports/static/js/coachreports/coach_reports/views.js | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/kalite/coachreports/static/js/coachreports/coach_reports/hbtemplates/landing.handlebars b/kalite/coachreports/static/js/coachreports/coach_reports/hbtemplates/landing.handlebars index 01eb18461c..4f2cb5c011 100644 --- a/kalite/coachreports/static/js/coachreports/coach_reports/hbtemplates/landing.handlebars +++ b/kalite/coachreports/static/js/coachreports/coach_reports/hbtemplates/landing.handlebars @@ -8,7 +8,7 @@ - +

{{#if start_date}}{{ start_date }}{{#if end_date }} → {{ end_date }}{{/if}}{{else}}{{_ "This week" }}{{/if}}

diff --git a/kalite/coachreports/static/js/coachreports/coach_reports/views.js b/kalite/coachreports/static/js/coachreports/coach_reports/views.js index 90ef3a1508..6ca296e555 100644 --- a/kalite/coachreports/static/js/coachreports/coach_reports/views.js +++ b/kalite/coachreports/static/js/coachreports/coach_reports/views.js @@ -321,7 +321,10 @@ var CoachSummaryView = BaseView.extend({ $('#topic-list').multiselect({ + allSelectedText: gettext('All selected'), nonSelectedText: gettext('Default: Overview'), + nSelectedText: gettext('selected'), + filterPlaceholder: gettext('Search'), buttonWidth: '75%', numberDisplayed: 2, maxHeight: 350, From 30182df0bae3dc60568af51ae8c7b927b38f165b Mon Sep 17 00:00:00 2001 From: Eugene Oliveros Date: Wed, 30 Aug 2017 15:17:19 +0800 Subject: [PATCH 3/5] Remove Color Legend and transfer Not attempted --- .../coach_reports/hbtemplates/landing.handlebars | 3 ++- .../hbtemplates/tabular-view.handlebars | 11 ----------- 2 files changed, 2 insertions(+), 12 deletions(-) diff --git a/kalite/coachreports/static/js/coachreports/coach_reports/hbtemplates/landing.handlebars b/kalite/coachreports/static/js/coachreports/coach_reports/hbtemplates/landing.handlebars index 4f2cb5c011..84f96812de 100644 --- a/kalite/coachreports/static/js/coachreports/coach_reports/hbtemplates/landing.handlebars +++ b/kalite/coachreports/static/js/coachreports/coach_reports/hbtemplates/landing.handlebars @@ -51,7 +51,8 @@
  • {{_ "Struggling" }}
  • {{_ "Completed" }}
  • -
  • {{_ "In Progress" }}
  • +
  • {{_ "In Progress" }}
  • +
  • {{_ "Not Attempted" }}
diff --git a/kalite/coachreports/static/js/coachreports/tabular_reports/hbtemplates/tabular-view.handlebars b/kalite/coachreports/static/js/coachreports/tabular_reports/hbtemplates/tabular-view.handlebars index 9db6f87dd6..7789cc232d 100644 --- a/kalite/coachreports/static/js/coachreports/tabular_reports/hbtemplates/tabular-view.handlebars +++ b/kalite/coachreports/static/js/coachreports/tabular_reports/hbtemplates/tabular-view.handlebars @@ -1,15 +1,4 @@
-
-
- -
    -
  • {{_ "In Progress" }}
  • -
  • {{_ "Completed" }}
  • -
  • {{_ "Struggling" }}
  • -
  • {{_ "Not Attempted" }}
  • -
-
-
{{#if learners}} From 266c81b2caf656468cf57ffd06d5ac86829f785d Mon Sep 17 00:00:00 2001 From: Eugene Oliveros Date: Thu, 31 Aug 2017 12:33:22 +0800 Subject: [PATCH 4/5] Use barlegend class instead of legend --- .../coachreports/coach_reports/hbtemplates/landing.handlebars | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kalite/coachreports/static/js/coachreports/coach_reports/hbtemplates/landing.handlebars b/kalite/coachreports/static/js/coachreports/coach_reports/hbtemplates/landing.handlebars index 84f96812de..9816416c60 100644 --- a/kalite/coachreports/static/js/coachreports/coach_reports/hbtemplates/landing.handlebars +++ b/kalite/coachreports/static/js/coachreports/coach_reports/hbtemplates/landing.handlebars @@ -52,7 +52,7 @@
  • {{_ "Struggling" }}
  • {{_ "Completed" }}
  • {{_ "In Progress" }}
  • -
  • {{_ "Not Attempted" }}
  • +
  • {{_ "Not Attempted" }}
  • From 60b3a1a145767a778d04e71c658e8aef51cec780 Mon Sep 17 00:00:00 2001 From: Benjamin Bach Date: Thu, 31 Aug 2017 22:28:02 +0200 Subject: [PATCH 5/5] Bump to 0.17.3 --- docs/installguide/release_notes.rst | 8 ++++++++ kalite/version.py | 2 +- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/docs/installguide/release_notes.rst b/docs/installguide/release_notes.rst index 905001a02c..0935b24c20 100644 --- a/docs/installguide/release_notes.rst +++ b/docs/installguide/release_notes.rst @@ -8,6 +8,14 @@ to read the release notes. upgrading from ``0.16.x`` to ``0.17.x`` is fine - but upgrading from ``0.15.x`` to ``0.17.x`` is not guaranteed to work. +0.17.3 +------ + +Bug fixes +^^^^^^^^^ + + * Remaining content titles and message IDs in Coach Reports translated :url-issue:`5511` :url-issue:`5509` + 0.17.2 ------ diff --git a/kalite/version.py b/kalite/version.py index 2ba8934974..d624ffec2d 100644 --- a/kalite/version.py +++ b/kalite/version.py @@ -3,7 +3,7 @@ # Must also be of the form N.N.N for internal use, where N is a non-negative integer MAJOR_VERSION = "0" MINOR_VERSION = "17" -PATCH_VERSION = "2" +PATCH_VERSION = "3" VERSION = "%s.%s.%s" % (MAJOR_VERSION, MINOR_VERSION, PATCH_VERSION) SHORTVERSION = "%s.%s" % (MAJOR_VERSION, MINOR_VERSION)