Skip to content
Merged
Show file tree
Hide file tree
Changes from 3 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 @@ -5,12 +5,13 @@ <h1 i18n="@@createGroupsHeader">Create groups</h1>
<p i18n="@@createGroupsDescription">
Here you can divide the members of your class into groups.
Drag a member into an existing group or onto the new group.
If you do not wish to assign a student to this assignment, you can keep them into the "Members" section.
</p>

<span style="display: flex; align-items: center;">
<h2 i18n="@@createGroupMembers">Members</h2>
<button mat-raised-button (click)="partitionMembers()" id="assign-all-button" style="margin-left: 75px;">
<p>Assign all</p>
<p i18n="@@assignAllGroupMembers">Assign all</p>
</button>
</span>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
align-items: center;
justify-content: center;


gap: 20px;
}

Expand Down
28 changes: 13 additions & 15 deletions frontend/src/app/components/create-group/create-group.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -110,21 +110,19 @@ export class CreateGroupComponent {
* Make a call to the API to create the made groups.
*/
public createGroups(): void {
if (this.members.length > 0) {
this.openSnackBar($localize`There are still members not assigned to a group.`);
} else {
const nonEmptyGroups = this.groups.filter(group => group.length > 0);

this.groupService.createGroups(nonEmptyGroups, this.assignmentId!)
.subscribe((response) => {
if (response) {
this.openSnackBar($localize`Groups created successfully.`);
this.groupsCreated.emit();
} else {
this.openSnackBar($localize`Failed to create groups.`);
}
})
}
const nonEmptyGroups = this.groups.filter(group => group.length > 0);

console.log(nonEmptyGroups)

this.groupService.createGroups(nonEmptyGroups, this.assignmentId!)
.subscribe((response) => {
if (response) {
this.openSnackBar($localize`Groups created successfully.`);
this.groupsCreated.emit();
} else {
this.openSnackBar($localize`Failed to create groups.`);
}
});
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,11 @@
<div class="base">
@if(showLearningPath){
<app-learning-path [hruid]="learningPathId" [language]="language" [assignment]="false"></app-learning-path>

}
<div class="right-side">
<mat-card-title i18n>Create your Assignment</mat-card-title>
<app-create-assignment (showGroups)="showGroups()"></app-create-assignment>
</div>

</div>
</div>
</div>
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,14 @@
justify-content: center;
}

.wrap {
margin: 30px;
}
// .wrap {
// margin: 30px;
// }

.right-side {
width: inherit;
padding-left: 10%;
}
// .right-side {
// width: inherit;
// padding-left: 10%;
// }

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@lennertdr does this break the responsivity that you put up last night?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nope its alright, responsive part lies in the media query

.mat-mdc-card-title,
.mat-mdc-card-subtitle {
Expand All @@ -30,4 +30,4 @@
.base {
flex-direction: column;
}
}
}
2 changes: 1 addition & 1 deletion frontend/src/custom-theme.scss
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,4 @@ html {
typography: Roboto,
density: 0,
));
}
}