Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
N
Notenmanager
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
TB
Notenmanager
Commits
eff0390d
Commit
eff0390d
authored
2 years ago
by
Dennis Toth
Browse files
Options
Downloads
Patches
Plain Diff
bugfix
parent
7e212552
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
.idea/workspace.xml
+11
-5
11 additions, 5 deletions
.idea/workspace.xml
src/main/java/de/thdeg/grademanager/gui/StudentGradesController.java
+8
-13
8 additions, 13 deletions
...va/de/thdeg/grademanager/gui/StudentGradesController.java
with
19 additions
and
18 deletions
.idea/workspace.xml
+
11
−
5
View file @
eff0390d
...
...
@@ -4,11 +4,9 @@
<option
name=
"autoReloadType"
value=
"SELECTIVE"
/>
</component>
<component
name=
"ChangeListManager"
>
<list
default=
"true"
id=
"ce56effb-683b-43e9-9335-7e3aa5d26c29"
name=
"Changes"
comment=
"
new window for grades
"
>
<list
default=
"true"
id=
"ce56effb-683b-43e9-9335-7e3aa5d26c29"
name=
"Changes"
comment=
"
grades can now be added for every course
"
>
<change
beforePath=
"$PROJECT_DIR$/.idea/workspace.xml"
beforeDir=
"false"
afterPath=
"$PROJECT_DIR$/.idea/workspace.xml"
afterDir=
"false"
/>
<change
beforePath=
"$PROJECT_DIR$/src/main/java/de/thdeg/grademanager/gui/StudentCoursesController.java"
beforeDir=
"false"
afterPath=
"$PROJECT_DIR$/src/main/java/de/thdeg/grademanager/gui/StudentCoursesController.java"
afterDir=
"false"
/>
<change
beforePath=
"$PROJECT_DIR$/src/main/java/de/thdeg/grademanager/gui/StudentGradesController.java"
beforeDir=
"false"
afterPath=
"$PROJECT_DIR$/src/main/java/de/thdeg/grademanager/gui/StudentGradesController.java"
afterDir=
"false"
/>
<change
beforePath=
"$PROJECT_DIR$/src/main/java/de/thdeg/grademanager/model/Student.java"
beforeDir=
"false"
afterPath=
"$PROJECT_DIR$/src/main/java/de/thdeg/grademanager/model/Student.java"
afterDir=
"false"
/>
</list>
<option
name=
"SHOW_DIALOG"
value=
"false"
/>
<option
name=
"HIGHLIGHT_CONFLICTS"
value=
"true"
/>
...
...
@@ -179,7 +177,14 @@
<option
name=
"project"
value=
"LOCAL"
/>
<updated>
1655904634462
</updated>
</task>
<option
name=
"localTasksCounter"
value=
"14"
/>
<task
id=
"LOCAL-00014"
summary=
"grades can now be added for every course"
>
<created>
1655910063769
</created>
<option
name=
"number"
value=
"00014"
/>
<option
name=
"presentableId"
value=
"LOCAL-00014"
/>
<option
name=
"project"
value=
"LOCAL"
/>
<updated>
1655910063769
</updated>
</task>
<option
name=
"localTasksCounter"
value=
"15"
/>
<servers
/>
</component>
<component
name=
"Vcs.Log.Tabs.Properties"
>
...
...
@@ -220,6 +225,7 @@
<MESSAGE
value=
"update for student courses and grades"
/>
<MESSAGE
value=
"clean up"
/>
<MESSAGE
value=
"new window for grades"
/>
<option
name=
"LAST_COMMIT_MESSAGE"
value=
"new window for grades"
/>
<MESSAGE
value=
"grades can now be added for every course"
/>
<option
name=
"LAST_COMMIT_MESSAGE"
value=
"grades can now be added for every course"
/>
</component>
</project>
\ No newline at end of file
This diff is collapsed.
Click to expand it.
src/main/java/de/thdeg/grademanager/gui/StudentGradesController.java
+
8
−
13
View file @
eff0390d
...
...
@@ -9,12 +9,9 @@ import javafx.collections.FXCollections;
import
javafx.collections.ObservableList
;
import
javafx.event.ActionEvent
;
import
javafx.fxml.FXML
;
import
javafx.scene.control.Alert
;
import
javafx.scene.control.ButtonType
;
import
javafx.scene.control.ComboBox
;
import
java.io.IOException
;
import
java.util.Optional
;
import
java.util.Set
;
public
class
StudentGradesController
{
...
...
@@ -54,23 +51,21 @@ public class StudentGradesController {
mark
=
markComboBox
.
getValue
();
Set
<
Enrollment
>
enrollments
=
student
.
getEnrollments
();
for
(
Enrollment
e:
enrollments
)
{
if
(
course
.
getId
()
==
e
.
getCourse
().
getId
()){
for
(
Enrollment
e
:
enrollments
)
{
if
(
course
.
getId
()
==
e
.
getCourse
().
getId
())
{
e
.
setGrade
(
mark
.
getMark
());
JpaService
jpaService
=
JpaService
.
getInstance
();
jpaService
.
runInTransaction
(
entityManager
->
{
entityManager
.
merge
(
e
);
return
null
;});
jpaService
.
runInTransaction
(
entityManager
->
{
entityManager
.
merge
(
e
);
return
null
;
});
initialize
();
}
}
SwitchWindowHelper
.
switchTo
(
"Student Courses"
,
event
);
}
else
{
Alert
alert
=
new
Alert
(
Alert
.
AlertType
.
ERROR
);
alert
.
setTitle
(
"Fehler"
);
alert
.
setHeaderText
(
"Bitte alle Felder ausfüllen."
);
Optional
<
ButtonType
>
result
=
alert
.
showAndWait
();
}
SwitchWindowHelper
.
switchTo
(
"Student Courses"
,
event
);
}
@FXML
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment