Skip to content

Commit

Permalink
Only show a sample of the students with unposted assignments
Browse files Browse the repository at this point in the history
  • Loading branch information
joelostblom committed Sep 30, 2022
1 parent 2ab4899 commit c165c5a
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 10 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ Note that major version zero (0.y.z) is for initial development and anything may
- Filter out unpublished assignment and those missing a max score.
- Put assignment titles on top of plots instead of to the left.
- Maintain assignment order from Canvas in all visualizations.
- Only show a sample of the students with unposted assignments.

### Fixed
- Make rounding work with dfs containing None instead of NaN
Expand Down
25 changes: 15 additions & 10 deletions canvascli/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -405,18 +405,23 @@ def get_canvas_grades(self):
'Remember to post all assignments on Canvas'
'\nbefore creating the CSV-file to upload to the FSC.'
'\nThere are currently unposted Canvas assignments'
'\nthat would change the final score of the following students:\n'
)
click.echo(
self.canvas_grades
.query(
'@different_unposted_score == True'
)
.to_markdown(
index=False
)
students_with_unposted_score = self.canvas_grades.query(
'@different_unposted_score == True'
)
if students_with_unposted_score.shape[0] > 10:
click.echo(
'that would change the final score of '
+ click.style(f'{students_with_unposted_score.shape[0]} students.', bold=True)
)
click.echo()
click.echo('Showing the first 10 here:\n')
click.echo(students_with_unposted_score[:10].to_markdown(index=False))
else:
click.echo(
'that would change the final score of the following '
+ click.style(f'{students_with_unposted_score.shape[0]} students:\n', bold=True)
)
click.echo(students_with_unposted_score.to_markdown(index=False))
return

def drop_student_entries(self):
Expand Down

0 comments on commit c165c5a

Please sign in to comment.