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

Feature/481-487 increase min upvotes per post for distribution workflow #502

Merged
Show file tree
Hide file tree
Changes from all 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
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# Ignore all node_modules folders
node_modules
/.vscode/launch.json
.DS_Store
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,7 @@ <h2 style="margin-top: 20px">Board Type</h2>
>
Idea generation
</mat-radio-button>
<mat-radio-button
style="margin-left: 10px"
value="QUESTION_AUTHORING"
>
<mat-radio-button style="margin-left: 10px" value="QUESTION_AUTHORING">
Question Authoring
</mat-radio-button>
</mat-radio-group>
Expand Down Expand Up @@ -60,8 +57,8 @@ <h2 style="margin-top: 20px">Board Type</h2>
>
<mat-slider
class="slider"
min="0"
max="10"
min="1"
max="20"
step="1"
[(ngModel)]="upvoteLimit"
thumbLabel
Expand All @@ -75,7 +72,7 @@ <h2 style="margin-top: 20px">Board Type</h2>
<p>
<mat-checkbox [(ngModel)]="permissions.showSnackBarStudent">
Display task description when board is opened
</mat-checkbox>
</mat-checkbox>
</p>
<h4>Set Background Image:</h4>
<mat-chip (click)="compressFile()" color="primary" selected>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -260,7 +260,7 @@ export class AddPostComponent {
title: this.title,
desc: this.message,
tags: this.tags,
displayAttributes: null,
displayAttributes: { fillColor: this.defaultPostFill() },
};
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,8 @@ import { PostService } from 'src/app/services/post.service';
import {
NEEDS_ATTENTION_TAG,
POST_TAGGED_BORDER_THICKNESS,
STUDENT_POST_COLOR,
TEACHER_POST_COLOR,
SocketEvent,
} from 'src/app/utils/constants';
import { SocketService } from 'src/app/services/socket.service';
Expand Down Expand Up @@ -360,6 +362,7 @@ export class CkWorkspaceComponent implements OnInit, OnDestroy {
top: 150,
},
lock: !this.board.permissions.allowStudentMoveAny,
fillColor: this.defaultPostFill(),
};
post.boardID = this.runningGroupTask?.workflow.destinations[0].id;
post.displayAttributes = displayAttributes;
Expand Down Expand Up @@ -655,4 +658,10 @@ export class CkWorkspaceComponent implements OnInit, OnDestroy {
data: data,
});
}

defaultPostFill() {
return this.userService.user?.role === Role.TEACHER
? TEACHER_POST_COLOR
: STUDENT_POST_COLOR;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,7 @@ <h1 mat-dialog-title>Board Configuration</h1>
<mat-tab-group dynamicHeight animationDuration="0ms">
<mat-tab label="Board">
<div class="board-name-form">
<mat-form-field
appearance="outline"
style="width: 100%;"
>
<mat-form-field appearance="outline" style="width: 100%">
<mat-label>Board Name</mat-label>
<input
matInput
Expand All @@ -27,7 +24,7 @@ <h1 mat-dialog-title>Board Configuration</h1>
<p>
<mat-checkbox [(ngModel)]="permissions.showSnackBarStudent"
>Display task description when board is opened
</mat-checkbox>
</mat-checkbox>
</p>
<h2 class="section-title">Voting</h2>
<div>
Expand All @@ -36,17 +33,22 @@ <h2 class="section-title">Voting</h2>
>
<mat-slider
class="slider"
min="0"
max="10"
min="1"
max="20"
step="1"
[(ngModel)]="upvoteLimit"
thumbLabel
></mat-slider>
<mat-chip class="config-button" mat-raised-button color="warn" (click)="openVoteDeleteDialog()" style="text-align: center" selected>
<mat-icon class="chip-icon" >clear_all</mat-icon>
<span style="width: 100%;text-align: center;">
Clear Votes
</span>
<mat-chip
class="config-button"
mat-raised-button
color="warn"
(click)="openVoteDeleteDialog()"
style="text-align: center"
selected
>
<mat-icon class="chip-icon">clear_all</mat-icon>
<span style="width: 100%; text-align: center"> Clear Votes </span>
</mat-chip>
</div>

Expand All @@ -72,7 +74,9 @@ <h2 class="section-title">Board</h2>
selected
(click)="compressFile()"
>
<mat-icon class="chip-icon" (click)="removeImage()">upload</mat-icon>
<mat-icon class="chip-icon" (click)="removeImage()"
>upload</mat-icon
>
<span>Upload New Background Image</span>
</mat-chip>
<mat-chip
Expand All @@ -88,7 +92,9 @@ <h2 class="section-title">Board</h2>
</div>
<div *ngIf="currentBgImage">
<div style="margin-top: 15px">
<mat-label style="font-weight: bold">Background Size: {{ backgroundScale }}%</mat-label>
<mat-label style="font-weight: bold"
>Background Size: {{ backgroundScale }}%</mat-label
>
<mat-slider
class="slider"
min="0"
Expand All @@ -103,43 +109,60 @@ <h2 class="section-title">Board</h2>
<div class="bg-position-form">
<mat-form-field>
<mat-label>Background Pos X</mat-label>
<input
matInput
type="number"
[(ngModel)]="backgroundPosX"
/>
<input matInput type="number" [(ngModel)]="backgroundPosX" />
</mat-form-field>
<mat-form-field>
<mat-label>Background Pos Y</mat-label>
<input
matInput
type="number"
[(ngModel)]="backgroundPosY"
/>
<input matInput type="number" [(ngModel)]="backgroundPosY" />
</mat-form-field>
</div>
</div>
</div>
</div>
<h2 class="section-title">Content Settings</h2>
<div style="display: grid; grid-template-columns: 1fr 1fr;">
<mat-chip class="config-button" *ngIf="board.scope === BoardScope.PROJECT_PERSONAL" mat-raised-button color="accent" (click)="copyConfiguration()" style="text-align: center" selected>
<mat-icon class="chip-icon" style="width: 0px;overflow: initial;">file_copy</mat-icon>
<span style="width: 100%; text-align: center; font-size: smaller;">
Copy Configuration to all Personal {{isTeacherPersonalBoard ? 'Teacher' : 'Student'}} Boards
<div style="display: grid; grid-template-columns: 1fr 1fr">
<mat-chip
class="config-button"
*ngIf="board.scope === BoardScope.PROJECT_PERSONAL"
mat-raised-button
color="accent"
(click)="copyConfiguration()"
style="text-align: center"
selected
>
<mat-icon class="chip-icon" style="width: 0px; overflow: initial"
>file_copy</mat-icon
>
<span style="width: 100%; text-align: center; font-size: smaller">
Copy Configuration to all Personal
{{ isTeacherPersonalBoard ? 'Teacher' : 'Student' }} Boards
</span>
</mat-chip>
<mat-chip class="config-button" mat-raised-button color="warn" (click)="handleClearBoard()" style="text-align: center" selected>
<mat-icon class="chip-icon" style="width: 0px;overflow: initial;">clear_all</mat-icon>
<span style="width: 100%;text-align: center;">
Clear Board
</span>
<mat-chip
class="config-button"
mat-raised-button
color="warn"
(click)="handleClearBoard()"
style="text-align: center"
selected
>
<mat-icon class="chip-icon" style="width: 0px; overflow: initial"
>clear_all</mat-icon
>
<span style="width: 100%; text-align: center"> Clear Board </span>
</mat-chip>
<mat-chip class="config-button" mat-raised-button color="warn" (click)="handleDeleteBoard()" style="text-align: center" selected>
<mat-icon class="chip-icon" style="width: 0px;overflow: initial;">delete</mat-icon>
<span style="width: 100%;text-align: center;">
Delete Board
</span>
<mat-chip
class="config-button"
mat-raised-button
color="warn"
(click)="handleDeleteBoard()"
style="text-align: center"
selected
>
<mat-icon class="chip-icon" style="width: 0px; overflow: initial"
>delete</mat-icon
>
<span style="width: 100%; text-align: center"> Delete Board </span>
</mat-chip>
</div>
</mat-tab>
Expand Down Expand Up @@ -174,7 +197,8 @@ <h2 class="section-title">Content Settings</h2>
<h2 style="margin-top: 20px">Post Features</h2>
<p>
<mat-checkbox [(ngModel)]="permissions.allowStudentMoveAny"
>Allow students to move any post</mat-checkbox>
>Allow students to move any post</mat-checkbox
>
</p>
<h2 style="margin-top: 20px">Post Features</h2>
<p>
Expand Down Expand Up @@ -223,7 +247,15 @@ <h2>UI Elements</h2>
[ngStyle]="{ 'background-color': tag.color }"
>
{{ tag.name }}
<mat-icon *ngIf="tag?.specialAttributes?.borderWidth !== _POST_TAGGED_BORDER_THICKNESS" class="cancel" (click)="removeTag(tag)">cancel</mat-icon>
<mat-icon
*ngIf="
tag?.specialAttributes?.borderWidth !==
_POST_TAGGED_BORDER_THICKNESS
"
class="cancel"
(click)="removeTag(tag)"
>cancel</mat-icon
>
</mat-chip>
</mat-chip-list>
</div>
Expand Down Expand Up @@ -269,4 +301,4 @@ <h2>UI Elements</h2>
>
Update Configuration!
</button>
</div>
</div>
Loading
Loading