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

Adaptive learning: Add learner profile #9673

Open
wants to merge 28 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
7024d9a
Adds rough learner structure
N0W0RK Nov 5, 2024
1eb6786
Add creation and deletion stuff
JohannesStoehr Nov 7, 2024
65acf2c
Fix user deletion
JohannesStoehr Nov 7, 2024
52b6161
Fix some tests
JohannesStoehr Nov 7, 2024
f8d8a2e
Maybe fix query counts
JohannesStoehr Nov 8, 2024
d30fc8f
Merge branch 'develop' into feature/adaptive-learning/learner-profile
JohannesStoehr Nov 8, 2024
ccd9a99
Maybe fix query counts
JohannesStoehr Nov 8, 2024
21c6624
Fix tests
JohannesStoehr Nov 8, 2024
38f43be
Add comments
JohannesStoehr Nov 11, 2024
195a3d2
Fix server style
JohannesStoehr Nov 11, 2024
34c28bc
Merge branch 'develop' into feature/adaptive-learning/learner-profile
JohannesStoehr Nov 11, 2024
6dde045
Merge branch 'develop' into feature/adaptive-learning/learner-profile
JohannesStoehr Nov 18, 2024
59a65e3
Add some tests
JohannesStoehr Nov 19, 2024
f824403
Max
JohannesStoehr Nov 20, 2024
290ae82
Merge branch 'develop' into feature/adaptive-learning/learner-profile
JohannesStoehr Nov 21, 2024
3077ca6
Merge branch 'develop' into feature/adaptive-learning/learner-profile
JohannesStoehr Nov 28, 2024
389f18b
Merge
JohannesStoehr Nov 28, 2024
0bd6721
Merge branch 'develop' into feature/adaptive-learning/learner-profile
N0W0RK Nov 28, 2024
d83180d
Merge branch 'develop' into feature/adaptive-learning/learner-profile
JohannesStoehr Dec 2, 2024
fee5f6c
Merge remote-tracking branch 'origin/feature/adaptive-learning/learne…
JohannesStoehr Dec 2, 2024
90e061b
Merge branch 'develop' into feature/adaptive-learning/learner-profile
JohannesStoehr Dec 3, 2024
04e2a26
Merge branch 'develop' into feature/adaptive-learning/learner-profile
JohannesStoehr Dec 5, 2024
2a9cf48
Merge branch 'develop' into feature/adaptive-learning/learner-profile
MaximilianAnzinger Dec 6, 2024
c25e76e
Fix compilation
JohannesStoehr Dec 6, 2024
c4e9df8
Fix api
JohannesStoehr Dec 6, 2024
268dc39
Merge branch 'develop' into feature/adaptive-learning/learner-profile
MaximilianAnzinger Dec 10, 2024
2d4bff9
Merge branch 'develop' into feature/adaptive-learning/learner-profile
JohannesStoehr Dec 10, 2024
5ec7732
Merge branch 'develop' into feature/adaptive-learning/learner-profile
JohannesStoehr Dec 11, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
package de.tum.cit.aet.artemis.atlas.domain.profile;

import jakarta.persistence.Entity;
import jakarta.persistence.JoinColumn;
import jakarta.persistence.ManyToOne;
import jakarta.persistence.OneToOne;
import jakarta.persistence.Table;

import de.tum.cit.aet.artemis.core.domain.Course;
import de.tum.cit.aet.artemis.core.domain.DomainObject;

@Entity
@Table(name = "course_learner_profile")
public class CourseLearnerProfile extends DomainObject {
JohannesStoehr marked this conversation as resolved.
Show resolved Hide resolved

@ManyToOne
@JoinColumn(name = "learner_profile_id")
private LearnerProfile learnerProfile;

@OneToOne
JohannesStoehr marked this conversation as resolved.
Show resolved Hide resolved
@JoinColumn(name = "course_id")
private Course course;

public void setLearnerProfile(LearnerProfile learnerProfile) {
this.learnerProfile = learnerProfile;
}

public LearnerProfile getLearnerProfile() {
return this.learnerProfile;
}

public void setCourse(Course course) {
this.course = course;
}

public Course getCourse() {
return this.course;
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
package de.tum.cit.aet.artemis.atlas.domain.profile;

import java.util.Collection;
import java.util.HashSet;
import java.util.Set;

import jakarta.persistence.Entity;
import jakarta.persistence.JoinColumn;
import jakarta.persistence.OneToMany;
import jakarta.persistence.OneToOne;
import jakarta.persistence.Table;

import de.tum.cit.aet.artemis.core.domain.DomainObject;
import de.tum.cit.aet.artemis.core.domain.User;

@Entity
@Table(name = "learner_profile")
class LearnerProfile extends DomainObject {

@OneToOne
@JoinColumn(name = "user_id")
private User user;

@OneToMany
private Set<CourseLearnerProfile> courseLearnerProfiles = new HashSet<>();

public void setUser(User user) {
this.user = user;
}

public User getUser() {
return this.user;
}
JohannesStoehr marked this conversation as resolved.
Show resolved Hide resolved

public void setCourseLearnerProfiles(Set<CourseLearnerProfile> courseLearnerProfiles) {
this.courseLearnerProfiles = courseLearnerProfiles;
}

public Set<CourseLearnerProfile> getCourseLearnerProfiles() {
return this.courseLearnerProfiles;
}

public boolean addCourseLearnerProfile(CourseLearnerProfile courseLearnerProfile) {
return this.courseLearnerProfiles.add(courseLearnerProfile);
}

public boolean addAllCourseLearnerProfiles(Collection<? extends CourseLearnerProfile> courseLearnerProfiles) {
return this.courseLearnerProfiles.addAll(courseLearnerProfiles);
}

public boolean removeCourseLearnerProfle(CourseLearnerProfile courseLearnerProfile) {
return this.courseLearnerProfiles.remove(courseLearnerProfile);
}
}
Loading