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

Development: Remove outdated references to the clone button #9063

Merged
merged 6 commits into from
Jul 17, 2024
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
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
Expand Up @@ -61,7 +61,7 @@ <h3 class="text-align-left fw-normal">
</jhi-code-editor-container>
</div>
}
<!-- ngIf Offline IDE clone button start -->
<!-- ngIf Offline IDE code button start -->
@if (!exercise.allowOnlineEditor && exercise.allowOfflineIde) {
<div>
<div class="d-flex my-3 ms-1 align-items-center justify-content-between">
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<jhi-exercise-details-student-actions [exercise]="exercise" [courseId]="courseId" [smallButtons]="smallButtons" [examMode]="examMode">
<ng-template #overrideCloneOnlineEditorButton>
<ng-template #overrideCodeAndOnlineEditorButton>
@if (isOfflineIdeAllowed && (orionState.view !== ExerciseView.STUDENT || orionState.opened !== this.exercise.id)) {
<jhi-ide-button
[featureToggle]="FeatureToggle.ProgrammingExercises"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -106,10 +106,10 @@
(practiceModeStarted)="receiveNewParticipation($event)"
/>
}
<!-- TODO: Exam mode reuses the whole component at the moment. We need the clone repo button but not the open
code editor button. We should think about refactoring the clone repo button into an own component -->
<!-- TODO: Exam mode reuses the whole component at the moment. We need the code button but not the open
code editor button. We should think about refactoring the code button into an own component -->
pzdr7 marked this conversation as resolved.
Show resolved Hide resolved
@if (shouldDisplayIDEButtons()) {
<ng-container *jhiExtensionPoint="overrideCloneOnlineEditorButton; context: { exercise: exercise }">
<ng-container *jhiExtensionPoint="overrideCodeAndOnlineEditorButton; context: { exercise: exercise }">
pzdr7 marked this conversation as resolved.
Show resolved Hide resolved
@if (!examMode && programmingExercise?.allowOnlineEditor) {
<jhi-open-code-editor-button
[loading]="!!exercise.loading"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ export class ExerciseDetailsStudentActionsComponent implements OnInit, OnChanges
@Input() examMode: boolean;

// extension points, see shared/extension-point
@ContentChild('overrideCloneOnlineEditorButton') overrideCloneOnlineEditorButton: TemplateRef<any>;
@ContentChild('overrideCodeAndOnlineEditorButton') overrideCodeAndOnlineEditorButton: TemplateRef<any>;

uninitializedQuiz: boolean;
quizNotStarted: boolean;
Expand Down Expand Up @@ -265,7 +265,7 @@ export class ExerciseDetailsStudentActionsComponent implements OnInit, OnChanges
}

/**
* Display the 'open code editor' or 'clone repo' buttons if
* Display the 'open code editor' or 'code' buttons if
* - the participation is initialized (build plan exists, this is always the case during an exam), or
* - the participation is inactive (build plan cleaned up), but can not be resumed (e.g. because we're after the due date)
*
Expand Down
2 changes: 1 addition & 1 deletion src/main/webapp/i18n/de/exercise.json
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@
"type": "Typ",
"mcqType": "Multiple-Choice Fragen",
"dndType": "Drag und Drop Fragen",
"personalRepositoryClone": "Dein persönliches Repository wurde eingerichtet. Klicke auf den Button <i>Repository klonen</i>!",
"personalRepositoryClone": "Dein persönliches Repository wurde eingerichtet. Klicke auf den <i>Code</i>-Button!",
"personalRepositoryOnline": "Dein persönliches Repository wurde eingerichtet. Klicke auf den Button <i>Programmiereditor öffnen</i>!",
"resumeProgrammingExercise": "Die Aufgabe wurde wieder aufgenommen. Du kannst nun weiterarbeiten!",
"feedbackRequestSent": "Deine Feedbackanfrage wurde gesendet.",
Expand Down
2 changes: 1 addition & 1 deletion src/main/webapp/i18n/en/exercise.json
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@
"type": "Type",
"mcqType": "Multiple Choice Question",
"dndType": "Drag and Drop Question",
"personalRepositoryClone": "Your personal repository has been set up. Click the button <i>Clone repository</i>!",
"personalRepositoryClone": "Your personal repository has been set up. Click the <i>Code</i> button!",
"personalRepositoryOnline": "Your personal repository has been set up. Click the button <i>Open code editor</i>!",
"resumeProgrammingExercise": "The exercise has been resumed. You can now continue working on the exercise!",
"feedbackRequestSent": "Your feedback request has been sent.",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -165,21 +165,21 @@ describe('ProgrammingExamSummaryComponent', () => {
expect(component.feedbackComponentParameters.result).toEqual(result);
expect(component.feedbackComponentParameters.exerciseType).toEqual(programmingExercise.type);

const modelingSubmissionComponent = fixture.debugElement.query(By.directive(FeedbackComponent))?.componentInstance;
expect(modelingSubmissionComponent).toBeTruthy();
const feedbackComponent = fixture.debugElement.query(By.directive(FeedbackComponent))?.componentInstance;
expect(feedbackComponent).toBeTruthy();
});

it('should not show results if not yet published', () => {
component.isAfterResultsArePublished = false;

fixture.detectChanges();

const modelingSubmissionComponent = fixture.debugElement.query(By.directive(FeedbackComponent))?.componentInstance;
expect(modelingSubmissionComponent).not.toBeTruthy();
const feedbackComponent = fixture.debugElement.query(By.directive(FeedbackComponent))?.componentInstance;
expect(feedbackComponent).not.toBeTruthy();
});

it('should display clone button', () => {
const modelingSubmissionComponent = fixture.debugElement.query(By.directive(CodeButtonComponent))?.componentInstance;
expect(modelingSubmissionComponent).toBeTruthy();
it('should display code button', () => {
const codeButtonComponent = fixture.debugElement.query(By.directive(CodeButtonComponent))?.componentInstance;
expect(codeButtonComponent).toBeTruthy();
});
});
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ describe('CodeButtonComponent', () => {
versionControlUrl: 'https://gitlab.ase.in.tum.de/scm/ITCPLEASE1/itcplease1-exercise-team1.git',
versionControlAccessToken: true,
git: {
branch: 'clone-repo-button',
branch: 'code-button',
commit: {
id: {
abbrev: '95ef2a',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ describe('NavbarComponent', () => {

const profileInfo = {
git: {
branch: 'clone-repo-button',
branch: 'code-button',
commit: {
id: {
abbrev: '95ef2a',
Expand Down Expand Up @@ -278,7 +278,7 @@ describe('NavbarComponent', () => {
fixture.detectChanges();

expect(component.gitCommitId).toBe('95ef2a');
expect(component.gitBranchName).toBe('clone-repo-button');
expect(component.gitBranchName).toBe('code-button');
expect(component.gitTimestamp).toBe('Sun, 20 Nov 2022 20:35:01 GMT');
expect(component.gitUsername).toBe('Max Musterman');
}));
Expand Down
4 changes: 2 additions & 2 deletions src/test/javascript/spec/service/profile.service.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ describe('Profile Service', () => {
allowedEmailPatternReadable: '@tum.de, @in.tum.de, @mytum.de',
activeProfiles: ['prod', 'jenkins', 'gitlab', 'athena', 'openapi', 'apollon'],
git: {
branch: 'clone-repo-button',
branch: 'code-button',
commit: {
id: {
abbrev: '95ef2a',
Expand Down Expand Up @@ -249,7 +249,7 @@ describe('Profile Service', () => {
},
],
git: {
branch: 'clone-repo-button',
branch: 'code-button',
commit: {
id: {
abbrev: '95ef2a',
Expand Down
Loading