Skip to content

Move city and country fields to the very end. - #12475

Merged
cahrens merged 1 commit into
rc/2016-05-17from
christina/fix-column-order
May 16, 2016
Merged

Move city and country fields to the very end.#12475
cahrens merged 1 commit into
rc/2016-05-17from
christina/fix-column-order

Conversation

@cahrens

@cahrens cahrens commented May 16, 2016

Copy link
Copy Markdown

OSPR-1155

@dianakhuang and @efischer19 please review. Here is a sandbox with teams and cohorts both enabled on the demo course: https://reportfix.sandbox.edx.org/courses/course-v1:edX+DemoX+Demo_Course/instructor#view-data_download

FYI @doctoryes and @regisb

Test that some minimum of information is formatted
correctly in the response to get_students_features.
"""
for student in self.students:

@cahrens cahrens May 16, 2016

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When I was making the code modification below, I first deleted city and country and then ran the test modified in the original PR (#11620). I was disappointed to see that no tests failed because the method being tested wasn't the "get_students_features" method-- it was instead a utility method to convert the value to something that could be returned to get_students_features. Therefore I added this test as well (verifying that it fails if City and Country aren't added in get_students_features).

Note though that this test is going through the JSON (non-CSV) code path, and therefore I can't test that City and Country are at the end. I don't see any existing tests that are generating the CSV file and looking at its contents, probably because of the complication with the celery instructor task-- there is only coverage that the instructor task is kicked off via a mock. I don't think it is worth tackling that sort of integration test, but can reconsider if reviewers disagree.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree with the decision that it's not worth tackling that sort of integration test.

@efischer19

Copy link
Copy Markdown
Contributor

👍 Everything looks okay to me.

Worth noting - we had the None versus <empty string> discussion on the original PR, and with team/cohort enabled there's also the possibility of [unassigned] and [unavailable]. Should we make a ticket about standardizing the "no data available" placeholder on this report? This is still something that existed prior to this PR so there's no need to block this merge, but wanted to raise the point.

screen shot 2016-05-16 at 11 41 19 am

@dianakhuang

Copy link
Copy Markdown
Contributor

👍

@cahrens

cahrens commented May 16, 2016

Copy link
Copy Markdown
Author

@efischer19 Hah! I hadn't noticed that, but it is true that pretty much every column has its own special way of indicating "unset". I agree it would be nice to standardize, but then it is a compatibility issue-- something to consider though.

@cahrens

cahrens commented May 16, 2016

Copy link
Copy Markdown
Author

@efischer19's screen shot scared me because City and Country were both showing as empty in the CSV (I had only tried the "List profile information inline" option). However, restarting the celery workers fixed the issue.

image

@cahrens
cahrens merged commit 01c8d9b into rc/2016-05-17 May 16, 2016
@cahrens
cahrens deleted the christina/fix-column-order branch May 16, 2016 15:52
@catong

catong commented May 16, 2016

Copy link
Copy Markdown
Contributor

@cahrens Under what circumstances might City show with value of "None" in some cases and blank in others?
studentprofilereport

@cahrens

cahrens commented May 16, 2016

Copy link
Copy Markdown
Author

@catong This must be an issue with funky user data on stage (note the same pattern for other fields like "Level of Education" and "Goals"). It should always be "None".

@catong

catong commented May 16, 2016

Copy link
Copy Markdown
Contributor

OK, thanks for confirming.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants