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

Programming exercises: Add simple mode to create and edit view #9283

Open
wants to merge 200 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 185 commits
Commits
Show all changes
200 commits
Select commit Hold shift + click to select a range
9e842c6
Hiding channel name
florian-glombik Sep 4, 2024
bfbec5f
Add button to switch the modes
florian-glombik Sep 4, 2024
1ec32b4
Hide presentation score setting in simple mode
florian-glombik Sep 4, 2024
55c0049
Hide plagiarism control
florian-glombik Sep 4, 2024
c34fc9a
Simplify lifecycle timeline
florian-glombik Sep 4, 2024
2cb9600
Hide submission policy selection
florian-glombik Sep 4, 2024
188adce
Hide static code analysis, sequential test runs, customize build script
florian-glombik Sep 4, 2024
295d8bf
Hide allow offline IDe and online editor settings
florian-glombik Sep 4, 2024
af8ccb7
Hide participation team mode
florian-glombik Sep 4, 2024
0e5d94d
Hide project type and exemplary dependency in simple mode
florian-glombik Sep 4, 2024
81c6305
Hide assessment options
florian-glombik Sep 4, 2024
2de9424
Hide competency selection in simple mode
florian-glombik Sep 4, 2024
5fda9b9
Fixing StatusBar component
florian-glombik Sep 4, 2024
3a630bd
Adding component for difficulty selection and introducing folder stru…
florian-glombik Sep 4, 2024
ab28e50
Moving the difficulty selection to the general section in simple mode
florian-glombik Sep 4, 2024
a66c2cf
Fixing translation for difficulty
florian-glombik Sep 4, 2024
1eb12ff
Updating statusbar when edit mode changes
florian-glombik Sep 4, 2024
8a6fb5c
Updating the short name when the title changes
florian-glombik Sep 4, 2024
bcac68b
Deriving a shortname from the title
florian-glombik Sep 4, 2024
0bc2c62
adding simple fix for unique shortname
florian-glombik Sep 4, 2024
e36fe41
Adding structure to define if edit field is displayed or not
florian-glombik Sep 5, 2024
6706f6c
Hiding channel name
florian-glombik Sep 5, 2024
54ab1ce
Configure fields to be displayed settings
florian-glombik Sep 5, 2024
e1dc159
Applying display options for general section
florian-glombik Sep 5, 2024
a07b140
Applying display options for mode section
florian-glombik Sep 5, 2024
031ecff
Applying display options for language section
florian-glombik Sep 5, 2024
9483cd2
Applying display options for problem section
florian-glombik Sep 5, 2024
5012a49
Applying display options for grading section
florian-glombik Sep 5, 2024
427e751
Fixing build issues
florian-glombik Sep 5, 2024
8b2184e
Merge branch 'develop' into feature/programming-exercises/add-simple-…
florian-glombik Sep 6, 2024
ffddbad
Refactor the names of the input field mapping
florian-glombik Sep 6, 2024
b156191
Fixing console errors and hiding assessment section title if no optio…
florian-glombik Sep 6, 2024
3b15755
Adding a component for the switch button
florian-glombik Sep 6, 2024
55eb7c6
Adding switch mode in footer
florian-glombik Sep 6, 2024
fb61e26
Using the jhi-button component and adjusting button size in footer
florian-glombik Sep 6, 2024
ce548f0
Adjust layout of footer
florian-glombik Sep 6, 2024
07402a6
Adjusting spacing next to headline
florian-glombik Sep 6, 2024
9c3febf
Using type instead of enum
florian-glombik Sep 6, 2024
83d882d
Addressing self-review
florian-glombik Sep 6, 2024
d518ece
Fixing client tests
florian-glombik Sep 6, 2024
7040f6f
Make prettier happy?
florian-glombik Sep 6, 2024
c60f6a7
Fixing tests
florian-glombik Sep 6, 2024
ebfb299
Fixing tests
florian-glombik Sep 6, 2024
8cea53b
Adding tests for grading section
florian-glombik Sep 6, 2024
efd2bee
Adding more tests
florian-glombik Sep 6, 2024
a5563ff
Simplify testing displaying correct fields
florian-glombik Sep 6, 2024
8e98eb5
Further simplifying tests
florian-glombik Sep 6, 2024
19d8fcf
Do not update shortname in edit mode
florian-glombik Sep 6, 2024
a950099
Re-use existing shortname when importing exercise
florian-glombik Sep 6, 2024
057c2bf
Merge branch 'develop' into feature/programming-exercises/add-simple-…
florian-glombik Sep 6, 2024
9561392
Fixing setting of isEdit variable and adding tests for it
florian-glombik Sep 6, 2024
02e54f7
Adding test for utils method
florian-glombik Sep 6, 2024
a8c33fc
Merge branch 'develop' into feature/programming-exercises/add-simple-…
florian-glombik Sep 6, 2024
765e3a0
Merge branch 'develop' into feature/programming-exercises/add-simple-…
florian-glombik Sep 8, 2024
d3cf505
Addressing Johannes' Feedback
florian-glombik Sep 8, 2024
37c3910
Addressing Johannes' Feedback (converting more inputs to signals)
florian-glombik Sep 8, 2024
60df325
Addressing Johannes' Feedback (converting children to signals)
florian-glombik Sep 8, 2024
bcfa20a
Revert "Addressing Johannes' Feedback (converting children to signals)"
florian-glombik Sep 8, 2024
6d760c5
fixing category console error
florian-glombik Sep 8, 2024
261d23f
Fixing reactivity for channelName in status bar
florian-glombik Sep 9, 2024
b0d7942
Fixing reactivity for shortName
florian-glombik Sep 15, 2024
3968b22
Fixing reactivity of shortNameField
florian-glombik Sep 15, 2024
c6dc5d6
reduce logging
florian-glombik Sep 15, 2024
f238e8b
Improve variable names
florian-glombik Sep 15, 2024
c77cb35
Using signal within statusbar
florian-glombik Sep 15, 2024
51134a7
Using signal to pass statusbar sections
florian-glombik Sep 15, 2024
39ce68c
Fixing error on console
florian-glombik Sep 15, 2024
1b092d2
Fixing the status bar validation if plagiarism control is not displayed
florian-glombik Sep 15, 2024
73875b8
Fixing test
florian-glombik Sep 15, 2024
2154db3
Fixing test
florian-glombik Sep 15, 2024
d9c3947
Merge branch 'develop' into feature/programming-exercises/add-simple-…
florian-glombik Sep 15, 2024
76e404a
Fixing test for title channel name component
florian-glombik Sep 15, 2024
72d6b49
Removing unused variables
florian-glombik Sep 15, 2024
51d64aa
Fixing tests by using ViewChild instead of viewChild
florian-glombik Sep 15, 2024
d89b3c8
adjusting icon visibility and exchanging if with else
florian-glombik Sep 16, 2024
0ecee8f
Make another variable readonly
florian-glombik Sep 16, 2024
5e69119
fixing tests by not mocking titleChannelName component as ngMocks doe…
florian-glombik Sep 16, 2024
6554ce1
Fixing tests by setting default values for signals and removing conso…
florian-glombik Sep 16, 2024
389c507
Fixing client test
florian-glombik Sep 16, 2024
35bd860
Fixing tests
florian-glombik Sep 16, 2024
7249268
Fixing console error
florian-glombik Sep 16, 2024
c87aa12
Fixing reactivity
florian-glombik Sep 16, 2024
d67e612
Improve method name
florian-glombik Sep 16, 2024
79b43df
Fix reactivity of status bar
florian-glombik Sep 16, 2024
8ca0500
Adding tests
florian-glombik Sep 16, 2024
a0bfd52
Revert change for import
florian-glombik Sep 16, 2024
0b80635
Convert input field mapping to boolean mapping
florian-glombik Sep 16, 2024
2da5c9e
Adjusting mapping in update component
florian-glombik Sep 16, 2024
e408c7d
Use enum instead of type
florian-glombik Sep 16, 2024
c27c56e
Merge branch 'develop' into feature/programming-exercises/add-simple-…
EneaGore Sep 19, 2024
2e322eb
Adding endpoint to retrieve taken exercise names and short names
florian-glombik Sep 19, 2024
af0d48e
Only send shortnames when they are required
florian-glombik Sep 19, 2024
2420473
Fixing endpoint by fetching course with exercises and filtering null …
florian-glombik Sep 20, 2024
2b7f5a6
Adding endpoint call to service in client side
florian-glombik Sep 20, 2024
9b2defa
Adding custom validator for check against existing titles
florian-glombik Sep 22, 2024
553639c
Fixing reactivity for fetching course exercise details
florian-glombik Sep 22, 2024
f00e750
Adding validation for channelName (endpoint not returning the correct…
florian-glombik Sep 23, 2024
773c854
Fixing client test setup
florian-glombik Oct 2, 2024
b58e06a
Tests: Fixing setting input value
florian-glombik Oct 2, 2024
753facb
Tests: Using enum instead of type
florian-glombik Oct 3, 2024
4149978
Merge branch 'develop' into feature/programming-exercises/add-simple-…
florian-glombik Oct 3, 2024
9708a39
Refactor: use signal instead of Input
florian-glombik Oct 3, 2024
4bf87b2
Refactor: escape without changing meaning of regex
florian-glombik Oct 3, 2024
fee5e43
Refactor: do not escape
florian-glombik Oct 3, 2024
8250e01
Tests: fixing exam update tests by mocking validation directive
florian-glombik Oct 3, 2024
f1a5ecf
Tests: fixing title channel name tests by mocking validation directive
florian-glombik Oct 3, 2024
206e562
Tests: removing not needed blank line
florian-glombik Oct 3, 2024
b1ee4af
Server: directly fetch enum from jpa repository
florian-glombik Oct 3, 2024
3b3ffa6
Client: fixing usage of signal
florian-glombik Oct 3, 2024
a277c1b
Tests: fixing import of directive
florian-glombik Oct 3, 2024
8debc59
Tests: fixing logic of new test
florian-glombik Oct 3, 2024
7a37e6b
Revert "Server: directly fetch enum from jpa repository"
florian-glombik Oct 3, 2024
b8461e4
Server: Adjusting endpoint, channel names are not needed
florian-glombik Oct 3, 2024
c5cf707
Client: Adding error message when title / short name is already used
florian-glombik Oct 3, 2024
b811432
Client: Improve documentation of directive
florian-glombik Oct 3, 2024
b0f768c
Client: Adding invalid reason at the bottom for consistency
florian-glombik Oct 3, 2024
280dca7
Client: Adding validation for short names, only fetching the needed data
florian-glombik Oct 3, 2024
e598283
Client: add ! for consistency to translations
florian-glombik Oct 3, 2024
1a454b0
Client: make sure shortname is unique
florian-glombik Oct 3, 2024
3f1ab51
Tests: Fixing client test and adding new test
florian-glombik Oct 7, 2024
1eb7018
Merge branch 'develop' into feature/programming-exercises/add-simple-…
florian-glombik Oct 7, 2024
04ce88c
Tests: Fixing client test by mocking notIncluded directive
florian-glombik Oct 8, 2024
0c55a14
Merge branch 'develop' into feature/programming-exercises/add-simple-…
florian-glombik Oct 8, 2024
cd0f226
Using signals for help icon
florian-glombik Oct 8, 2024
621b349
Adding explanation for switching mode button
florian-glombik Oct 8, 2024
b0868d4
Saving last selection of edit mode in local storage
florian-glombik Oct 8, 2024
9ea2bac
Fix server style check
florian-glombik Oct 8, 2024
10c6ad6
Display error message to user when short name generation fails
florian-glombik Oct 12, 2024
9dde5db
Adjust endpoint to handle exercise types
florian-glombik Oct 12, 2024
fcabda0
Adjust endpoint to support exercise types
florian-glombik Oct 12, 2024
13b9a57
Simplify docu comment
florian-glombik Oct 12, 2024
756e15e
Add descriptive method name for effect
florian-glombik Oct 12, 2024
6992a37
Merge branch 'develop' into feature/programming-exercises/add-simple-…
florian-glombik Oct 12, 2024
a47e996
Fix theia vs online code editor
florian-glombik Oct 12, 2024
356409f
Add test for auth check
florian-glombik Oct 12, 2024
35df610
Add test for editor
florian-glombik Oct 12, 2024
20d207c
Simplify method for testsetup
florian-glombik Oct 12, 2024
e9a3aaf
Remove unused variable
florian-glombik Oct 12, 2024
d0c51fd
Fix client test by adding AlertService mock
florian-glombik Oct 12, 2024
1c2dbb7
Merge branch 'develop' into feature/programming-exercises/add-simple-…
florian-glombik Oct 12, 2024
33a2de9
Fix merge mistakes
florian-glombik Oct 12, 2024
b6d3a24
Fix import
florian-glombik Oct 12, 2024
8b85d91
Fix errors in html after merge
florian-glombik Oct 12, 2024
d0fe769
Do not support simple mode in import mode yet
florian-glombik Oct 12, 2024
b804c02
Fix client tests
florian-glombik Oct 12, 2024
ad9e2a2
Add client test to increase coverage
florian-glombik Oct 12, 2024
366e927
Add client test to increase coverage
florian-glombik Oct 12, 2024
5fad596
Add client test to increase coverage
florian-glombik Oct 12, 2024
c161da3
Merge branch 'develop' into feature/programming-exercises/add-simple-…
florian-glombik Oct 12, 2024
b3e4bba
Add client test to increase coverage
florian-glombik Oct 13, 2024
7b98035
Add client test to increase coverage (and simplify setup by extending…
florian-glombik Oct 13, 2024
56d794f
Add client test to increase coverage
florian-glombik Oct 13, 2024
526a89f
Add client test to increase coverage
florian-glombik Oct 13, 2024
f1f8580
Add client test to increase coverage
florian-glombik Oct 13, 2024
0732230
Trigger pipeline for E2E tests
florian-glombik Oct 13, 2024
4d9bf84
Merge branch 'develop' into feature/programming-exercises/add-simple-…
florian-glombik Oct 16, 2024
48f903d
Fix e2e tests by switching to advanced mode
florian-glombik Oct 16, 2024
4c6ac59
Fix e2e tests by switching to advanced mode
florian-glombik Oct 16, 2024
054a95d
Fix e2e tests by switching to advanced mode
florian-glombik Oct 17, 2024
bdefa3c
Automatically set the shortName in simple mode if it was not defined …
florian-glombik Oct 17, 2024
4404a2e
Fix reactivity of status bar
florian-glombik Oct 17, 2024
1e39af9
Merge branch 'develop' into feature/programming-exercises/add-simple-…
florian-glombik Oct 17, 2024
4b30638
Address Patriks Feedback
florian-glombik Oct 18, 2024
83f282e
Merge branch 'develop' into feature/programming-exercises/add-simple-…
florian-glombik Oct 18, 2024
13db79f
Address Patriks Feedback
florian-glombik Oct 18, 2024
d110eae
Address Patriks Feedback
florian-glombik Oct 18, 2024
8ab6d0a
Merge branch 'develop' into feature/programming-exercises/add-simple-…
florian-glombik Oct 19, 2024
6492473
Merge branch 'develop' into feature/programming-exercises/add-simple-…
Strohgelaender Oct 21, 2024
464c72d
Hide add auxiliary repository button and the edit checkout directory …
florian-glombik Oct 21, 2024
df6339d
Hide checkout directory edit fields and disable switching back button…
florian-glombik Oct 22, 2024
eea56d9
Add tooltip when button is disabled
florian-glombik Oct 22, 2024
7a09c46
Address Ramonas Review
florian-glombik Oct 22, 2024
cf41c7a
Merge branch 'develop' into feature/programming-exercises/add-simple-…
florian-glombik Oct 22, 2024
fabe954
Fix client test
florian-glombik Oct 22, 2024
6e612ff
Merge branch 'develop' into feature/programming-exercises/add-simple-…
florian-glombik Oct 23, 2024
0c0e4ba
Fix usability issue in edit mode with title selection
florian-glombik Oct 23, 2024
90c1171
Fix statusbar in edit mode
florian-glombik Oct 23, 2024
7384861
List vs Set
florian-glombik Oct 23, 2024
b910eed
Merge branch 'develop' into feature/programming-exercises/add-simple-…
florian-glombik Oct 24, 2024
c02764a
Resolve output conflict with dom event
florian-glombik Oct 24, 2024
76ecb41
Fix error preventing commit
florian-glombik Oct 25, 2024
be4195e
Merge branch 'develop' into feature/programming-exercises/add-simple-…
florian-glombik Oct 25, 2024
592ce3c
Merge branch 'develop' into feature/programming-exercises/add-simple-…
florian-glombik Oct 27, 2024
d5e0154
Re-add lintignore
florian-glombik Oct 27, 2024
8857b36
Re-add lintignore
florian-glombik Oct 27, 2024
8fc5591
Log selected project type and available project types
florian-glombik Oct 27, 2024
7784aa8
Fix the project type selection if only Maven is supported
florian-glombik Oct 27, 2024
4262e05
Adjust auto selection to plain gradle vs plain maven
florian-glombik Oct 27, 2024
3dbe62c
Merge branch 'develop' into feature/programming-exercises/add-simple-…
florian-glombik Oct 27, 2024
82d41db
Fix mistake from merge
florian-glombik Oct 27, 2024
83d5644
Make sure the creation config is updated accordingly
florian-glombik Oct 27, 2024
5d2e8b2
Merge branch 'develop' into feature/programming-exercises/add-simple-…
florian-glombik Oct 27, 2024
301b8f2
Setting project type on programmingExercise object
florian-glombik Oct 27, 2024
0cc555e
Merge branch 'develop' into feature/programming-exercises/add-simple-…
florian-glombik Oct 27, 2024
451facb
Remove comments
florian-glombik Oct 27, 2024
beb84bd
Adjust method name
florian-glombik Oct 27, 2024
88132d1
Merge branch 'develop' into feature/programming-exercises/add-simple-…
florian-glombik Oct 27, 2024
1b72589
Add test to increase coverage
florian-glombik Oct 28, 2024
8955573
Move tests to subpart of save() tests
florian-glombik Oct 28, 2024
eec56cd
Merge branch 'develop' into feature/programming-exercises/add-simple-…
florian-glombik Oct 28, 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,9 @@
package de.tum.cit.aet.artemis.core.dto;

import java.util.Set;

import com.fasterxml.jackson.annotation.JsonInclude;

@JsonInclude(JsonInclude.Include.NON_EMPTY)
public record CourseExistingExerciseDetailsDTO(Set<String> exerciseTitles, Set<String> shortNames) {
}
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@
import de.tum.cit.aet.artemis.core.config.Constants;
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.dto.CourseExistingExerciseDetailsDTO;
import de.tum.cit.aet.artemis.core.dto.CourseForArchiveDTO;
import de.tum.cit.aet.artemis.core.dto.CourseForDashboardDTO;
import de.tum.cit.aet.artemis.core.dto.CourseForImportDTO;
Expand All @@ -97,6 +98,7 @@
import de.tum.cit.aet.artemis.core.security.annotations.EnforceAtLeastInstructor;
import de.tum.cit.aet.artemis.core.security.annotations.EnforceAtLeastStudent;
import de.tum.cit.aet.artemis.core.security.annotations.EnforceAtLeastTutor;
import de.tum.cit.aet.artemis.core.security.annotations.enforceRoleInCourse.EnforceAtLeastEditorInCourse;
import de.tum.cit.aet.artemis.core.service.AuthorizationCheckService;
import de.tum.cit.aet.artemis.core.service.CourseService;
import de.tum.cit.aet.artemis.core.service.FilePathService;
Expand All @@ -107,6 +109,7 @@
import de.tum.cit.aet.artemis.exam.repository.ExamRepository;
import de.tum.cit.aet.artemis.exercise.domain.Exercise;
import de.tum.cit.aet.artemis.exercise.domain.ExerciseMode;
import de.tum.cit.aet.artemis.exercise.domain.ExerciseType;
import de.tum.cit.aet.artemis.exercise.domain.Submission;
import de.tum.cit.aet.artemis.exercise.domain.Team;
import de.tum.cit.aet.artemis.exercise.domain.participation.Participant;
Expand Down Expand Up @@ -1473,4 +1476,35 @@ public ResponseEntity<Long> getNumberOfAllowedComplaintsInCourse(@PathVariable L
long unacceptedComplaints = complaintService.countUnacceptedComplaintsByParticipantAndCourseId(participant, courseId);
return ResponseEntity.ok(Math.max(complaintService.getMaxComplaintsPerParticipant(course, participant) - unacceptedComplaints, 0));
}

/**
* GET courses/{courseId}/existing-exercise-details: Get the exercise names (and shortNames for {@link ExerciseType#PROGRAMMING} exercises)
* of all exercises with the given type in the given course.
*
* @param courseId of the course for which all exercise names should be fetched
* @param exerciseType for which the details should be fetched, as the name of an exercise only needs to be unique for each exercise type
* @return {@link CourseExistingExerciseDetailsDTO} with the exerciseNames (and already used shortNames if a {@link ExerciseType#PROGRAMMING} exercise is requested)
*/
@GetMapping("courses/{courseId}/existing-exercise-details")
florian-glombik marked this conversation as resolved.
Show resolved Hide resolved
@EnforceAtLeastEditorInCourse
public ResponseEntity<CourseExistingExerciseDetailsDTO> getExistingExerciseDetails(@PathVariable Long courseId, @RequestParam String exerciseType) {
log.debug("REST request to get details of existing exercises in course : {}", courseId);
Course course = courseRepository.findByIdWithEagerExercisesElseThrow(courseId);

Set<String> alreadyTakenExerciseNames = new HashSet<>();
Set<String> alreadyTakenShortNames = new HashSet<>();

boolean includeShortNames = exerciseType.equals(ExerciseType.PROGRAMMING.toString());

course.getExercises().forEach((exercise -> {
if (exercise.getType().equals(exerciseType)) {
alreadyTakenExerciseNames.add(exercise.getTitle());
if (includeShortNames && exercise.getShortName() != null) {
alreadyTakenShortNames.add(exercise.getShortName());
}
}
}));

return ResponseEntity.ok(new CourseExistingExerciseDetailsDTO(alreadyTakenExerciseNames, alreadyTakenShortNames));
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -367,7 +367,7 @@ export class CourseDetailComponent implements OnInit, OnDestroy {
if (this.paramSub) {
this.paramSub.unsubscribe();
}
this.eventManager.destroy(this.eventSubscriber);
this.eventManager?.destroy(this.eventSubscriber);
florian-glombik marked this conversation as resolved.
Show resolved Hide resolved
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,6 @@ const ENTITY_STATES = [...examManagementState];
ArtemisMarkdownEditorModule,
NgxDatatableModule,
ArtemisDataTableModule,
ArtemisTextExerciseModule,
ArtemisFileUploadExerciseManagementModule,
ArtemisProgrammingExerciseManagementModule,
ArtemisQuizManagementModule,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,7 @@
<div class="d-flex align-items-center">
@if (!isImport) {
<h4 jhiTranslate="artemisApp.examManagement.createExam"></h4>
}
@if (isImport) {
} @else {
<h4 jhiTranslate="artemisApp.examManagement.importExam"></h4>
}
<jhi-documentation-button [type]="documentationType" />
Expand Down
18 changes: 9 additions & 9 deletions src/main/webapp/app/exam/manage/exams/exam-update.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,28 +24,27 @@ import { examWorkingTime, normalWorkingTime } from 'app/exam/participate/exam.ut
templateUrl: './exam-update.component.html',
})
export class ExamUpdateComponent implements OnInit, OnDestroy {
protected readonly faSave = faSave;
protected readonly faBan = faBan;
protected readonly faExclamationTriangle = faExclamationTriangle;
protected readonly documentationType: DocumentationType = 'Exams';

exam: Exam;
course: Course;
isSaving: boolean;
isImport = false;
isImportInSameCourse = false;
hideChannelNameInput = false;

hideChannelNameInput = false;
private originalStartDate?: dayjs.Dayjs;

private originalEndDate?: dayjs.Dayjs;

private componentActive = true;

// Link to the component enabling the selection of exercise groups and exercises for import
@ViewChild(ExamExerciseImportComponent) examExerciseImportComponent: ExamExerciseImportComponent;
@ViewChild('workingTimeConfirmationContent') public workingTimeConfirmationContent: TemplateRef<any>;

readonly documentationType: DocumentationType = 'Exams';

// Icons
faSave = faSave;
faBan = faBan;
faExclamationTriangle = faExclamationTriangle;
@ViewChild('workingTimeConfirmationContent') public workingTimeConfirmationContent: TemplateRef<any>;

constructor(
private route: ActivatedRoute,
Expand Down Expand Up @@ -471,6 +470,7 @@ export class ExamUpdateComponent implements OnInit, OnDestroy {
dayjs(this.exam.exampleSolutionPublicationDate).isBefore(this.exam.endDate || null)
);
}

/**
* Default exam start text, which can be edited by instructors in the text editor
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -230,8 +230,8 @@ <h3 jhiTranslate="artemisApp.exercise.sections.grading" id="artemisApp.exercise.
[isDisabled]="
!!(editForm.form.invalid || fileUploadExercise.dueDateError || fileUploadExercise.assessmentDueDateError || fileUploadExercise.exampleSolutionPublicationDateError)
"
(cancel)="previousState()"
(save)="save()"
(cancelAction)="previousState()"
(saveAction)="save()"
[(notificationText)]="notificationText"
/>
</form>
Original file line number Diff line number Diff line change
Expand Up @@ -275,8 +275,8 @@ <h3 jhiTranslate="artemisApp.exercise.sections.grading" id="artemisApp.exercise.
[isCreation]="!modelingExercise.id"
[isSaving]="isSaving"
[isDisabled]="!!(editForm.form.invalid || modelingExercise.dueDateError || modelingExercise.assessmentDueDateError || modelingExercise.exampleSolutionPublicationDateError)"
(cancel)="previousState()"
(save)="save()"
(cancelAction)="previousState()"
(saveAction)="save()"
[(notificationText)]="notificationText"
/>
</form>
Original file line number Diff line number Diff line change
Expand Up @@ -17,16 +17,14 @@ import { faPlus } from '@fortawesome/free-solid-svg-icons';
`,
})
export class AddAuxiliaryRepositoryButtonComponent {
ButtonType = ButtonType;
ButtonSize = ButtonSize;
protected readonly ButtonType = ButtonType;
protected readonly ButtonSize = ButtonSize;
protected readonly faPlus = faPlus;

@Input() programmingExercise: ProgrammingExercise;

@Output() onRefresh: EventEmitter<any> = new EventEmitter<any>();

// Icons
faPlus = faPlus;

/**
* Adds a new auxiliary repository, which is displayed as a new row, to the respective programming exercise and activates the angular change detection.
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ <h2 id="jhi-programming-exercise-heading-import" jhiTranslate="artemisApp.progra
}
<jhi-documentation-button [type]="documentationType" />
</div>
<jhi-form-status-bar [formStatusSections]="formStatusSections" />
<jhi-form-status-bar [formStatusSections]="formStatusSections()" />
<form name="editForm" role="form" novalidate #editForm="ngForm" (keydown.enter)="isEventInsideTextArea($event)">
<div class="update-programming-exercise">
<jhi-programming-exercise-info
Expand All @@ -19,19 +19,33 @@ <h2 id="jhi-programming-exercise-heading-import" jhiTranslate="artemisApp.progra
[isImport]="isImportFromExistingExercise || isImportFromFile"
[isLocal]="isLocal"
[importOptions]="importOptions"
[isSimpleMode]="isSimpleMode()"
[isEditFieldDisplayedRecord]="isEditFieldDisplayedRecord()"
[courseId]="courseId"
[(isAuxiliaryRepositoryInputValid)]="isAuxiliaryRepositoryInputValid"
/>
<hr class="mb-5" />
<jhi-programming-exercise-difficulty
@if (!isSimpleMode()) {
<!-- The mode section would only contain the difficulty in the simple mode,
in the simple mode the difficulty will be part of the general section -->
florian-glombik marked this conversation as resolved.
Show resolved Hide resolved
<jhi-programming-exercise-mode
[programmingExercise]="programmingExercise"
[programmingExerciseCreationConfig]="getProgrammingExerciseCreationConfig()"
[isEditFieldDisplayedRecord]="isEditFieldDisplayedRecord()"
(triggerValidation)="calculateFormStatusSections()"
/>
<hr class="mb-5" />
}
<jhi-programming-exercise-language
[programmingExercise]="programmingExercise"
[programmingExerciseCreationConfig]="getProgrammingExerciseCreationConfig()"
(triggerValidation)="calculateFormStatusSections()"
[isEditFieldDisplayedRecord]="isEditFieldDisplayedRecord()"
/>
<hr class="mb-5" />
<jhi-programming-exercise-language [programmingExercise]="programmingExercise" [programmingExerciseCreationConfig]="getProgrammingExerciseCreationConfig()" />
<hr class="mb-5" />
<jhi-programming-exercise-problem
[(exercise)]="programmingExercise"
[programmingExerciseCreationConfig]="getProgrammingExerciseCreationConfig()"
[isEditFieldDisplayedRecord]="isEditFieldDisplayedRecord()"
(problemStatementChange)="calculateFormStatusSections()"
/>
<hr class="mb-5" />
Expand All @@ -40,18 +54,22 @@ <h2 id="jhi-programming-exercise-heading-import" jhiTranslate="artemisApp.progra
[programmingExercise]="programmingExercise"
[programmingExerciseCreationConfig]="getProgrammingExerciseCreationConfig()"
[importOptions]="importOptions"
[isEditFieldDisplayedRecord]="isEditFieldDisplayedRecord()"
/>
@if (!isExamMode) {
@if (isEditFieldDisplayedRecord().plagiarismControl && !isExamMode) {
<jhi-exercise-update-plagiarism [exercise]="programmingExercise" />
}
<jhi-form-footer
[isCreation]="!programmingExercise.id"
[isImport]="isImportFromExistingExercise || isImportFromFile"
[isSaving]="isSaving"
[invalidReasons]="getInvalidReasons()"
(save)="save()"
(cancel)="previousState()"
[(notificationText)]="notificationText"
[isSimpleMode]="isSimpleMode()"
[switchEditMode]="switchEditMode"
[areAuxiliaryRepositoriesValid]="isAuxiliaryRepositoryInputValid()"
[invalidReasons]="getInvalidReasons()"
(saveAction)="save()"
(cancelAction)="previousState()"
/>
</div>
</form>
Expand Down
Loading
Loading