Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Standardize column names in csv exports #3011

Merged
merged 8 commits into from
Aug 26, 2021

Conversation

TimonDB
Copy link
Contributor

@TimonDB TimonDB commented Aug 23, 2021

This pull request implements a more consistent csv header format that at least contains the columns id, username, last_name, first_name, email and labels.

Closes #2801.

@TimonDB TimonDB marked this pull request as ready for review August 23, 2021 19:53
@TimonDB TimonDB requested a review from a team as a code owner August 23, 2021 19:53
@TimonDB TimonDB requested review from bmesuere and niknetniko and removed request for a team August 23, 2021 19:53
Copy link
Member

@chvp chvp left a comment

Choose a reason for hiding this comment

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

Scoresheet csv's should also be updated.

Copy link
Member

@niknetniko niknetniko left a comment

Choose a reason for hiding this comment

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

I think we need to standardize more:

  • The series/course export use User.human_attribute_name for some column names, meaning they are translated and converted to "human" names, but not for all columns (e.g. labels).
  • The export and evaluation exports don't use the human_attribute stuff, so there the labels are as they are in the source code.

For example, the columns in the series export in Dutch are:
"Id","Gebruikersnaam","Voornaam","Familienaam","Email","labels","Reeks 7", ...
While the grade export is:
"id","username","last_name","first_name","full_name","email","labels","Total Score", ...

@chvp chvp added the enhancement A change that isn't substantial enough to be called a feature label Aug 24, 2021
@TimonDB
Copy link
Contributor Author

TimonDB commented Aug 25, 2021

I think we need to standardize more:

  • The series/course export use User.human_attribute_name for some column names, meaning they are translated and converted to "human" names, but not for all columns (e.g. labels).
  • The export and evaluation exports don't use the human_attribute stuff, so there the labels are as they are in the source code.

So should we omit the User.human_attribute_name to make it consistent with the other CSV exports? Or use User.human_attribute_name everywhere?

@TimonDB TimonDB requested review from niknetniko and chvp August 25, 2021 11:15
@@ -192,15 +192,18 @@ def scoresheet
format.js
format.json
format.csv do
sheet = CSV.generate do |csv|
csv << [I18n.t('series.scoresheet.explanation')]
Copy link
Member

Choose a reason for hiding this comment

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

I don't think this and the other explanation string are used in other places, so they can be removed from the locales files.

@bmesuere bmesuere merged commit b6c510e into develop Aug 26, 2021
@bmesuere bmesuere deleted the feature/standardize-columns-csv-exports branch August 26, 2021 07:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement A change that isn't substantial enough to be called a feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Standardize columns csv exports
4 participants