Skip to content

Commit

Permalink
release v3.1.2
Browse files Browse the repository at this point in the history
  • Loading branch information
Kunniii committed Oct 3, 2023
1 parent 9653c13 commit 47b8140
Show file tree
Hide file tree
Showing 3 changed files with 38 additions and 29 deletions.
28 changes: 6 additions & 22 deletions RELEASE.md
Original file line number Diff line number Diff line change
@@ -1,30 +1,14 @@
# New release 🎉 🎉

Pre-release version 3.0
Release version 3.1.2

---
Bug fix for 3.1.1

This is the big update, switching to Vue for frontend. And works with EDN new API!
## Fixes ✨✨

## Features ✨✨

1. Shortcuts

To access the extension from Chrome/Edge use `Ctrl +B`

In the main menu, you can either press `1`, `2`, or `3` to trigger `Teammates`, `Groups`, and `Comments` grading respectively.

2. Interactive UX/UI

The extension will show if the action is completed successfully by showing the colorful feedback.

## Changes

- New UI
- Using Vue as frontend
- Fully implement Contentscript and Service worker for this extension.
- Added shortcut to access this extension
- Fixed when Voting comments

## Todo

- [ ] Complete `Comment Grading` function.
- [x] Complete `Comment Grading` function.
- [ ] Queue the voting process
6 changes: 3 additions & 3 deletions public/manifest.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "EDN Auto V3",
"description": "Automate grading tasks on edunext system ",
"version": "3.1.0",
"version": "3.1.2",
"manifest_version": 3,
"icons": {
"128": "icon.png"
Expand Down Expand Up @@ -30,8 +30,8 @@
"commands": {
"_execute_action": {
"suggested_key": {
"default": "Ctrl+B",
"mac": "Command+B"
"default": "Alt+Q",
"mac": "Alt+Q"
}
}
},
Expand Down
33 changes: 29 additions & 4 deletions src/store.ts
Original file line number Diff line number Diff line change
Expand Up @@ -201,6 +201,27 @@ export const useStore = defineStore("store", {
const classroomId = this.currentURL.searchParams.get("classId");
const sessionId = this.currentURL.searchParams.get("sessionId");

const classroomSessionId = this.currentURL.searchParams.get("classroomSessionId");

let groups: response = await utils.post(endpoints.listGroups, this.TOKEN, {
classroomSessionId: classroomSessionId,
});
if (groups.ok) {
this.user.groupId = undefined;
for (let group of groups.data) {
let groupId = group.id;
for (let user of group.listStudentByGroups) {
if (user.id == this.user.userId) {
this.user.groupId = groupId;
break;
}
}
if (this.user.groupId) {
break;
}
}
}

// get settings for the QC
const qcSettings: response = await utils.get(endpoints.qcSettings, this.TOKEN, {
privateCqId: privateCqId,
Expand Down Expand Up @@ -252,17 +273,21 @@ export const useStore = defineStore("store", {
beforePage: 1,
currentPage: 1,
statusClickAll: false,
pageSize: 999,
pageSize: 10,
hashCode: hashCode,
});

if (allComments.data.comments) {
let comments = allComments.data.comments.items;
for (let comment of comments) {
if (comment.writer._id === this.user.id) continue;
if (voteQueue.length > 0) {
if (
comment.writer.userId === this.user.userId ||
comment.groupId != this.user.groupId
) {
continue;
} else if (voteQueue.length > 0) {
const star = voteQueue.shift() || "";
await utils.post(endpoints.upVote, this.TOKEN, undefined, {
let res: response = await utils.post(endpoints.upVote, this.TOKEN, undefined, {
commentId: comment._id,
cqId: privateCqId,
star: star,
Expand Down

0 comments on commit 47b8140

Please sign in to comment.