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

Complete 'Add Grade Dialog' #1456

Merged
merged 36 commits into from
Apr 17, 2024
Merged

Complete 'Add Grade Dialog' #1456

merged 36 commits into from
Apr 17, 2024

Conversation

nilsreichardt
Copy link
Member

@nilsreichardt nilsreichardt commented Apr 15, 2024

Description

This PR completes the grade dialog to enter a new grade.

The dialog has the following "smart" features:

  • When the dialog is opened, the active term is selected.
  • If the user selects a grading system that is not the grading system of the term, the Take Grade Into Account switch is disabled (and a note is displayed).
  • When changing the term, the grading system of the newly selected term will be used (if the grade value is empty).
  • When changing the grade type, the title will be set to the display name of the grade type if the title isn't the display name of the previous grade type.

Demo

v.mp4
Screen.Recording.2024-04-17.at.10.36.46.mov

Open questions

  • When the user enters a grade (e.g. "1+") and changes the grade system (e.g. to "15 - 0 Punkte"), should we clear the grade value field?

Things for later

  • Add tests (the controller has so much logic, you can easily write ~50 tests for it) -> ideally we add this before we add editing grades
  • Select the date from the past exams (connect exam feature with grades feature)

Comment on lines +512 to +527
Icon getIcon() {
return switch (this) {
PredefinedGradeTypes.schoolReportGrade =>
const Icon(Symbols.contract, fill: 1),
PredefinedGradeTypes.writtenExam =>
const Icon(Symbols.edit_document, fill: 1),
PredefinedGradeTypes.oralParticipation =>
const Icon(Symbols.record_voice_over, fill: 1),
PredefinedGradeTypes.vocabularyTest =>
const Icon(Symbols.text_rotation_none, fill: 1),
PredefinedGradeTypes.presentation =>
const Icon(Symbols.co_present, fill: 1),
PredefinedGradeTypes.other =>
const Icon(Symbols.other_admission, fill: 1),
};
}
Copy link
Member Author

Choose a reason for hiding this comment

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

Not sure if we want to change the location where we make this switch statement. Later, we will also load dynamically the icon for custom grade types (created by the user).

Copy link
Collaborator

Choose a reason for hiding this comment

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

Leave it there for now, we'll figure something out in the future

@github-actions github-actions bot added testing dependencies Changing, updating, adding or removing one or more dependencies. feature: grades Users can add their grades to Sharezone. labels Apr 15, 2024
Copy link

github-actions bot commented Apr 15, 2024

Visit the preview URL for this PR (updated for commit 79eae41):

https://sharezone-test--pr1456-add-grade-logic-hnafvxvt.web.app

(expires Sat, 20 Apr 2024 15:48:19 GMT)

🔥 via Firebase Hosting GitHub Action 🌎

Sign: 4cb3ae61e1e018abfd9841fd3239f5b49ccc034b

@github-actions github-actions bot added feature: file-sharing Files can be shared inside Sharezone e.g. by uploading them in a file-sharing folder of a course. feature: universal file features File features (downloading, preview, etc.) that are used by multiple Sharezone features. feature: groups:courses Specific to only courses (instead of e.g. classes) labels Apr 15, 2024
Padding(
padding: const EdgeInsets.fromLTRB(12, 0, 12, 12),
child: Text(
'Der erste Wert entspricht der besten Noten, z.B. bei dem Notensystem "1 - 6" ist "1" die beste Note.',
Copy link
Member Author

@nilsreichardt nilsreichardt Apr 17, 2024

Choose a reason for hiding this comment

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

This isn't something that affects the calculations but will be important for the grading performance later

@nilsreichardt nilsreichardt marked this pull request as ready for review April 17, 2024 08:51
@Jonas-Sander
Copy link
Collaborator

When the user enters a grade (e.g. "1+") and changes the grade system (e.g. to "15 - 0 Punkte"), should we clear the grade value field?

Yes

Copy link
Collaborator

@Jonas-Sander Jonas-Sander left a comment

Choose a reason for hiding this comment

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

Nice, LGTM 👍

@nilsreichardt nilsreichardt added this pull request to the merge queue Apr 17, 2024
Merged via the queue into main with commit 017e0c9 Apr 17, 2024
37 checks passed
@nilsreichardt nilsreichardt deleted the add-grade-logic branch April 17, 2024 16:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependencies Changing, updating, adding or removing one or more dependencies. feature: file-sharing Files can be shared inside Sharezone e.g. by uploading them in a file-sharing folder of a course. feature: grades Users can add their grades to Sharezone. feature: groups:courses Specific to only courses (instead of e.g. classes) feature: universal file features File features (downloading, preview, etc.) that are used by multiple Sharezone features. testing
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants