Skip to content

Commit

Permalink
Merge branch 'develop' into chore/communication/use-dtos-in-mail-service
Browse files Browse the repository at this point in the history
  • Loading branch information
xHadie authored Nov 25, 2024
2 parents 197abad + a4c674c commit f4c988f
Show file tree
Hide file tree
Showing 80 changed files with 723 additions and 936 deletions.
Binary file modified docs/user/exams/student/access_exam.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/user/exams/student/buttons/exam_hand_in_early.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/user/exams/student/buttons/save_exercise.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/user/exams/student/buttons/upload.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/user/exams/student/exam_bar.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/user/exams/student/exam_modeling_exercises.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/user/exams/student/exam_navigation_sidebar.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/user/exams/student/exam_overview.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/user/exams/student/exam_programming_exercises.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/user/exams/student/exam_quiz_exercises.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/user/exams/student/exam_text_exercises.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
26 changes: 26 additions & 0 deletions docs/user/exams/students_guide.rst
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,14 @@ Welcome Screen

Welcome Screen, waiting for exam start

This video offers a detailed guide on accessing your exams:

.. raw:: html

<iframe src="https://live.rbg.tum.de/w/artemisintro/52546?video_only=1&t=0" allowfullscreen="1" frameborder="0" width="600" height="350">
Watch this video on TUM-Live.
</iframe>

Exam Conduction
^^^^^^^^^^^^^^^
- Once the exam working time starts and you have confirmed your participation, the *Exercise Overview* screen will appear. This screen lists all exercises that are part of your exam with their respective amount of points, title and exercise type. The status column indicates the status of each exercise and whether you have a submission in them or not.
Expand Down Expand Up @@ -132,6 +140,14 @@ Exam Conduction

Exam Navigation Sidebar

- You have two options to save your changes for an exercise:

1. Click the |save_exercise| button to manually save and submit your changes.
2. Select an exercise in the navigation sidebar (either the current one or a different exercise), which will automatically save and submit your changes.

.. warning::
The |save_exercise| button is only available for text, modeling, and quiz exercises. For file upload exercises, you need to manually click the |upload| button, and for programming exercises, you need to manually click the |submit| button to save and submit your changes.

- On the header, you will find the exam bar that includes the remaining time and the |exam_hand_in_early| button. If you click this button, you will be sent to the exam `End Screen`_.
- The *time left* until the end of the exam is also shown next to the button.

Expand Down Expand Up @@ -373,6 +389,14 @@ Summary

Complaining about the Assessment of a Text Exercise

This video offers a detailed guide on participating in your exams:

.. raw:: html

<iframe src="https://live.rbg.tum.de/w/artemisintro/53405?video_only=1&t=0" allowfullscreen="1" frameborder="0" width="600" height="350">
Watch this video on TUM-Live.
</iframe>

Example Solutions
^^^^^^^^^^^^^^^^^
- If the instructor sets the example solution publication date of the exam, the solutions will be available after that date.
Expand Down Expand Up @@ -470,3 +494,5 @@ Grades
.. |exam_no_results_found| image:: student/buttons/exam_no_results_found.png
.. |exam_hand_in_early| image:: student/buttons/exam_hand_in_early.png
.. |saved_exercises| image:: student/buttons/saved_exercises.png
.. |upload| image:: student/buttons/upload.png
.. |save_exercise| image:: student/buttons/save_exercise.png
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,7 @@ public CompetencyService(CompetencyRepository competencyRepository, Authorizatio
LearningObjectImportService learningObjectImportService, CompetencyLectureUnitLinkRepository competencyLectureUnitLinkRepository, CourseRepository courseRepository,
CompetencyExerciseLinkRepository competencyExerciseLinkRepository) {
super(competencyProgressRepository, courseCompetencyRepository, competencyRelationRepository, competencyProgressService, exerciseService, lectureUnitService,
learningPathService, authCheckService, standardizedCompetencyRepository, lectureUnitCompletionRepository, learningObjectImportService,
competencyLectureUnitLinkRepository, courseRepository);
learningPathService, authCheckService, standardizedCompetencyRepository, lectureUnitCompletionRepository, learningObjectImportService, courseRepository);
this.competencyRepository = competencyRepository;
this.competencyExerciseLinkRepository = competencyExerciseLinkRepository;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@
import de.tum.cit.aet.artemis.atlas.dto.CompetencyRelationDTO;
import de.tum.cit.aet.artemis.atlas.dto.CompetencyWithTailRelationDTO;
import de.tum.cit.aet.artemis.atlas.dto.UpdateCourseCompetencyRelationDTO;
import de.tum.cit.aet.artemis.atlas.repository.CompetencyLectureUnitLinkRepository;
import de.tum.cit.aet.artemis.atlas.repository.CompetencyProgressRepository;
import de.tum.cit.aet.artemis.atlas.repository.CompetencyRelationRepository;
import de.tum.cit.aet.artemis.atlas.repository.CourseCompetencyRepository;
Expand Down Expand Up @@ -83,15 +82,13 @@ public class CourseCompetencyService {

private final LearningObjectImportService learningObjectImportService;

private final CompetencyLectureUnitLinkRepository competencyLectureUnitLinkRepository;

private final CourseRepository courseRepository;

public CourseCompetencyService(CompetencyProgressRepository competencyProgressRepository, CourseCompetencyRepository courseCompetencyRepository,
CompetencyRelationRepository competencyRelationRepository, CompetencyProgressService competencyProgressService, ExerciseService exerciseService,
LectureUnitService lectureUnitService, LearningPathService learningPathService, AuthorizationCheckService authCheckService,
StandardizedCompetencyRepository standardizedCompetencyRepository, LectureUnitCompletionRepository lectureUnitCompletionRepository,
LearningObjectImportService learningObjectImportService, CompetencyLectureUnitLinkRepository competencyLectureUnitLinkRepository, CourseRepository courseRepository) {
LearningObjectImportService learningObjectImportService, CourseRepository courseRepository) {
this.competencyProgressRepository = competencyProgressRepository;
this.courseCompetencyRepository = courseCompetencyRepository;
this.competencyRelationRepository = competencyRelationRepository;
Expand All @@ -103,7 +100,6 @@ public CourseCompetencyService(CompetencyProgressRepository competencyProgressRe
this.standardizedCompetencyRepository = standardizedCompetencyRepository;
this.lectureUnitCompletionRepository = lectureUnitCompletionRepository;
this.learningObjectImportService = learningObjectImportService;
this.competencyLectureUnitLinkRepository = competencyLectureUnitLinkRepository;
this.courseRepository = courseRepository;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,7 @@ public PrerequisiteService(PrerequisiteRepository prerequisiteRepository, Author
StandardizedCompetencyRepository standardizedCompetencyRepository, CourseCompetencyRepository courseCompetencyRepository, ExerciseService exerciseService,
LearningObjectImportService learningObjectImportService, CompetencyLectureUnitLinkRepository competencyLectureUnitLinkRepository, CourseRepository courseRepository) {
super(competencyProgressRepository, courseCompetencyRepository, competencyRelationRepository, competencyProgressService, exerciseService, lectureUnitService,
learningPathService, authCheckService, standardizedCompetencyRepository, lectureUnitCompletionRepository, learningObjectImportService,
competencyLectureUnitLinkRepository, courseRepository);
learningPathService, authCheckService, standardizedCompetencyRepository, lectureUnitCompletionRepository, learningObjectImportService, courseRepository);
this.prerequisiteRepository = prerequisiteRepository;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -137,21 +137,4 @@ default Post findMessagePostByIdElseThrow(Long postId) throws EntityNotFoundExce
WHERE p.id = :postId AND answer.author = cp.user
""")
Set<User> findUsersWhoRepliedInMessage(@Param("postId") Long postId);

/**
* Finds tags of course-wide messages
*
* @param courseId the course
* @return list of tags
*/
// TODO: unused, delete
@Query("""
SELECT DISTINCT tag
FROM Post post
LEFT JOIN post.tags tag
LEFT JOIN Channel channel ON channel.id = post.conversation.id
WHERE channel.course.id = :courseId
AND channel.isCourseWide = TRUE
""")
List<String> findPostTagsForCourse(@Param("courseId") Long courseId);
}
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@
import static de.tum.cit.aet.artemis.core.config.Constants.PROFILE_CORE;

import java.time.ZonedDateTime;
import java.util.Comparator;
import java.util.List;
import java.util.Objects;
import java.util.Optional;
import java.util.Set;
Expand All @@ -24,8 +22,6 @@
import org.springframework.scheduling.annotation.Async;
import org.springframework.stereotype.Service;

import com.google.common.collect.Lists;

import de.tum.cit.aet.artemis.communication.domain.ConversationNotificationRecipientSummary;
import de.tum.cit.aet.artemis.communication.domain.CreatedConversationMessage;
import de.tum.cit.aet.artemis.communication.domain.DisplayPriority;
Expand All @@ -49,7 +45,6 @@
import de.tum.cit.aet.artemis.communication.service.conversation.auth.ChannelAuthorizationService;
import de.tum.cit.aet.artemis.communication.service.notifications.ConversationNotificationService;
import de.tum.cit.aet.artemis.communication.service.notifications.GroupNotificationService;
import de.tum.cit.aet.artemis.communication.service.similarity.PostSimilarityComparisonStrategy;
import de.tum.cit.aet.artemis.core.domain.Course;
import de.tum.cit.aet.artemis.core.domain.User;
import de.tum.cit.aet.artemis.core.exception.AccessForbiddenException;
Expand All @@ -66,8 +61,6 @@
@Service
public class ConversationMessagingService extends PostingService {

private static final int TOP_K_SIMILARITY_RESULTS = 5;

private static final Logger log = LoggerFactory.getLogger(ConversationMessagingService.class);

private final ConversationService conversationService;
Expand All @@ -82,22 +75,18 @@ public class ConversationMessagingService extends PostingService {

private final SingleUserNotificationRepository singleUserNotificationRepository;

private final PostSimilarityComparisonStrategy postContentCompareStrategy;

protected ConversationMessagingService(CourseRepository courseRepository, ExerciseRepository exerciseRepository, LectureRepository lectureRepository,
ConversationMessageRepository conversationMessageRepository, AuthorizationCheckService authorizationCheckService, WebsocketMessagingService websocketMessagingService,
UserRepository userRepository, ConversationService conversationService, ConversationParticipantRepository conversationParticipantRepository,
ConversationNotificationService conversationNotificationService, ChannelAuthorizationService channelAuthorizationService,
GroupNotificationService groupNotificationService, SingleUserNotificationRepository singleUserNotificationRepository,
PostSimilarityComparisonStrategy postContentCompareStrategy) {
GroupNotificationService groupNotificationService, SingleUserNotificationRepository singleUserNotificationRepository) {
super(courseRepository, userRepository, exerciseRepository, lectureRepository, authorizationCheckService, websocketMessagingService, conversationParticipantRepository);
this.conversationService = conversationService;
this.conversationMessageRepository = conversationMessageRepository;
this.conversationNotificationService = conversationNotificationService;
this.channelAuthorizationService = channelAuthorizationService;
this.groupNotificationService = groupNotificationService;
this.singleUserNotificationRepository = singleUserNotificationRepository;
this.postContentCompareStrategy = postContentCompareStrategy;
}

/**
Expand Down Expand Up @@ -433,41 +422,6 @@ private Conversation mayUpdateOrDeleteMessageElseThrow(Post existingMessagePost,
}
}

/**
* Calculates k similar posts based on the underlying content comparison strategy
*
* @param courseId id of the course in which similar posts are searched for
* @param post post that is to be created and check for similar posts beforehand
* @return list of similar posts
*/
// TODO: unused, remove
public List<Post> getSimilarPosts(Long courseId, Post post) {
PostContextFilterDTO postContextFilter = new PostContextFilterDTO(courseId, null, null, null, null, false, false, false, null, null);
List<Post> coursePosts = this.getCourseWideMessages(Pageable.unpaged(), postContextFilter, userRepository.getUser(), courseId).stream()
.sorted(Comparator.comparing(coursePost -> postContentCompareStrategy.performSimilarityCheck(post, coursePost))).toList();

// sort course posts by calculated similarity scores
setAuthorRoleOfPostings(coursePosts, courseId);
return Lists.reverse(coursePosts).stream().limit(TOP_K_SIMILARITY_RESULTS).toList();
}

/**
* Checks course and user validity,
* retrieves all tags for posts in a certain course
*
* @param courseId id of the course the tags belongs to
* @return tags of all posts that belong to the course
*/
// TODO: unused, delete
public List<String> getAllCourseTags(Long courseId) {
final User user = userRepository.getUserWithGroupsAndAuthorities();
final Course course = courseRepository.findByIdElseThrow(courseId);

// checks
preCheckUserAndCourseForCommunicationOrMessaging(user, course);
return conversationMessageRepository.findPostTagsForCourse(courseId);
}

@Override
public String getEntityName() {
return METIS_POST_ENTITY_NAME;
Expand Down

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -201,34 +201,4 @@ public ResponseEntity<Post> updateDisplayPriority(@PathVariable Long courseId, @
Post postWithUpdatedDisplayPriority = conversationMessagingService.changeDisplayPriority(courseId, postId, displayPriority);
return ResponseEntity.ok().body(postWithUpdatedDisplayPriority);
}

/**
* POST /courses/{courseId}/messages/similarity-check : trigger a similarity check for post to be created
*
* @param courseId id of the course the post should be published in
* @param post post to create
* @return ResponseEntity with status 200 (OK)
*/
@PostMapping("courses/{courseId}/messages/similarity-check")
@EnforceAtLeastStudent
// TODO: unused, remove
public ResponseEntity<List<Post>> computeSimilarityScoresWitCoursePosts(@PathVariable Long courseId, @RequestBody Post post) {
List<Post> similarPosts = conversationMessagingService.getSimilarPosts(courseId, post);
return ResponseEntity.ok().body(similarPosts);
}

/**
* GET /courses/{courseId}/posts/tags : Get all tags for posts in a certain course
*
* @param courseId id of the course the post belongs to
* @return the ResponseEntity with status 200 (OK) and with body all tags for posts in that course,
* or 400 (Bad Request) if the checks on user or course validity fail
*/
@GetMapping("courses/{courseId}/messages/tags")
// TODO: unused, delete
@EnforceAtLeastStudent
public ResponseEntity<List<String>> getAllPostTagsForCourse(@PathVariable Long courseId) {
List<String> tags = conversationMessagingService.getAllCourseTags(courseId);
return new ResponseEntity<>(tags, null, HttpStatus.OK);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@

import de.tum.cit.aet.artemis.assessment.repository.cleanup.FeedbackCleanupRepository;
import de.tum.cit.aet.artemis.assessment.repository.cleanup.LongFeedbackTextCleanupRepository;
import de.tum.cit.aet.artemis.assessment.repository.cleanup.ParticipantScoreCleanupRepository;
import de.tum.cit.aet.artemis.assessment.repository.cleanup.PlagiarismComparisonCleanupRepository;
import de.tum.cit.aet.artemis.assessment.repository.cleanup.RatingCleanupRepository;
import de.tum.cit.aet.artemis.assessment.repository.cleanup.ResultCleanupRepository;
Expand Down Expand Up @@ -49,13 +48,10 @@ public class DataCleanupService {

private final TeamScoreCleanupRepository teamScoreCleanupRepository;

private final ParticipantScoreCleanupRepository participantScoreCleanupRepository;

public DataCleanupService(CleanupJobExecutionRepository cleanupJobExecutionRepository, PlagiarismComparisonCleanupRepository plagiarismComparisonCleanupRepository,
ResultCleanupRepository resultCleanupRepository, RatingCleanupRepository ratingCleanupRepository, FeedbackCleanupRepository feedbackCleanupRepository,
TextBlockCleanupRepository textBlockCleanupRepository, LongFeedbackTextCleanupRepository longFeedbackTextCleanupRepository,
StudentScoreCleanupRepository studentScoreCleanupRepository, TeamScoreCleanupRepository teamScoreCleanupRepository,
ParticipantScoreCleanupRepository participantScoreCleanupRepository) {
StudentScoreCleanupRepository studentScoreCleanupRepository, TeamScoreCleanupRepository teamScoreCleanupRepository) {
this.resultCleanupRepository = resultCleanupRepository;
this.ratingCleanupRepository = ratingCleanupRepository;
this.feedbackCleanupRepository = feedbackCleanupRepository;
Expand All @@ -65,7 +61,6 @@ public DataCleanupService(CleanupJobExecutionRepository cleanupJobExecutionRepos
this.teamScoreCleanupRepository = teamScoreCleanupRepository;
this.cleanupJobExecutionRepository = cleanupJobExecutionRepository;
this.plagiarismComparisonCleanupRepository = plagiarismComparisonCleanupRepository;
this.participantScoreCleanupRepository = participantScoreCleanupRepository;
}

// TODO: offer the possibility to delete old submission versions
Expand Down
Loading

0 comments on commit f4c988f

Please sign in to comment.