Skip to content
This repository has been archived by the owner on Jan 10, 2024. It is now read-only.

Average grade improvement #1439

Merged

Conversation

tobiasjungmann
Copy link
Contributor

@tobiasjungmann tobiasjungmann commented May 8, 2022

Issue

This is an improves the grade view as it was described in Issue 1246. Users can enter their own values for a weight and the credits for a course in a separate edit mode. Additionally, new courses can be added and removed.

Changes

UI

The UI looks identical to the previous version at first glance. The diagram is a little bit larger and a gear icon in the top right corner was added.

This allows to switch to the newly created edit mode:
The number of credits and the courses weight can be entered for every exam individually. Hiding a grade removes the grade color from the TextView on the right and deactivates EditTexts. Hidden grade won't be used to compute the average grade and are not included in the diagrams.
Resetting a grade resets all parameters to the default.

Adding a new grade is possible in the edit mode with the floating action button in the bottom right corner. All values, which can be entered are validated before the exam is created. Every manually created exam can be deleted with the delete button in the top right corner of the exam.

Last but not least, the spinner in the top bar to only select grades for a certain program is only shown if the user has two or more programs to choose from.

Logic

A json String of all exam objects (the grades) is now saved in the shared preferences. This string is used to load the list of exams instead of the previously used cache.

Changes for each grade are stored directly in the shared preferences and are handled by the method storeExamListInSharedPreferences. loadExamListFromSharedPreferences Loads the stored exam object from the shared preferences.

tobiasjungmann and others added 13 commits July 13, 2022 22:38
* Fix ktlint errors

* Help out Kotlins type inference

* Move long test strings from code to seperate json files

* Bump Robolectric version to 4.8
…nts (TUM-Dev#1434)

* Update appcompat, fragment and fix findViewById() in Fragments

* fix formatting

Co-authored-by: Kordian Bruck <[email protected]>
…into 1426_Average_Grade_Improvement

# Conflicts:
#	app/src/main/java/de/tum/in/tumcampusapp/component/tumui/grades/GradesFragment.kt
@tobiasjungmann
Copy link
Contributor Author

The rebase was more or less successful. Now the branch can be merged into the master again without conflicts.

@Bentipa
Copy link
Member

Bentipa commented Jul 19, 2022

@kordianbruck did you already review it apart from the rebase so we can merge it?

@Bentipa
Copy link
Member

Bentipa commented Jul 19, 2022

image
I guess a question mark is missing here.

Apart from that, function wise everything works as expected.

@Bentipa Bentipa self-requested a review July 19, 2022 14:51
@tobiasjungmann
Copy link
Contributor Author

Thank you for your review, the questionmark is now fixed.

Copy link
Member

@Bentipa Bentipa left a comment

Choose a reason for hiding this comment

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

Feature wise approved, @COM8 did the code review so fine to go

@tobiasjungmann tobiasjungmann merged commit 4f75a32 into TUM-Dev:master Jul 28, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants