Skip to content

Commit

Permalink
Merge pull request #5513 from learningequality/0.17.x
Browse files Browse the repository at this point in the history
0.17.x into master
  • Loading branch information
benjaoming authored Aug 31, 2017
2 parents de57a2b + 60b3a1a commit d34eaa6
Show file tree
Hide file tree
Showing 6 changed files with 19 additions and 18 deletions.
8 changes: 8 additions & 0 deletions docs/installguide/release_notes.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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
------
Expand Down
8 changes: 4 additions & 4 deletions kalite/coachreports/api_views.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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 = []
Expand Down Expand Up @@ -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:
Expand Down Expand Up @@ -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,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<select id="topic-list" multiple="multiple">
</select>
</div>
<button id="topic-list-submit" type="button" class="btn btn-primary btn-md">Submit</button>
<button id="topic-list-submit" type="button" class="btn btn-primary btn-md">{{_ "Submit" }}</button>
</div>
</div>
<h3>{{#if start_date}}{{ start_date }}{{#if end_date }}{{ end_date }}{{/if}}{{else}}{{_ "This week" }}{{/if}}</h3>
Expand Down Expand Up @@ -51,7 +51,8 @@
<ul id="legend">
<li class="barlegend"><div class="struggling"></div><span>{{_ "Struggling" }}</span></li>
<li class="barlegend"><div class="complete"></div><span>{{_ "Completed" }}</span></li>
<li class="barlegend"><div class="partial"></div><span>{{_ "In Progress" }}</span></li>
<li class="barlegend"><div class="partial"></div><span>{{_ "In Progress" }}</span></li>
<li class="barlegend"><div class="not-attempted"></div><span>{{_ "Not Attempted" }}</span></li>
</ul>
</div>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,15 +1,4 @@
<div>
<div class="row">
<div class="col-md-6 col-xs-12">
<label id="legendMargin" for="legend">{{_ "Color legend"}}</label>
<ul id="legend">
<li class="legend"><div class="partial"></div><span>{{_ "In Progress" }}</span></li>
<li class="legend"><div class="complete"></div><span>{{_ "Completed" }}</span></li>
<li class="legend"><div class="struggling"></div><span>{{_ "Struggling" }}</span></li>
<li class="legend"><div class="not-attempted"></div><span>{{_ "Not Attempted" }}</span></li>
</ul>
</div>
</div>
<div class="row">
<div class="col-md-12">
{{#if learners}}
Expand Down
2 changes: 1 addition & 1 deletion kalite/version.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down

0 comments on commit d34eaa6

Please sign in to comment.