Skip to content
Open
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
85 changes: 41 additions & 44 deletions .secrets.baseline
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"files": null,
"lines": null
},
"generated_at": "2025-10-30T07:06:07Z",
"generated_at": "2025-11-04T09:57:50Z",
"plugins_used": [
{
"name": "AWSKeyDetector"
Expand Down Expand Up @@ -149,7 +149,7 @@
{
"hashed_secret": "9d4e1e23bd5b727046a9e3b4b7db57bd8d6ee684",
"is_verified": false,
"line_number": 15,
"line_number": 16,
"type": "Basic Auth Credentials",
"verified_result": null
}
Expand All @@ -158,7 +158,7 @@
{
"hashed_secret": "9d4e1e23bd5b727046a9e3b4b7db57bd8d6ee684",
"is_verified": false,
"line_number": 12,
"line_number": 51,
"type": "Basic Auth Credentials",
"verified_result": null
}
Expand Down Expand Up @@ -244,39 +244,18 @@
"verified_result": null
}
],
"apps/api/src/auth/services/admin-email.service.ts": [
{
"hashed_secret": "0745833f7b44bb251e684ed54daa7f30db4a61ff",
"is_verified": false,
"line_number": 17,
"type": "Secret Keyword",
"verified_result": null
},
{
"hashed_secret": "71011165e6f4116d3943a7b5ef8446c02f10ea7f",
"is_verified": false,
"line_number": 23,
"type": "Secret Keyword",
"verified_result": null
},
"apps/api/src/common/services/email.service.ts": [
{
"hashed_secret": "da32b2dd835ec07a74fb098cb9e617bbfac01eff",
"is_verified": false,
"line_number": 48,
"line_number": 53,
"type": "Secret Keyword",
"verified_result": null
},
{
"hashed_secret": "de493e0c6963b221bcc6f77606d52602cc46f1f0",
"is_verified": false,
"line_number": 51,
"type": "Secret Keyword",
"verified_result": null
},
{
"hashed_secret": "6947818ac409551f11fbaa78f0ea6391960aa5b8",
"is_verified": false,
"line_number": 96,
"line_number": 55,
"type": "Secret Keyword",
"verified_result": null
}
Expand Down Expand Up @@ -317,15 +296,6 @@
"verified_result": null
}
],
"apps/api/src/middleware/__tests__/data-transform.middleware.test.ts": [
{
"hashed_secret": "c43b74f82f891e351ea8d73c4cac9988f05fa49f",
"is_verified": false,
"line_number": 41,
"type": "Base64 High Entropy String",
"verified_result": null
}
],
"apps/web/.env.template": [
{
"hashed_secret": "d08f88df745fa7950b104e4a707a31cfce7b5841",
Expand Down Expand Up @@ -443,49 +413,49 @@
{
"hashed_secret": "b7e41a1408b0de53b6a18b0383983df52151bffd",
"is_verified": false,
"line_number": 60,
"line_number": 57,
"type": "Base64 High Entropy String",
"verified_result": null
},
{
"hashed_secret": "7f8a4c8efb7a9d741a4131e6382406d04920a55c",
"is_verified": false,
"line_number": 75,
"line_number": 72,
"type": "Base64 High Entropy String",
"verified_result": null
},
{
"hashed_secret": "ef584f952dbcdb807b1f2a5b688a6b2ac7beaf76",
"is_verified": false,
"line_number": 158,
"line_number": 155,
"type": "Base64 High Entropy String",
"verified_result": null
},
{
"hashed_secret": "fca9f0a000cc0d99a6b89eff22b280d43b3dc23a",
"is_verified": false,
"line_number": 168,
"line_number": 164,
"type": "Base64 High Entropy String",
"verified_result": null
},
{
"hashed_secret": "ad5a4eb98aace66b683002aa7038bb800f8b0a65",
"is_verified": false,
"line_number": 174,
"line_number": 170,
"type": "Base64 High Entropy String",
"verified_result": null
},
{
"hashed_secret": "28681ff8a70bc722645c0ebe5c21fbd8a2ee904a",
"is_verified": false,
"line_number": 183,
"line_number": 179,
"type": "Base64 High Entropy String",
"verified_result": null
},
{
"hashed_secret": "dd65cdacb216bbeca512abfb1ecd15d1c53ac7bd",
"is_verified": false,
"line_number": 431,
"line_number": 427,
"type": "Base64 High Entropy String",
"verified_result": null
}
Expand Down Expand Up @@ -526,6 +496,15 @@
"verified_result": null
}
],
"apps/web/app/chatbot/lib/markChatFunctions.ts": [
{
"hashed_secret": "d3ecb0d890368d7659ee54010045b835dacb8efe",
"is_verified": false,
"line_number": 334,
"type": "Secret Keyword",
"verified_result": null
}
],
"apps/web/app/learner/(components)/Question/FileCodeUploadSection.tsx": [
{
"hashed_secret": "cfb93ca9f329289d5f23de2b0e065103b81a374c",
Expand Down Expand Up @@ -583,6 +562,15 @@
"verified_result": null
}
],
"apps/web/app/learner/[assignmentId]/successPage/[submissionId]/page.tsx": [
{
"hashed_secret": "d3ecb0d890368d7659ee54010045b835dacb8efe",
"is_verified": false,
"line_number": 657,
"type": "Secret Keyword",
"verified_result": null
}
],
"apps/web/public/ffmpeg-core/ffmpeg-core.js": [
{
"hashed_secret": "b4e44716dbbf57be3dae2f819d96795a85d06652",
Expand All @@ -596,10 +584,19 @@
{
"hashed_secret": "5baa61e4c9b93f3f0682250b6cf8331b7ee68fd8",
"is_verified": false,
"line_number": 135,
"line_number": 138,
"type": "Basic Auth Credentials",
"verified_result": null
}
],
"scripts/validate-env.sh": [
{
"hashed_secret": "8da52328e314a37358f9758f38d5bb0e8687b6ab",
"is_verified": false,
"line_number": 74,
"type": "Secret Keyword",
"verified_result": null
}
]
},
"version": "0.13.1+ibm.64.dss",
Expand Down
2 changes: 1 addition & 1 deletion .tool-versions
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
nodejs 22.0.0
nodejs 22.12.0
yarn 1.22.22
1 change: 0 additions & 1 deletion apps/api-gateway/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,6 @@
"eslint-config-prettier": "^10.1.8",
"eslint-plugin-prettier": "^5.5.3",
"eslint-plugin-unicorn": "^47.0.0",
"husky": "^8.0.3",
"jest": "^29.5.0",
"prettier": "^2.8.8",
"prettier-plugin-pkg": "^0.19.0",
Expand Down
1 change: 0 additions & 1 deletion apps/api/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,6 @@
"eslint-config-prettier": "^8.8.0",
"eslint-plugin-prettier": "^4.2.1",
"eslint-plugin-unicorn": "^47.0.0",
"husky": "^9.1.7",
"jest": "^29.5.0",
"prettier": "^2.8.8",
"prettier-plugin-pkg": "^0.19.0",
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
-- AlterTable
ALTER TABLE "RegradingRequest" ADD COLUMN "processedBy" TEXT,
ADD COLUMN "proposedGrade" DOUBLE PRECISION,
ADD COLUMN "questionIds" INTEGER[] DEFAULT ARRAY[]::INTEGER[];
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
-- CreateTable
CREATE TABLE "AuthorSettings" (
"id" SERIAL NOT NULL,
"userId" TEXT NOT NULL,
"emailOnRegradingRequest" BOOLEAN NOT NULL DEFAULT true,
"createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP,
"updatedAt" TIMESTAMP(3) NOT NULL,

CONSTRAINT "AuthorSettings_pkey" PRIMARY KEY ("id")
);

-- CreateIndex
CREATE UNIQUE INDEX "AuthorSettings_userId_key" ON "AuthorSettings"("userId");

-- CreateIndex
CREATE INDEX "AuthorSettings_userId_idx" ON "AuthorSettings"("userId");
14 changes: 14 additions & 0 deletions apps/api/prisma/schema.prisma
Original file line number Diff line number Diff line change
Expand Up @@ -488,7 +488,10 @@ model RegradingRequest {
attemptId Int /// The ID of the assignment attempt
assignmentAttempt AssignmentAttempt @relation(fields: [attemptId], references: [id], onDelete: Cascade)
regradingReason String? /// Reason for requesting regrading
proposedGrade Float? /// AI-proposed grade (0.0 to 1.0) for the regrading
questionIds Int[] @default([]) /// Array of question IDs the learner complained about (if applicable)
regradingStatus RegradingStatus @default(PENDING) /// Status of the regrading request
processedBy String? /// Email of the author/admin who processed this request
createdAt DateTime @default(now()) /// Timestamp for when the regrading request was created
updatedAt DateTime @updatedAt /// Timestamp for the last update to the regrading request
}
Expand Down Expand Up @@ -684,6 +687,17 @@ model AdminSession {
@@index([expiresAt])
}

/// This model stores author/admin settings and preferences
model AuthorSettings {
id Int @id @default(autoincrement())
userId String @unique /// The email/userId of the author
emailOnRegradingRequest Boolean @default(true) /// Whether to email author when learners submit regrading requests
createdAt DateTime @default(now())
updatedAt DateTime @updatedAt

@@index([userId])
}

/// This model tracks the authors of assignments
model AssignmentAuthor {
id Int @id @default(autoincrement())
Expand Down
2 changes: 2 additions & 0 deletions apps/api/src/api/admin/admin.controller.spec.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { Test, TestingModule } from "@nestjs/testing";
import { EmailService } from "src/common/services/email.service";
import { AdminVerificationService } from "../../auth/services/admin-verification.service";
import { PrismaService } from "../../database/prisma.service";
import { LLM_PRICING_SERVICE } from "../llm/llm.constants";
Expand Down Expand Up @@ -45,6 +46,7 @@ describe("AdminController", () => {
providers: [
AdminService,
PrismaService,
EmailService,
AdminRepository,
{ provide: LLM_PRICING_SERVICE, useValue: mockLlmPricingService },
{
Expand Down
7 changes: 6 additions & 1 deletion apps/api/src/api/admin/admin.module.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { Module } from "@nestjs/common";
import { PassportModule } from "@nestjs/passport";
import { PrismaService } from "src/database/prisma.service";
import { EmailService } from "src/common/services/email.service";
import { AdminAuthModule } from "../../auth/admin-auth.module";
import { AuthModule } from "../../auth/auth.module";
import { LlmModule } from "../llm/llm.module";
Expand All @@ -10,10 +11,12 @@ import { AdminRepository } from "./admin.repository";
import { AdminService } from "./admin.service";
import { AdminDashboardController } from "./controllers/admin-dashboard.controller";
import { AssignmentAnalyticsController } from "./controllers/assignment-analytics.controller";
import { AuthorRegradingRequestsController } from "./controllers/author-regrading-requests.controller";
import { FlaggedSubmissionsController } from "./controllers/flagged-submissions.controller";
import { LLMAssignmentController } from "./controllers/llm-assignment.controller";
import { LLMPricingController } from "./controllers/llm-pricing.controller";
import { RegradingRequestsController } from "./controllers/regrading-requests.controller";
import { SettingsController } from "./controllers/settings.controller";

@Module({
imports: [
Expand All @@ -29,9 +32,11 @@ import { RegradingRequestsController } from "./controllers/regrading-requests.co
LLMAssignmentController,
LLMPricingController,
RegradingRequestsController,
AuthorRegradingRequestsController,
FlaggedSubmissionsController,
AssignmentAnalyticsController,
SettingsController,
],
providers: [AdminService, PrismaService, AdminRepository],
providers: [AdminService, PrismaService, AdminRepository, EmailService],
})
export class AdminModule {}
Loading
Loading