Skip to content

feat: Implemented Student 'Mark for Review' system and 'Return to Video' navigation#965

Open
Boltu-007 wants to merge 26 commits into
vicharanashala:mainfrom
Boltu-007:feature/mark-for-review-final
Open

feat: Implemented Student 'Mark for Review' system and 'Return to Video' navigation#965
Boltu-007 wants to merge 26 commits into
vicharanashala:mainfrom
Boltu-007:feature/mark-for-review-final

Conversation

@Boltu-007

Copy link
Copy Markdown

Description:

This PR combines two key enhancements for the student learning experience:

  1. Mark for Review System: > - Created a persistent global state using Zustand and localStorage.
    Added a toggleable bookmark UI in Quiz and Video components.
    Implemented a dedicated 'Marked for Review' dashboard for revision.

  2. Return to Video Navigation:
    Added "Return to Video" functionality within the Quiz component.
    Streamlined the transition between assessment and lecture content.

Technical Notes:
Successfully integrated both features into the combined-updates workflow.
Verified state persistence across browser sessions.

MeenakshiArunsankar and others added 23 commits April 14, 2026 09:15
Replace nested quantifier regex /^(https?:\/\/\S+\s*)+$/ with
/^https?:\/\/\S+(\s+https?:\/\/\S+)*\s*$/ in validateQuestionText()
to eliminate exponential backtracking (CWE-1333 / ReDoS).

Introduced in: 3b8c5d4 (Feat: Crowd Question submission)
…charanashala#923)

Co-authored-by: Nandan Prabhudesai <nandanprabhudesai@gmail.com>
* feat: add crowdsourced question pipeline module

* chore: normalize file permissions for crowdsourced module

* Potential fix for pull request finding 'CodeQL / Inefficient regular expression'

Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>

---------

Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
* chore: add fetch single course enrollment data and watch hours query inside cohort repository - tempRes()

* add query to fetch item wise watch hour data of enrolled users in a cours

* feat: add feedback submission data of a course

* feat: add query to fetch enrollment wise feedback submissions

* Cap GuruSetu watch-time in feedback export query

---------

Co-authored-by: Abiram-k <abiramk0107@gmail.com>
* ci: strengthen PR merge testing pipeline

- fix(linter.yml): change target branch from 'main' to 'combined-updates';
  split into lint-backend and lint-frontend jobs with path conditions

- feat(jest-test.yml): add pull-requests:write permission and post vitest
  coverage summary as PR comment via davelosert/vitest-coverage-report-action

- feat(pr-checks.yml): new workflow - TypeScript tsc --noEmit type-check for
  backend (Node 23) and frontend (Node 20) on every PR to combined-updates

- feat(codeql.yml): new workflow - CodeQL security scan (javascript-typescript)
  on PRs and pushes to combined-updates

- feat(pr-smoke-e2e.yml): new workflow - smoke.spec.ts against staging on PRs;
  skips if STAGING_FRONTEND_URL secret absent; uploads report as artifact

- feat(commit-msg): add husky commit-msg hook running commitlint
- feat(package.json): add commitlint packages and config-conventional preset

- fix(.gitignore): add root .firebase/ to ignored paths

* fix(pr-smoke-e2e): remove secrets context from job if condition

secrets context is not available in job-level if expressions;
use vars.STAGING_FRONTEND_URL (repository variable) instead

* fix(codeql): upgrade CodeQL actions v3 to v4

* chore(codeql): remove custom CodeQL workflow in favour of GitHub default setup

* fix(backend): resolve pre-existing TypeScript errors caught by pr-checks

- fix(cohortsRepository): close missing } on resetHpforCohort body; add
  resetHpForStudent stub method (was called by service but not implemented)
- fix(ICohortsRepository): declare resetHpForStudent in interface
- fix(cohortsService): remove stray tempRes() debug call from listCohorts;
  declare local variables (courseVersionName, instructorEnrollments,
  enrolledVersionIds, enrolledCohortIds) that were used but never declared
- fix(ISettings): add optional crowdsourcedQuestionSubmissionEnabled field
  used by StudentQuestionService

* Update .github/workflows/pr-smoke-e2e.yml

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* fix(vite.config.ts): add coverage reporters json-summary, json, html for vitest coverage report action

Agent-Logs-Url: https://github.com/vicharanashala/vibe/sessions/ff1c6382-230a-4b77-827d-22dd0be5b748

Co-authored-by: MeenakshiArunsankar <45432051+MeenakshiArunsankar@users.noreply.github.com>

* Update .github/workflows/jest-test.yml

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
…ping or encoding (vicharanashala#945)

Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
* fix: Add quick fix to clamp progress to 100 percentage

* Port stashed changes to new branch

* Progress summary quiz scores updated and progress percent greater than 100 fixed

* Potential fix for pull request finding 'CodeQL / Incomplete string escaping or encoding'

Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>

* fix: handle 404 (already stopped) gracefully in stopItem

- Skip retries in useStopItem when server returns 404
- Treat 404 as idempotent success at all stopItem call sites
  (quiz.tsx, video.tsx, article.tsx, hooks.ts)
- Fix duplicate const progress declaration in CourseCard.tsx

---------

Co-authored-by: Rishav <rishavkumar.nit@gmail.com>
Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
* fix: Add quick fix to clamp progress to 100 percentage

* Port stashed changes to new branch

* Progress summary quiz scores updated and progress percent greater than 100 fixed

* Potential fix for pull request finding 'CodeQL / Incomplete string escaping or encoding'

Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>

* fix: handle 404 (already stopped) gracefully in stopItem

- Skip retries in useStopItem when server returns 404
- Treat 404 as idempotent success at all stopItem call sites
  (quiz.tsx, video.tsx, article.tsx, hooks.ts)
- Fix duplicate const progress declaration in CourseCard.tsx

* fix: skip previous item check in stop API when linear progression is disabled

---------

Co-authored-by: Rishav <rishavkumar.nit@gmail.com>
Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
* fix: Add quick fix to clamp progress to 100 percentage

* Port stashed changes to new branch

* Progress summary quiz scores updated and progress percent greater than 100 fixed

* Potential fix for pull request finding 'CodeQL / Incomplete string escaping or encoding'

Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>

* fix: handle 404 (already stopped) gracefully in stopItem

- Skip retries in useStopItem when server returns 404
- Treat 404 as idempotent success at all stopItem call sites
  (quiz.tsx, video.tsx, article.tsx, hooks.ts)
- Fix duplicate const progress declaration in CourseCard.tsx

* fix: skip previous item check in stop API when linear progression is disabled

* fix: track actual play seconds and expire idle watch sessions

- Add duration and isExpired fields to IWatchTime interface
- Frontend tracks real play seconds (not wall-clock) via playedSecondsRef
- Idle timer (5 min): auto-expires paused sessions with isExpired=true and resets for next play
- watchedSeconds and isExpired sent on every stopItem call
- stopItemTracking stores duration and isExpired on the watch record
- isValidWatchTime: expired sessions return false; prefer duration over wall-clock diff
- Analytics aggregations prefer duration field, fall back to endTime-startTime for old records
- Expired sessions excluded from all watch hour totals
- Re-watches now tracked: startItem always creates a new watch record

* fix: avoid unsafe currentCourse assertion in stop guard

---------

Co-authored-by: Rishav <rishavkumar.nit@gmail.com>
Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
* Feature/frontend integrate move course structure (vicharanashala#455)

* feat: add hooks to handle course structure reordering via API

* Draggable reordering in teacher dashboard for modules,sections & items interim implementation

* fix: removed re-ordering hooks

* Reordering sidebar list implementation

* fix for section reorder

* reorder module fix

* modules reorder bug fix

* sections list bug fix

* items reorder bug fix

* reorder items bug fix

---------

Co-authored-by: Abiram-k <abiramk0107@gmail.com>
Co-authored-by: PrabhudesaiNandan <nandan.prabhudesai@kilowott.com>
Co-authored-by: Saaransh Garg <68538240+saaranshgarg1@users.noreply.github.com>

* merge fixes

* fix: anomaly accepts without image/audio, but blocks if different filetype, in single endpoint

* fix(view): more logical AI button placement

* doc fix

* fix(view/edit): Fixed UI, Indents, added button for theme change.

* added transaction to auth

* chore: update README.md with trailer

* feat: added abort

* feat: added support for providing audio

* fix: error should be optional

* fix: endpoint name

* fix: parse json as multipart form converts to string

* fixes

* feat: added manual transcipt

* fix: transcript should be optional

* fix: removed transcript object from db

* fix: removed unnecessary auth from job

* fix: Add quick fix to clamp progress to 100 percentage

* Port stashed changes to new branch

* Progress summary quiz scores updated and progress percent greater than 100 fixed

* Potential fix for pull request finding 'CodeQL / Incomplete string escaping or encoding'

Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>

* fix: resolve merge conflicts with origin main

Agent-Logs-Url: https://github.com/vicharanashala/vibe/sessions/75f05d07-27d7-4356-8ab3-e6adfee830cd

* fix: include all cohort quiz submissions in student progress detail

getBatchQuizSubmissionGrades was filtering cohortId: null when no
cohort was passed, missing submissions stored with a real cohortId.
Changed fallback from { cohortId: null } to {} so quiz score totals
are computed across all cohorts for a given student.

* fix: restore quiz score debug logs lost in merge conflicts

* Fix/progress issue (vicharanashala#949)

* Update EnrollmentRepository.ts

* Update EnrollmentRepository.ts

* fix(frontend): health points typo

* feat(backend): fetch total hp points on student side

* fix(frontend): auto navigate if nextitem not found

* fix(frontend): submission details build error

* fix: handle legacy course ids in cron job

* fix: current hp in submission stats

* Feature/export student mailids (vicharanashala#852)

* Added a new feature with the Smart Bloom mode for ViBe lesson

* Fixes for Smart bloom feature

* Export mailIDs feature added

* removed smart bloom commits

* reverted teacher course page smart bloom

---------

Co-authored-by: Meenakshi <meenakshi@Meenakshis-MacBook-Air.local>
Co-authored-by: Nandan Prabhudesai <nandanprabhudesai@gmail.com>

* Added a new Test for progress status. Some more refactoring and minor updates. (vicharanashala#844)

* test(e2e): Increase tolerance for video completion check.

* test(e2e): Updated new item selection logic in playwright test

Fixed the way a new item is selected and increased time out
interval

* test(e2e): refactor code to improve reusability

Exported common functions for reuse across tests
Increased interval for a few more timeouts

* test(e2e): Added a new test for progress status

The news test plays the entire course video and checks for 100%
completion percentage.

---------

Co-authored-by: Nandan Prabhudesai <nandanprabhudesai@gmail.com>

* Instructor can decide the mandatory submissions

* removed console.logs

* Removed effectiveCohortId

* Fix Progress Bar Ambiguity

* feat(frontend): add tooltip for submission requirements

* Consistent Feedback-Based Progress for Guru Setu Course (vicharanashala#854)

Fixing Persistent Progress for GURU SETU course

* fix:restore full course list when search is cleared (vicharanashala#839)

Co-authored-by: Nandan Prabhudesai <nandanprabhudesai@gmail.com>

* Feat/cohort based chages (vicharanashala#855)

* feat: add autoapproval settings for cohorts

* fix: minor bug fixes

* feat: add cohort based changes for announcement feature

* chore: add cohort based changes in anomalies feature

* chore: Add cohort based changes in Flags feature

* chore: move non cohort students to a cohort feature

* chore: fix bugs realted to cohort

* fix: bulk unenrollment issue

* chore: cap progress percentage to zero

* fix: view details progress issue resolved

* fix: cohort name and id in courses page

* fix: random cohortid being created whil enrollment

* fix: added fallback when an enrollment doesnt have cohortId

* chore: pause registration for cohorts and fix for progress greater than 100 percent

---------

Co-authored-by: Nandan Prabhudesai <nandanprabhudesai@gmail.com>

* resolved  quiz export issue

* feat: add cap for 100% progress, correct totelItems count in version doc

* chore: Linear progression is enabled by default. (vicharanashala#857)

Co-authored-by: Nandan Prabhudesai <nandanprabhudesai@gmail.com>

* Worked on the prompt to generate the question correctly in BINARY for… (vicharanashala#850)

Worked on the prompt to generate the question correctly in BINARY form...

Co-authored-by: Nandan Prabhudesai <nandanprabhudesai@gmail.com>

* Added a new feature with the Smart Bloom mode for ViBe lesson (vicharanashala#830)

* Added a new feature with the Smart Bloom mode for ViBe lesson

* Fixes for Smart bloom feature

* Smart Bloom mode for Question creation

---------

Co-authored-by: Meenakshi <meenakshi@Meenakshis-MacBook-Air.local>
Co-authored-by: Nandan Prabhudesai <nandanprabhudesai@gmail.com>

* feat: add manual refresh using react-query refetch across listing pages

* implemented choices for the excel export

* Added new fields in cohort collection

* removed console.logs

* Feature/smart bloom mode (vicharanashala#858)

* Added a new feature with the Smart Bloom mode for ViBe lesson

* Fixes for Smart bloom feature

* Smart Bloom mode for Question creation

---------

Co-authored-by: Meenakshi <meenakshi@Meenakshis-MacBook-Air.local>
Co-authored-by: Nandan Prabhudesai <nandanprabhudesai@gmail.com>

* Disable blur detection button (vicharanashala#859)

* chore: Linear progression is enabled by default.

* chore: disable blur detection button

---------

Co-authored-by: Nandan Prabhudesai <nandanprabhudesai@gmail.com>

* feat(backend): change cron job interval to 1 minute

* No submission validation for ViBe_milestones

* Student Dashboard UI Revamp (vicharanashala#860)

Student dashboard Ui Revamp

* Ejection Policy V1 (vicharanashala#861)

* created types for ejection policy

* created transformers and validators

* created Repository and test for it

* created service and test for it

* created controller

* updated abilities

* updated validators and transformers

* updated controller, repo and service with apis

* types modified and container created to access the services

* made changes to Controller to fix ability

* created Ejection Policy components

* - configured abilities
- created student cards, modals and list for policies
- created ejection policies page changes to change the message more appropriate
- modified course card to show the Policies button
- modified `useEjectionPolicies` to add policies to result
- added optional chaining for policy actions in `EjectionPolicyCard`
- corrected student ability to view the policies
- corrected controller to get all policies(platform + course wise)

* student ux: added a message to better understand what these policies are for

* - added a link to “platform policies” directly
- added conditions to show only platform policies when visiting this page.

* correcting hook behaviour for platform wise and course wise policies fetching

* - wasn't able to access correct role via store so added it to the hook and showed the policies based on the role

* refetching based on if a policy is deleted, edited or toggled in activation

* - feat: can add more than one platform wise policy
- feat: for each course, priorities of policies must be different, same for the platform wise policies

* removed test

* - Created the Interface for Anomalies Detection for the prop validation in the Ejection Policy Form

- Populated the form state with it

- Populated the UI with it

- Payload added to the data that is being sent to the backend

* - Anomalies threshold score wasn’t being shown in the student side so added that.

- UI Fix: Student modal wasn’t scrollable when policies increased.

* To create custom policy violation trigger, added an input field to frontend to take user’s input conditionally when other is selected

* changed schema for custom violations in ejection policy so that custom properties could be added

* Changed the UI of teacher's policy card to show triggers cleanly just like the student policy cards do

* fix: handled "undefined" error for platform wise policies, when being edited

* rearranged the components for better modularity

* audit trail added for ejection policy(needs to be modified later)

* resolved validation error for audit trails

* Added courseVersionId to the entire flow of ejection policies

* created Modal for acknowledgement of the policies, now the student can view them even without enrollment

* Fix: policy acknowledgement modal got closed with each click

* backend implementation of getting acknowledgement completed

* - Fix: "Reject" button in the InviteDropdown not working
- Fix: Dropdown not closing when reject was clicked

* fix: missing acknowledgement variable in enrollUser function for other calls

* Basic configuration of omitting the scope of a policy is done
basic setup of manual ejection is done

* correction jsx

* corrected the flow that aligns with the cohort implementation of the courses

* added cohort id to student modal and fixed UI so that user knows that there would be only one policy per cohort

* - removed priority from UI
- commented out other triggers for now except inactivity

* manual ejection and re-instatement implemented

* enrollment repo issue due to cohortId being null

* cron job for inactivity of students implemented based on student policy

* backend implementation of notifications for ejection and reinstatement is completed

* frontend implementation for notification ejection and reinstatement implemented

* warning notification implemented

* added emailService for ejection and warning

* feat:added ejection history tab with filters

* fix:removed cohort filtering from ejection history

* Appeal flow for student implemented

* fix:student filtering based on ejected and active

* fix:removed create policy button if the policy already exist

* fix:removed the policies from sidebar

* feat:Added actor to History card of individual student

* Notification for teacher's side implemented

* Reject appeal and approve appeal implemented

* chore: removing logs

* - Fix: Check appeal button being shown for all the ejections when a new ejection from a course is made (student side)
- Feature: Appeals tab on the teacher's side

* - Showing success and fail message for appeal modal
- Disabling reject button when no reject reason

* Admin: Notification UI improvement

* Appeal Details being properly shown now

* Showing student details in Appeal section rather than id

* Added reason to notification for rejected appeal

* Fix: Appeal button shouldn't be shown when an appeal is sent for an ejection

* feat:auto ejection trigger by missed deadline

* Removed "Priority" tag from card

* Fix: invites are being shown in notifications now, changed UI to be consistent with other notifications

* re-acknowledgement notification implementation

* feat:added dynamic date and progress for student

---------

Co-authored-by: Thanha Mariyam <thanhathanha665@gmail.com>

* Fix: a missing bracket in pipeline caused errors (vicharanashala#863)

* Fix: syntax issues in frontend course card and routes (vicharanashala#864)

* feat: move registration actions into dropdown menu, keep refresh visible

* Added conformation model for editing baseHp and safeHp

* Course card revamp ejection policy additions (vicharanashala#867)

* Fix: syntax issues in frontend course card and routes

* Fix: removed extra notification bell icon and the corresponding notification modal

* corrected navbar

* Ejection policy button for course card added

* implemented to set points at qb level

* Reinstalled packages

* fix(frontend): hp distributed count

* Feature/smart bloom mode (vicharanashala#870)

* Added a new feature with the Smart Bloom mode for ViBe lesson

* Fixes for Smart bloom feature

* Smart Bloom mode for Question creation

---------

Co-authored-by: Meenakshi <meenakshi@Meenakshis-MacBook-Air.local>
Co-authored-by: Nandan Prabhudesai <nandanprabhudesai@gmail.com>

* Feat/cohort based chages (vicharanashala#869)

* feat: add autoapproval settings for cohorts

* fix: minor bug fixes

* feat: add cohort based changes for announcement feature

* chore: add cohort based changes in anomalies feature

* chore: Add cohort based changes in Flags feature

* chore: move non cohort students to a cohort feature

* chore: fix bugs realted to cohort

* fix: bulk unenrollment issue

* chore: cap progress percentage to zero

* fix: view details progress issue resolved

* fix: cohort name and id in courses page

* fix: random cohortid being created whil enrollment

* fix: added fallback when an enrollment doesnt have cohortId

* chore: pause registration for cohorts and fix for progress greater than 100 percent

* chore: added leaderboard changes for cohort

---------

Co-authored-by: Nandan Prabhudesai <nandanprabhudesai@gmail.com>

* Handling edge cases for ejection (vicharanashala#872)

* Fix: syntax issues in frontend course card and routes

* Fix: removed extra notification bell icon and the corresponding notification modal

* corrected navbar

* Ejection policy button for course card added

* - added course card's missing state
- Fix: When a student accepts a course without a policy, and then if a policy was created for that same course, the acknowledgement modal wasn't being shown. Added reacknowledgement to that flow.

* Fix: When notifications were marked as read, buttons were disappearing

---------

Co-authored-by: Nandan Prabhudesai <nandanprabhudesai@gmail.com>

* Added a new hardcoded course

* additional totalCourse Score is added

* points implementation is automatically created items in qB

* feat: move activity actions into dropdown menu

* Student Dashboard UI Revamp (vicharanashala#874)

* Student dashboard Ui Revamp

* Course Card Flipping feature and button rendering

* fixed courses page with new design alignment

* Cohort Name Batch added to course card & implemented skeleton animation on opening the course details modal

* Changed UI now only one button View Enrollments are there which shows… (vicharanashala#866)

Changed UI now only one button View Enrollments are there which shows both Students and instructors. Also added menu button in course card and Active Inactive tabs..

Co-authored-by: Nandan Prabhudesai <nandanprabhudesai@gmail.com>

* fix(frontend): add logic to hide pagination component if length<limit

* Universal Grid/List View Switcher (vicharanashala#877)

feat: implement universal grid/list view switcher for student dashboard and courses page

* Changes to the frontend view and fixing of the heading of the course … (vicharanashala#881)

Changes to the frontend view and fixing of the heading of the course card.

* Learner Emotion capture - version 1.0 with only course-level analytics

* (Quick fix patch): Changed the progress part for the Gurusetu course.… (vicharanashala#885)

* (Quick fix patch): Changed the progress part for the Gurusetu course. Now rather then showing the progress percentage we are showing the completed items count specifically in Gurusetu course.

* More videos soon message added

* Fix Leaderboard showing zero progress (vicharanashala#884)

* feat: implement universal grid/list view switcher for student dashboard and courses page

* Leaderboard showing zero fixed

* Leaderboard fix in both CourseCard.tsx and CourseListCard.tsx

---------

Co-authored-by: Nandan Prabhudesai <nandanprabhudesai@gmail.com>

* Emotion capture dashboard for instructor

* instructor can see the safe/unsafe status of student

* student side dashboard stats for cohort

* Learner Emotion capture - version 1.0 with only course-level analytics (vicharanashala#882)

* Learner Emotion capture - version 1.0 with only course-level analytics

* Emotion capture dashboard for instructor

---------

Co-authored-by: Nandan Prabhudesai <nandanprabhudesai@gmail.com>

* Attaching images as evidence (vicharanashala#886)

* - Refactor: Service and repo layer (autoejectionengine)
- Corrected cron job run time
- Commented out inactivity trigger from AutoEjectionEngine

* Refactor: Service and repo layer(ejectionpolicyservice)

* Refactor: removed inactivity trigger from UI
Refactor: removed service code for inactivity trigger

* - chore: removed logs from files i have worked on
- refactor: Moving Appeal badge logic to a different new component for performance(re-rendering)
- refetch: invalidating appeals on submit of appeals, approval or rejection of appeals

* Feature: Adding images to appeal rather than URL for evidence

---------

Co-authored-by: Nandan Prabhudesai <nandanprabhudesai@gmail.com>

* Added face verification

* added a new legacy course

* Refactor Notification System: Unified Dropdown & Global Registration Requests (vicharanashala#891)

Notification page implementation

* Fix/gurusetu course (vicharanashala#888)

* (Quick fix patch): Changed the progress part for the Gurusetu course. Now rather then showing the progress percentage we are showing the completed items count specifically in Gurusetu course.

* More videos soon message added

* Worked on the frontend and backend for gurusetu course, where if you don't watch previous video completely it will not allow the form to be shown in the frontend. You need to see the video and then fill the form.

---------

Co-authored-by: Nandan Prabhudesai <nandanprabhudesai@gmail.com>

* Profile details , Gender, Country, State, City and Dp update feature (vicharanashala#892)

Co-authored-by: Nandan Prabhudesai <nandanprabhudesai@gmail.com>

* build error fixed

* feat: add restore action for rejected/reverted HP decisions

* completed some fixex in the overview section

* Fix Quiz Attempts flow

* Interface for feedback improved

* feat:migration script

* backend: migration

* Student Dashboard Course Completion Statistics (vicharanashala#897)

Student Dashborad stats specific api and frontend data data display

* feat(proctoring): add virtual camera detection and stream integrity c… (vicharanashala#902)

feat(proctoring): add virtual camera detection and stream integrity checks

Co-authored-by: Nandan Prabhudesai <nandanprabhudesai@gmail.com>

* feat:added rule validation in deadline policy (vicharanashala#904)

* Added fixed for the linear progression disabled course and Gurusetu. (vicharanashala#903)

* Added fixed for the linear progression disabled course and Gurusetu.

* latest changes incorporated..

---------

Co-authored-by: Nandan Prabhudesai <nandanprabhudesai@gmail.com>

* Ejection policy issues (vicharanashala#895)

* Fix: When a student is ejected and if the policy was updated while the student was ejected, then the student won't get the "re-acknowledge" policy modal when they're re-instated.

* Fix: Course was being shown even when the course policy required re-acknowledgement

* Fix: Re-acknowledge button in the notifications kept on showing the button even after re-acknowledgement is done.

* Fix: When a cohort policy was changed and updated twice or more, all the notifications showed the re-acknowledgement button but only the latest one should have shown it.

---------

Co-authored-by: Nandan Prabhudesai <nandanprabhudesai@gmail.com>

* Feat/course and cohort details on appeal (vicharanashala#893)

* feat:added course and cohort details on ejection appeal

* feat:added confirmation for approve and reinstate appeal

---------

Co-authored-by: Nandan Prabhudesai <nandanprabhudesai@gmail.com>

* fix: Prevented duplicate watchtime document creation in quiz (vicharanashala#883)

* fix: Prevented duplicate watchtime document creation in quiz

* fix: handled watchtime issue in quiz

---------

Co-authored-by: Nandan Prabhudesai <nandanprabhudesai@gmail.com>

* Fix/ejection history (vicharanashala#871)

* fix:showing all events in history tab

* fix:showing events in same start and end date

---------

Co-authored-by: Nandan Prabhudesai <nandanprabhudesai@gmail.com>

* Inactivity trigger correction (vicharanashala#880)

* - Refactor: Service and repo layer (autoejectionengine)
- Corrected cron job run time
- Commented out inactivity trigger from AutoEjectionEngine

* Refactor: Service and repo layer(ejectionpolicyservice)

* Refactor: removed inactivity trigger from UI
Refactor: removed service code for inactivity trigger

* - chore: removed logs from files i have worked on
- refactor: Moving Appeal badge logic to a different new component for performance(re-rendering)
- refetch: invalidating appeals on submit of appeals, approval or rejection of appeals

---------

Co-authored-by: Nandan Prabhudesai <nandanprabhudesai@gmail.com>

* feat:added the student deadline and milestone in ejection student list (vicharanashala#873)

Co-authored-by: Nandan Prabhudesai <nandanprabhudesai@gmail.com>

* Feature/hp course details (vicharanashala#836)

Add course + version details in cohort card

Co-authored-by: Abiram-k <abiramk0107@gmail.com>
Co-authored-by: Nandan Prabhudesai <nandanprabhudesai@gmail.com>

* fix(backend): hp trasaction history issue

* build errors fixed

* autoapproval message updated in the UI and other UI fixes

* Fix for export student contact list (vicharanashala#906)

Co-authored-by: Nandan Prabhudesai <nandanprabhudesai@gmail.com>

* added stats function

* totalHp is using fetched directly from enrollment only

* Worked on the frontend to show HP system.. (vicharanashala#907)

Co-authored-by: Nandan Prabhudesai <nandanprabhudesai@gmail.com>

* chore: add a modal when all quiz attempts are exhausted (vicharanashala#905)

* chore: add a modal when all quiz attempts are exhausted

* fix: clicking on already completed quiz keeps loading

* minor: resolve conflicts

* chore: removed extra logs

---------

Co-authored-by: Nandan Prabhudesai <nandanprabhudesai@gmail.com>

* feat: restore HP action - complete implementation

* Fix advance progress on exhausted attempts

* Fix/start stop api (vicharanashala#909)

* Added fixed for the linear progression disabled course and Gurusetu.

* latest changes incorporated..

* Worked on the teachers side. Now showing completed item and total items.

* feat: change modal text and action name

* fix(backend): change minimum required percent to 15%

* Worked on the start and stop now student tries to skip video it is forced to see video again.

* Now if student tries to skip video. So rather then skipping he has to rewatch the video...

---------

Co-authored-by: Nandan Prabhudesai <nandanprabhudesai@gmail.com>
Co-authored-by: Abiram-k <abiramk0107@gmail.com>

* removed console

* solved-conflicts

* disable reset-hp feature

* added method in cohort repository interface

* fix(frontend): cohort refetch and alignment

* fix(backend-cron): reward allocation without 2mnts addition graceminutes, change event types, added new fields in ledger model

* Fix Quiz Evaluation Logic - Value-Based ID Comparison (vicharanashala#914)

Fixed Quiz Evaluation Mongo Instance Comparing logic to maintain consistency

* some Ui changes in the teacher

* feat: add operationId to restore ledger entry and HP button to list view

* fix: sort HP ledger transactions by latest first

* fixed timeslots permission issues

* populate cohortId in enrollment collection

* only student enrollment will update

* frontend: cohortId migration

* fix:activity creation random cohotIds

* fix:insert cohort name as cohort instead of id

* fix: show cohort name while listing

* added 2 legacy courses

* fix:student role should be in uppercase

* added legacy to missing hardcoded

* fix:legacy activities can't submit

* fix:legacy cohort students listing

* Worked on the backend where the vibe_milestone activity rules is not working updating. Now it is updating properly at time of creation. Rules are now updated properly for both assignment and the vibe stone activity....

* fix:hp history listing

* fix:student dash stats

* fix:review

* feat: add infinite revert after restore with operationId tracking

* fix:use cohortId instead of cohort name

* feat: use RESTORE_REVERSAL reason code for revert after restore

* Added individual reset HP feature

* Added student reset Dialog

* Update quiz.tsx

* fixed progress update in stop api

* fixed build error

* Notification tab and modal fixes (vicharanashala#924)

* Fix: Policy acknowledgement modal was being shown in teacher's invite flow, removed it. Teachers can directly accept or reject a course invitation.

* UI Fix:
- Policy Acknowledgement and Re-acknowledgement modal compacted in size
- Removed Notifications from sidebar on instructor side

* chore: removed unnecessary comments made by me

* Fixed: Now when a course with no ejection policies is sent as an invitation to a student, the student is directly able to accept or reject the course without acknowledgement from an empty policy modal.

* Refetching the notification on accepting or rejecting a course by student so that the reject and accept buttons do not keep showing. Also, worked on making the UI consistent with the teacher's notification buttons.

* Notifications based on role

* Added Course Name and Course Description to the Invite Notification. Also, provided an option to directly reject the invite.

* added course description for teacher's side

* separated course invitations from general notifications (registration/appeal etc)

* - [Instructor side] Corrected the flow for teacher's invite, they won't need to face an acknowledgement tab when the teacher is accepting the invite.
- [Student side] Added Reject button for InviteCard and added the acknowledgement flow.

* [Fixed] Notification page refreshing each time the "View All Notifications" button is pressed

* [Fix-Student Notifications Page] Invites didn't show buttons based on policies existing or not.

* - fix: missing keys in map
- fix: missing cohort id resulting in null error
- optimisation: SystemNotification list re-renders

* - chore: removed unnecessary logs
- added description for submit appeal dialog box as it was missing

* [fix: notification page] Showing "acknowledged" button when the student has re-acknowledged the policy

---------

Co-authored-by: Nandan Prabhudesai <nandanprabhudesai@gmail.com>

* Course card UI - missing view instructors fixed (vicharanashala#922)

Co-authored-by: Nandan Prabhudesai <nandanprabhudesai@gmail.com>

* Minor updates to test setup (vicharanashala#919)

test(e2e): Handle repeated failures in start of video playback

Added code to fallback to few items before the current video in
case of repeated failures.

Increased end of video tolerance

Updated test to handle latest UI changes

Co-authored-by: Nandan Prabhudesai <nandanprabhudesai@gmail.com>

* small ui fixes

* fix:activity creation

* conflict resolved

* fix:student list

* fix: update activity submission

* fix:edit rules

* fix:approve submission issue

* fix:HP reset

* fix:overview dashboard

* Feat/advanced ai item creation (vicharanashala#927)

* feat:advanced ai item creation

* fix:manual segmentation issues

* fix:audio extract

* fix:auto segmentation

* fix:text

---------

Co-authored-by: Nandan Prabhudesai <nandanprabhudesai@gmail.com>

* fixed build error

* fixed build errors

* added resolveCohort for centralized resolution

* fix:Incomplete cohort data error on the student dashboard

* fix:incomplete cohrt data

* removed unwanted testing legacy cohorts

* fix:BSONError

* Randomizing order of items (vicharanashala#931)

* Added randomization to sections and modules but getting multiple API calls

* Removed the module and section randomization

* commented out the code which has problem

* fix: added retry logic in stop api (vicharanashala#932)

* Documentation of testing pipeline added

* chore: port testing agent prompt from crowdsourced branch

* Documentation of testing pipeline added (vicharanashala#936)

* Fix: ReDoS vulnerability in URL-only regex validation

Replace nested quantifier regex /^(https?:\/\/\S+\s*)+$/ with
/^https?:\/\/\S+(\s+https?:\/\/\S+)*\s*$/ in validateQuestionText()
to eliminate exponential backtracking (CWE-1333 / ReDoS).

Introduced in: 3b8c5d4 (Feat: Crowd Question submission)

* Fixing course auto approval alert and notification to the learner (vicharanashala#923)

Co-authored-by: Nandan Prabhudesai <nandanprabhudesai@gmail.com>

* Longest option always correct - fix for Smart Bloom mode (vicharanashala#921)

* Feature/crowdsourced question clean (vicharanashala#935)

* feat: add crowdsourced question pipeline module

* chore: normalize file permissions for crowdsourced module

* Potential fix for pull request finding 'CodeQL / Inefficient regular expression'

Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>

---------

Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>

* Chore/db query (vicharanashala#939)

* chore: add fetch single course enrollment data and watch hours query inside cohort repository - tempRes()

* add query to fetch item wise watch hour data of enrolled users in a cours

* feat: add feedback submission data of a course

* feat: add query to fetch enrollment wise feedback submissions

* Cap GuruSetu watch-time in feedback export query

---------

Co-authored-by: Abiram-k <abiramk0107@gmail.com>

* ci: strengthen PR merge testing pipeline (vicharanashala#942)

* ci: strengthen PR merge testing pipeline

- fix(linter.yml): change target branch from 'main' to 'combined-updates';
  split into lint-backend and lint-frontend jobs with path conditions

- feat(jest-test.yml): add pull-requests:write permission and post vitest
  coverage summary as PR comment via davelosert/vitest-coverage-report-action

- feat(pr-checks.yml): new workflow - TypeScript tsc --noEmit type-check for
  backend (Node 23) and frontend (Node 20) on every PR to combined-updates

- feat(codeql.yml): new workflow - CodeQL security scan (javascript-typescript)
  on PRs and pushes to combined-updates

- feat(pr-smoke-e2e.yml): new workflow - smoke.spec.ts against staging on PRs;
  skips if STAGING_FRONTEND_URL secret absent; uploads report as artifact

- feat(commit-msg): add husky commit-msg hook running commitlint
- feat(package.json): add commitlint packages and config-conventional preset

- fix(.gitignore): add root .firebase/ to ignored paths

* fix(pr-smoke-e2e): remove secrets context from job if condition

secrets context is not available in job-level if expressions;
use vars.STAGING_FRONTEND_URL (repository variable) instead

* fix(codeql): upgrade CodeQL actions v3 to v4

* chore(codeql): remove custom CodeQL workflow in favour of GitHub default setup

* fix(backend): resolve pre-existing TypeScript errors caught by pr-checks

- fix(cohortsRepository): close missing } on resetHpforCohort body; add
  resetHpForStudent stub method (was called by service but not implemented)
- fix(ICohortsRepository): declare resetHpForStudent in interface
- fix(cohortsService): remove stray tempRes() debug call from listCohorts;
  declare local variables (courseVersionName, instructorEnrollments,
  enrolledVersionIds, enrolledCohortIds) that were used but never declared
- fix(ISettings): add optional crowdsourcedQuestionSubmissionEnabled field
  used by StudentQuestionService

* Update .github/workflows/pr-smoke-e2e.yml

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* fix(vite.config.ts): add coverage reporters json-summary, json, html for vitest coverage report action

Agent-Logs-Url: https://github.com/vicharanashala/vibe/sessions/ff1c6382-230a-4b77-827d-22dd0be5b748

Co-authored-by: MeenakshiArunsankar <45432051+MeenakshiArunsankar@users.noreply.github.com>

* Update .github/workflows/jest-test.yml

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>

* Port stashed changes to new branch

* Progress summary quiz scores updated and progress percent greater than 100 fixed

* Potential fix for pull request finding 'CodeQL / Incomplete string escaping or encoding'

Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>

* fix: resolve merge conflicts with origin main

Agent-Logs-Url: https://github.com/vicharanashala/vibe/sessions/75f05d07-27d7-4356-8ab3-e6adfee830cd

* fix: include all cohort quiz submissions in student progress detail

getBatchQuizSubmissionGrades was filtering cohortId: null when no
cohort was passed, missing submissions stored with a real cohortId.
Changed fallback from { cohortId: null } to {} so quiz score totals
are computed across all cohorts for a given student.

* fix: restore quiz score debug logs lost in merge conflicts

---------

Co-authored-by: ASHIF-MOHAMED <ashifmohd.offl@gmail.com>
Co-authored-by: Abiram-k <abiramk0107@gmail.com>
Co-authored-by: Nandan Prabhudesai <nandanprabhudesai@gmail.com>
Co-authored-by: Meenakshi <meenakshi@Meenakshis-MacBook-Air.local>
Co-authored-by: S-Hamsalekha-annamai <hamsalekha.s@annam.ai>
Co-authored-by: Thirumalesh921 <thirumalesnemalipuri@outlook.com>
Co-authored-by: Pushan Sinha <61679844+programm3d@users.noreply.github.com>
Co-authored-by: Thanha Mariyam <83301883+ThanhaMariyam@users.noreply.github.com>
Co-authored-by: Rishav Kumar <152714834+rishavkumarnit@users.noreply.github.com>
Co-authored-by: Ganesh M <ganeshmeti2004@gmail.com>
Co-authored-by: Rishabh Shukla <99525642+Persu1t@users.noreply.github.com>
Co-authored-by: Srichandan Hota <schota99@gmail.com>
Co-authored-by: Sreehari V R <vrsreehari61@gmail.com>
Co-authored-by: Riya Mehta <riyamehtaatwork@gmail.com>
Co-authored-by: Thanha Mariyam <thanhathanha665@gmail.com>
Co-authored-by: Tamadaramya <tamadaramya7@gmail.com>
Co-authored-by: Tamadaramya <150316412+Tamadaramya@users.noreply.github.com>
Co-authored-by: SAKSHI SHARMA <imsakshivk@gmail.com>
Co-authored-by: AyushAggarwal108 <ayush25112004@gmail.com>
Co-authored-by: Nilesh Sharma <128891455+nxtnilesh@users.noreply.github.com>
Co-authored-by: Rishabh Shukla <shuklarishabh890@gmail.com>
Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>

* fix: handle quiz submit errors gracefully with user-friendly messages

---------

Co-authored-by: Aditya <58661255+adityabmv@users.noreply.github.com>
Co-authored-by: Nandan Prabhudesai <nandanprabhudesai@gmail.com>
Co-authored-by: Abiram-k <abiramk0107@gmail.com>
Co-authored-by: PrabhudesaiNandan <nandan.prabhudesai@kilowott.com>
Co-authored-by: Saaransh Garg <68538240+saaranshgarg1@users.noreply.github.com>
Co-authored-by: Saaransh Garg <saaranshgarg1@gmail.com>
Co-authored-by: agam <agam.w017@gmail.com>
Co-authored-by: Rishav <rishavkumar.nit@gmail.com>
Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: ASHIF-MOHAMED <ashifmohd.offl@gmail.com>
Co-authored-by: Meenakshi <meenakshi@Meenakshis-MacBook-Air.local>
Co-authored-by: S-Hamsalekha-annamai <hamsalekha.s@annam.ai>
Co-authored-by: Thirumalesh921 <thirumalesnemalipuri@outlook.com>
Co-authored-by: Pushan Sinha <61679844+programm3d@users.noreply.github.com>
Co-authored-by: Thanha Mariyam <83301883+ThanhaMariyam@users.noreply.github.com>
Co-authored-by: Rishav Kumar <152714834+rishavkumarnit@users.noreply.github.com>
Co-authored-by: Ganesh M <ganeshmeti2004@gmail.com>
Co-authored-by: Rishabh Shukla <99525642+Persu1t@users.noreply.github.com>
Co-authored-by: Srichandan Hota <schota99@gmail.com>
Co-authored-by: Sreehari V R <vrsreehari61@gmail.com>
Co-authored-by: Riya Mehta <riyamehtaatwork@gmail.com>
Co-authored-by: Thanha Mariyam <thanhathanha665@gmail.com>
Co-authored-by: Tamadaramya <tamadaramya7@gmail.com>
Co-authored-by: Tamadaramya <150316412+Tamadaramya@users.noreply.github.com>
Co-authored-by: SAKSHI SHARMA <imsakshivk@gmail.com>
Co-authored-by: AyushAggarwal108 <ayush25112004@gmail.com>
Co-authored-by: Nilesh Sharma <128891455+nxtnilesh@users.noreply.github.com>
Co-authored-by: Rishabh Shukla <shuklarishabh890@gmail.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* Feature/frontend integrate move course structure (vicharanashala#455)

* feat: add hooks to handle course structure reordering via API

* Draggable reordering in teacher dashboard for modules,sections & items interim implementation

* fix: removed re-ordering hooks

* Reordering sidebar list implementation

* fix for section reorder

* reorder module fix

* modules reorder bug fix

* sections list bug fix

* items reorder bug fix

* reorder items bug fix

---------

Co-authored-by: Abiram-k <abiramk0107@gmail.com>
Co-authored-by: PrabhudesaiNandan <nandan.prabhudesai@kilowott.com>
Co-authored-by: Saaransh Garg <68538240+saaranshgarg1@users.noreply.github.com>

* merge fixes

* fix: anomaly accepts without image/audio, but blocks if different filetype, in single endpoint

* fix(view): more logical AI button placement

* doc fix

* fix(view/edit): Fixed UI, Indents, added button for theme change.

* added transaction to auth

* chore: update README.md with trailer

* feat: added abort

* feat: added support for providing audio

* fix: error should be optional

* fix: endpoint name

* fix: parse json as multipart form converts to string

* fixes

* feat: added manual transcipt

* fix: transcript should be optional

* fix: removed transcript object from db

* fix: removed unnecessary auth from job

* fix: Add quick fix to clamp progress to 100 percentage

* Port stashed changes to new branch

* Progress summary quiz scores updated and progress percent greater than 100 fixed

* Potential fix for pull request finding 'CodeQL / Incomplete string escaping or encoding'

Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>

* fix: resolve merge conflicts with origin main

Agent-Logs-Url: https://github.com/vicharanashala/vibe/sessions/75f05d07-27d7-4356-8ab3-e6adfee830cd

* fix: include all cohort quiz submissions in student progress detail

getBatchQuizSubmissionGrades was filtering cohortId: null when no
cohort was passed, missing submissions stored with a real cohortId.
Changed fallback from { cohortId: null } to {} so quiz score totals
are computed across all cohorts for a given student.

* fix: restore quiz score debug logs lost in merge conflicts

* Fix/progress issue (vicharanashala#949)

* Update EnrollmentRepository.ts

* Update EnrollmentRepository.ts

* fix(frontend): health points typo

* feat(backend): fetch total hp points on student side

* fix(frontend): auto navigate if nextitem not found

* fix(frontend): submission details build error

* fix: handle legacy course ids in cron job

* fix: current hp in submission stats

* Feature/export student mailids (vicharanashala#852)

* Added a new feature with the Smart Bloom mode for ViBe lesson

* Fixes for Smart bloom feature

* Export mailIDs feature added

* removed smart bloom commits

* reverted teacher course page smart bloom

---------

Co-authored-by: Meenakshi <meenakshi@Meenakshis-MacBook-Air.local>
Co-authored-by: Nandan Prabhudesai <nandanprabhudesai@gmail.com>

* Added a new Test for progress status. Some more refactoring and minor updates. (vicharanashala#844)

* test(e2e): Increase tolerance for video completion check.

* test(e2e): Updated new item selection logic in playwright test

Fixed the way a new item is selected and increased time out
interval

* test(e2e): refactor code to improve reusability

Exported common functions for reuse across tests
Increased interval for a few more timeouts

* test(e2e): Added a new test for progress status

The news test plays the entire course video and checks for 100%
completion percentage.

---------

Co-authored-by: Nandan Prabhudesai <nandanprabhudesai@gmail.com>

* Instructor can decide the mandatory submissions

* removed console.logs

* Removed effectiveCohortId

* Fix Progress Bar Ambiguity

* feat(frontend): add tooltip for submission requirements

* Consistent Feedback-Based Progress for Guru Setu Course (vicharanashala#854)

Fixing Persistent Progress for GURU SETU course

* fix:restore full course list when search is cleared (vicharanashala#839)

Co-authored-by: Nandan Prabhudesai <nandanprabhudesai@gmail.com>

* Feat/cohort based chages (vicharanashala#855)

* feat: add autoapproval settings for cohorts

* fix: minor bug fixes

* feat: add cohort based changes for announcement feature

* chore: add cohort based changes in anomalies feature

* chore: Add cohort based changes in Flags feature

* chore: move non cohort students to a cohort feature

* chore: fix bugs realted to cohort

* fix: bulk unenrollment issue

* chore: cap progress percentage to zero

* fix: view details progress issue resolved

* fix: cohort name and id in courses page

* fix: random cohortid being created whil enrollment

* fix: added fallback when an enrollment doesnt have cohortId

* chore: pause registration for cohorts and fix for progress greater than 100 percent

---------

Co-authored-by: Nandan Prabhudesai <nandanprabhudesai@gmail.com>

* resolved  quiz export issue

* feat: add cap for 100% progress, correct totelItems count in version doc

* chore: Linear progression is enabled by default. (vicharanashala#857)

Co-authored-by: Nandan Prabhudesai <nandanprabhudesai@gmail.com>

* Worked on the prompt to generate the question correctly in BINARY for… (vicharanashala#850)

Worked on the prompt to generate the question correctly in BINARY form...

Co-authored-by: Nandan Prabhudesai <nandanprabhudesai@gmail.com>

* Added a new feature with the Smart Bloom mode for ViBe lesson (vicharanashala#830)

* Added a new feature with the Smart Bloom mode for ViBe lesson

* Fixes for Smart bloom feature

* Smart Bloom mode for Question creation

---------

Co-authored-by: Meenakshi <meenakshi@Meenakshis-MacBook-Air.local>
Co-authored-by: Nandan Prabhudesai <nandanprabhudesai@gmail.com>

* feat: add manual refresh using react-query refetch across listing pages

* implemented choices for the excel export

* Added new fields in cohort collection

* removed console.logs

* Feature/smart bloom mode (vicharanashala#858)

* Added a new feature with the Smart Bloom mode for ViBe lesson

* Fixes for Smart bloom feature

* Smart Bloom mode for Question creation

---------

Co-authored-by: Meenakshi <meenakshi@Meenakshis-MacBook-Air.local>
Co-authored-by: Nandan Prabhudesai <nandanprabhudesai@gmail.com>

* Disable blur detection button (vicharanashala#859)

* chore: Linear progression is enabled by default.

* chore: disable blur detection button

---------

Co-authored-by: Nandan Prabhudesai <nandanprabhudesai@gmail.com>

* feat(backend): change cron job interval to 1 minute

* No submission validation for ViBe_milestones

* Student Dashboard UI Revamp (vicharanashala#860)

Student dashboard Ui Revamp

* Ejection Policy V1 (vicharanashala#861)

* created types for ejection policy

* created transformers and validators

* created Repository and test for it

* created service and test for it

* created controller

* updated abilities

* updated validators and transformers

* updated controller, repo and service with apis

* types modified and container created to access the services

* made changes to Controller to fix ability

* created Ejection Policy components

* - configured abilities
- created student cards, modals and list for policies
- created ejection policies page changes to change the message more appropriate
- modified course card to show the Policies button
- modified `useEjectionPolicies` to add policies to result
- added optional chaining for policy actions in `EjectionPolicyCard`
- corrected student ability to view the policies
- corrected controller to get all policies(platform + course wise)

* student ux: added a message to better understand what these policies are for

* - added a link to “platform policies” directly
- added conditions to show only platform policies when visiting this page.

* correcting hook behaviour for platform wise and course wise policies fetching

* - wasn't able to access correct role via store so added it to the hook and showed the policies based on the role

* refetching based on if a policy is deleted, edited or toggled in activation

* - feat: can add more than one platform wise policy
- feat: for each course, priorities of policies must be different, same for the platform wise policies

* removed test

* - Created the Interface for Anomalies Detection for the prop validation in the Ejection Policy Form

- Populated the form state with it

- Populated the UI with it

- Payload added to the data that is being sent to the backend

* - Anomalies threshold score wasn’t being shown in the student side so added that.

- UI Fix: Student modal wasn’t scrollable when policies increased.

* To create custom policy violation trigger, added an input field to frontend to take user’s input conditionally when other is selected

* changed schema for custom violations in ejection policy so that custom properties could be added

* Changed the UI of teacher's policy card to show triggers cleanly just like the student policy cards do

* fix: handled "undefined" error for platform wise policies, when being edited

* rearranged the components for better modularity

* audit trail added for ejection policy(needs to be modified later)

* resolved validation error for audit trails

* Added courseVersionId to the entire flow of ejection policies

* created Modal for acknowledgement of the policies, now the student can view them even without enrollment

* Fix: policy acknowledgement modal got closed with each click

* backend implementation of getting acknowledgement completed

* - Fix: "Reject" button in the InviteDropdown not working
- Fix: Dropdown not closing when reject was clicked

* fix: missing acknowledgement variable in enrollUser function for other calls

* Basic configuration of omitting the scope of a policy is done
basic setup of manual ejection is done

* correction jsx

* corrected the flow that aligns with the cohort implementation of the courses

* added cohort id to student modal and fixed UI so that user knows that there would be only one policy per cohort

* - removed priority from UI
- commented out other triggers for now except inactivity

* manual ejection and re-instatement implemented

* enrollment repo issue due to cohortId being null

* cron job for inactivity of students implemented based on student policy

* backend implementation of notifications for ejection and reinstatement is completed

* frontend implementation for notification ejection and reinstatement implemented

* warning notification implemented

* added emailService for ejection and warning

* feat:added ejection history tab with filters

* fix:removed cohort filtering from ejection history

* Appeal flow for student implemented

* fix:student filtering based on ejected and active

* fix:removed create policy button if the policy already exist

* fix:removed the policies from sidebar

* feat:Added actor to History card of individual student

* Notification for teacher's side implemented

* Reject appeal and approve appeal implemented

* chore: removing logs

* - Fix: Check appeal button being shown for all the ejections when a new ejection from a course is made (student side)
- Feature: Appeals tab on the teacher's side

* - Showing success and fail message for appeal modal
- Disabling reject button when no reject reason

* Admin: Notification UI improvement

* Appeal Details being properly shown now

* Showing student details in Appeal section rather than id

* Added reason to notification for rejected appeal

* Fix: Appeal button shouldn't be shown when an appeal is sent for an ejection

* feat:auto ejection trigger by missed deadline

* Removed "Priority" tag from card

* Fix: invites are being shown in notifications now, changed UI to be consistent with other notifications

* re-acknowledgement notification implementation

* feat:added dynamic date and progress for student

---------

Co-authored-by: Thanha Mariyam <thanhathanha665@gmail.com>

* Fix: a missing bracket in pipeline caused errors (vicharanashala#863)

* Fix: syntax issues in frontend course card and routes (vicharanashala#864)

* feat: move registration actions into dropdown menu, keep refresh visible

* Added conformation model for editing baseHp and safeHp

* Course card revamp ejection policy additions (vicharanashala#867)

* Fix: syntax issues in frontend course card and routes

* Fix: removed extra notification bell icon and the corresponding notification modal

* corrected navbar

* Ejection policy button for course card added

* implemented to set points at qb level

* Reinstalled packages

* fix(frontend): hp distributed count

* Feature/smart bloom mode (vicharanashala#870)

* Added a new feature with the Smart Bloom mode for ViBe lesson

* Fixes for Smart bloom feature

* Smart Bloom mode for Question creation

---------

Co-authored-by: Meenakshi <meenakshi@Meenakshis-MacBook-Air.local>
Co-authored-by: Nandan Prabhudesai <nandanprabhudesai@gmail.com>

* Feat/cohort based chages (vicharanashala#869)

* feat: add autoapproval settings for cohorts

* fix: minor bug fixes

* feat: add cohort based changes for announcement feature

* chore: add cohort based changes in anomalies feature

* chore: Add cohort based changes in Flags feature

* chore: move non cohort students to a cohort feature

* chore: fix bugs realted to cohort

* fix: bulk unenrollment issue

* chore: cap progress percentage to zero

* fix: view details progress issue resolved

* fix: cohort name and id in courses page

* fix: random cohortid being created whil enrollment

* fix: added fallback when an enrollment doesnt have cohortId

* chore: pause registration for cohorts and fix for progress greater than 100 percent

* chore: added leaderboard changes for cohort

---------

Co-authored-by: Nandan Prabhudesai <nandanprabhudesai@gmail.com>

* Handling edge cases for ejection (vicharanashala#872)

* Fix: syntax issues in frontend course card and routes

* Fix: removed extra notification bell icon and the corresponding notification modal

* corrected navbar

* Ejection policy button for course card added

* - added course card's missing state
- Fix: When a student accepts a course without a policy, and then if a policy was created for that same course, the acknowledgement modal wasn't being shown. Added reacknowledgement to that flow.

* Fix: When notifications were marked as read, buttons were disappearing

---------

Co-authored-by: Nandan Prabhudesai <nandanprabhudesai@gmail.com>

* Added a new hardcoded course

* additional totalCourse Score is added

* points implementation is automatically created items in qB

* feat: move activity actions into dropdown menu

* Student Dashboard UI Revamp (vicharanashala#874)

* Student dashboard Ui Revamp

* Course Card Flipping feature and button rendering

* fixed courses page with new design alignment

* Cohort Name Batch added to course card & implemented skeleton animation on opening the course details modal

* Changed UI now only one button View Enrollments are there which shows… (vicharanashala#866)

Changed UI now only one button View Enrollments are there which shows both Students and instructors. Also added menu button in course card and Active Inactive tabs..

Co-authored-by: Nandan Prabhudesai <nandanprabhudesai@gmail.com>

* fix(frontend): add logic to hide pagination component if length<limit

* Universal Grid/List View Switcher (vicharanashala#877)

feat: implement universal grid/list view switcher for student dashboard and courses page

* Changes to the frontend view and fixing of the heading of the course … (vicharanashala#881)

Changes to the frontend view and fixing of the heading of the course card.

* Learner Emotion capture - version 1.0 with only course-level analytics

* (Quick fix patch): Changed the progress part for the Gurusetu course.… (vicharanashala#885)

* (Quick fix patch): Changed the progress part for the Gurusetu course. Now rather then showing the progress percentage we are showing the completed items count specifically in Gurusetu course.

* More videos soon message added

* Fix Leaderboard showing zero progress (vicharanashala#884)

* feat: implement universal grid/list view switcher for student dashboard and courses page

* Leaderboard showing zero fixed

* Leaderboard fix in both CourseCard.tsx and CourseListCard.tsx

---------

Co-authored-by: Nandan Prabhudesai <nandanprabhudesai@gmail.com>

* Emotion capture dashboard for instructor

* instructor can see the safe/unsafe status of student

* student side dashboard stats for cohort

* Learner Emotion capture - version 1.0 with only course-level analytics (vicharanashala#882)

* Learner Emotion capture - version 1.0 with only course-level analytics

* Emotion capture dashboard for instructor

---------

Co-authored-by: Nandan Prabhudesai <nandanprabhudesai@gmail.com>

* Attaching images as evidence (vicharanashala#886)

* - Refactor: Service and repo layer (autoejectionengine)
- Corrected cron job run time
- Commented out inactivity trigger from AutoEjectionEngine

* Refactor: Service and repo layer(ejectionpolicyservice)

* Refactor: removed inactivity trigger from UI
Refactor: removed service code for inactivity trigger

* - chore: removed logs from files i have worked on
- refactor: Moving Appeal badge logic to a different new component for performance(re-rendering)
- refetch: invalidating appeals on submit of appeals, approval or rejection of appeals

* Feature: Adding images to appeal rather than URL for evidence

---------

Co-authored-by: Nandan Prabhudesai <nandanprabhudesai@gmail.com>

* Added face verification

* added a new legacy course

* Refactor Notification System: Unified Dropdown & Global Registration Requests (vicharanashala#891)

Notification page implementation

* Fix/gurusetu course (vicharanashala#888)

* (Quick fix patch): Changed the progress part for the Gurusetu course. Now rather then showing the progress percentage we are showing the completed items count specifically in Gurusetu course.

* More videos soon message added

* Worked on the frontend and backend for gurusetu course, where if you don't watch previous video completely it will not allow the form to be shown in the frontend. You need to see the video and then fill the form.

---------

Co-authored-by: Nandan Prabhudesai <nandanprabhudesai@gmail.com>

* Profile details , Gender, Country, State, City and Dp update feature (vicharanashala#892)

Co-authored-by: Nandan Prabhudesai <nandanprabhudesai@gmail.com>

* build error fixed

* feat: add restore action for rejected/reverted HP decisions

* completed some fixex in the overview section

* Fix Quiz Attempts flow

* Interface for feedback improved

* feat:migration script

* backend: migration

* Student Dashboard Course Completion Statistics (vicharanashala#897)

Student Dashborad stats specific api and frontend data data display

* feat(proctoring): add virtual camera detection and stream integrity c… (vicharanashala#902)

feat(proctoring): add virtual camera detection and stream integrity checks

Co-authored-by: Nandan Prabhudesai <nandanprabhudesai@gmail.com>

* feat:added rule validation in deadline policy (vicharanashala#904)

* Added fixed for the linear progression disabled course and Gurusetu. (vicharanashala#903)

* Added fixed for the linear progression disabled course and Gurusetu.

* latest changes incorporated..

---------

Co-authored-by: Nandan Prabhudesai <nandanprabhudesai@gmail.com>

* Ejection policy issues (vicharanashala#895)

* Fix: When a student is ejected and if the policy was updated while the student was ejected, then the student won't get the "re-acknowledge" policy modal when they're re-instated.

* Fix: Course was being shown even when the course policy required re-acknowledgement

* Fix: Re-acknowledge button in the notifications kept on showing the button even after re-acknowledgement is done.

* Fix: When a cohort policy was changed and updated twice or more, all the notifications showed the re-acknowledgement button but only the latest one should have shown it.

---------

Co-authored-by: Nandan Prabhudesai <nandanprabhudesai@gmail.com>

* Feat/course and cohort details on appeal (vicharanashala#893)

* feat:added course and cohort details on ejection appeal

* feat:added confirmation for approve and reinstate appeal

---------

Co-authored-by: Nandan Prabhudesai <nandanprabhudesai@gmail.com>

* fix: Prevented duplicate watchtime document creation in quiz (vicharanashala#883)

* fix: Prevented duplicate watchtime document creation in quiz

* fix: handled watchtime issue in quiz

---------

Co-authored-by: Nandan Prabhudesai <nandanprabhudesai@gmail.com>

* Fix/ejection history (vicharanashala#871)

* fix:showing all events in history tab

* fix:showing events in same start and end date

---------

Co-authored-by: Nandan Prabhudesai <nandanprabhudesai@gmail.com>

* Inactivity trigger correction (vicharanashala#880)

* - Refactor: Service and repo layer (autoejectionengine)
- Corrected cron job run time
- Commented out inactivity trigger from AutoEjectionEngine

* Refactor: Service and repo layer(ejectionpolicyservice)

* Refactor: removed inactivity trigger from UI
Refactor: removed service code for inactivity trigger

* - chore: removed logs from files i have worked on
- refactor: Moving Appeal badge logic to a different new component for performance(re-rendering)
- refetch: invalidating appeals on submit of appeals, approval or rejection of appeals

---------

Co-authored-by: Nandan Prabhudesai <nandanprabhudesai@gmail.com>

* feat:added the student deadline and milestone in ejection student list (vicharanashala#873)

Co-authored-by: Nandan Prabhudesai <nandanprabhudesai@gmail.com>

* Feature/hp course details (vicharanashala#836)

Add course + version details in cohort card

Co-authored-by: Abiram-k <abiramk0107@gmail.com>
Co-authored-by: Nandan Prabhudesai <nandanprabhudesai@gmail.com>

* fix(backend): hp trasaction history issue

* build errors fixed

* autoapproval message updated in the UI and other UI fixes

* Fix for export student contact list (vicharanashala#906)

Co-authored-by: Nandan Prabhudesai <nandanprabhudesai@gmail.com>

* added stats function

* totalHp is using fetched directly from enrollment only

* Worked on the frontend to show HP system.. (vicharanashala#907)

Co-authored-by: Nandan Prabhudesai <nandanprabhudesai@gmail.com>

* chore: add a modal when all quiz attempts are exhausted (vicharanashala#905)

* chore: add a modal when all quiz attempts are exhausted

* fix: clicking on already completed quiz keeps loading

* minor: resolve conflicts

* chore: removed extra logs

---------

Co-authored-by: Nandan Prabhudesai <nandanprabhudesai@gmail.com>

* feat: restore HP action - complete implementation

* Fix advance progress on exhausted attempts

* Fix/start stop api (vicharanashala#909)

* Added fixed for the linear progression disabled course and Gurusetu.

* latest changes incorporated..

* Worked on the teachers side. Now showing completed item and total items.

* feat: change modal text and action name

* fix(backend): change minimum required percent to 15%

* Worked on the start and stop now student tries to skip video it is forced to see video again.

* Now if student tries to skip video. So rather then skipping he has to rewatch the video...

---------

Co-authored-by: Nandan Prabhudesai <nandanprabhudesai@gmail.com>
Co-authored-by: Abiram-k <abiramk0107@gmail.com>

* removed console

* solved-conflicts

* disable reset-hp feature

* added method in cohort repository interface

* fix(frontend): cohort refetch and alignment

* fix(backend-cron): reward allocation without 2mnts addition graceminutes, change event types, added new fields in ledger model

* Fix Quiz Evaluation Logic - Value-Based ID Comparison (vicharanashala#914)

Fixed Quiz Evaluation Mongo Instance Comparing logic to maintain consistency

* some Ui changes in the teacher

* feat: add operationId to restore ledger entry and HP button to list view

* fix: sort HP ledger transactions by latest first

* fixed timeslots permission issues

* populate cohortId in enrollment collection

* only student enrollment will update

* frontend: cohortId migration

* fix:activity creation random cohotIds

* fix:insert cohort name as cohort instead of id

* fix: show cohort name while listing

* added 2 legacy courses

* fix:student role should be in uppercase

* added legacy to missing hardcoded

* fix:legacy activities can't submit

* fix:legacy cohort students listing

* Worked on the backend where the vibe_milestone activity rules is not working updating. Now it is updating properly at time of creation. Rules are now updated properly for both assignment and the vibe stone activity....

* fix:hp history listing

* fix:student dash stats

* fix:review

* feat: add infinite revert after restore with operationId tracking

* fix:use cohortId instead of cohort name

* feat: use RESTORE_REVERSAL reason code for revert after restore

* Added individual reset HP feature

* Added student reset Dialog

* Update quiz.tsx

* fixed progress update in stop api

* fixed build error

* Notification tab and modal fixes (vicharanashala#924)

* Fix: Policy acknowledgement modal was being shown in teacher's invite flow, removed it. Teachers can directly accept or reject a course invitation.

* UI Fix:
- Policy Acknowledgement and Re-acknowledgement modal compacted in size
- Removed Notifications from sidebar on instructor side

* chore: removed unnecessary comments made by me

* Fixed: Now when a course with no ejection policies is sent as an invitation to a student, the student is directly able to accept or reject the course without acknowledgement from an empty policy modal.

* Refetching the notification on accepting or rejecting a course by student so that the reject and accept buttons do not keep showing. Also, worked on making the UI consistent with the teacher's notification buttons.

* Notifications based on role

* Added Course Name and Course Description to the Invite Notification. Also, provided an option to directly reject the invite.

* added course description for teacher's side

* separated course invitations from general notifications (registration/appeal etc)

* - [Instructor side] Corrected the flow for teacher's invite, they won't need to face an acknowledgement tab when the teacher is accepting the invite.
- [Student side] Added Reject button for InviteCard and added the acknowledgement flow.

* [Fixed] Notification page refreshing each time the "View All Notifications" button is pressed

* [Fix-Student Notifications Page] Invites didn't show buttons based on policies existing or not.

* - fix: missing keys in map
- fix: missing cohort id resulting in null error
- optimisation: SystemNotification list re-renders

* - chore: removed unnecessary logs
- added description for submit appeal dialog box as it was missing

* [fix: notification page] Showing "acknowledged" button when the student has re-acknowledged the policy

---------

Co-authored-by: Nandan Prabhudesai <nandanprabhudesai@gmail.com>

* Course card UI - missing view instructors fixed (vicharanashala#922)

Co-authored-by: Nandan Prabhudesai <nandanprabhudesai@gmail.com>

* Minor updates to test setup (vicharanashala#919)

test(e2e): Handle repeated failures in start of video playback

Added code to fallback to few items before the current video in
case of repeated failures.

Increased end of video tolerance

Updated test to handle latest UI changes

Co-authored-by: Nandan Prabhudesai <nandanprabhudesai@gmail.com>

* small ui fixes

* fix:activity creation

* conflict resolved

* fix:student list

* fix: update activity submission

* fix:edit rules

* fix:approve submission issue

* fix:HP reset

* fix:overview dashboard

* Feat/advanced ai item creation (vicharanashala#927)

* feat:advanced ai item creation

* fix:manual segmentation issues

* fix:audio extract

* fix:auto segmentation

* fix:text

---------

Co-authored-by: Nandan Prabhudesai <nandanprabhudesai@gmail.com>

* fixed build error

* fixed build errors

* added resolveCohort for centralized resolution

* fix:Incomplete cohort data error on the student dashboard

* fix:incomplete cohrt data

* removed unwanted testing legacy cohorts

* fix:BSONError

* Randomizing order of items (vicharanashala#931)

* Added randomization to sections and modules but getting multiple API calls

* Removed the module and section randomization

* commented out the code which has problem

* fix: added retry logic in stop api (vicharanashala#932)

* Documentation of testing pipeline added

* chore: port testing agent prompt from crowdsourced branch

* Documentation of testing pipeline added (vicharanashala#936)

* Fix: ReDoS vulnerability in URL-only regex validation

Replace nested quantifier regex /^(https?:\/\/\S+\s*)+$/ with
/^https?:\/\/\S+(\s+https?:\/\/\S+)*\s*$/ in validateQuestionText()
to eliminate exponential backtracking (CWE-1333 / ReDoS).

Introduced in: 3b8c5d4 (Feat: Crowd Question submission)

* Fixing course auto approval alert and notification to the learner (vicharanashala#923)

Co-authored-by: Nandan Prabhudesai <nandanprabhudesai@gmail.com>

* Longest option always correct - fix for Smart Bloom mode (vicharanashala#921)

* Feature/crowdsourced question clean (vicharanashala#935)

* feat: add crowdsourced question pipeline module

* chore: normalize file permissions for crowdsourced module

* Potential fix for pull request finding 'CodeQL / Inefficient regular expression'

Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>

---------

Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>

* Chore/db query (vicharanashala#939)

* chore: add fetch single course enrollment data and watch hours query inside cohort repository - tempRes()

* add query to fetch item wise watch hour data of enrolled users in a cours

* feat: add feedback submission data of a course

* feat: add query to fetch enrollment wise feedback submissions

* Cap GuruSetu watch-time in feedback export query

---------

Co-authored-by: Abiram-k <abiramk0107@gmail.com>

* ci: strengthen PR merge testing pipeline (vicharanashala#942)

* ci: strengthen PR merge testing pipeline

- fix(linter.yml): change target branch from 'main' to 'combined-updates';
  split into lint-backend and lint-frontend jobs with path conditions

- feat(jest-test.yml): add pull-requests:write permission and post vitest
  coverage summary as PR comment via davelosert/vitest-coverage-report-action

- feat(pr-checks.yml): new workflow - TypeScript tsc --noEmit type-check for
  backend (Node 23) and frontend (Node 20) on every PR to combined-updates

- feat(codeql.yml): new workflow - CodeQL security scan (javascript-typescript)
  on PRs and pushes to combined-updates

- feat(pr-smoke-e2e.yml): new workflow - smoke.spec.ts against staging on PRs;
  skips if STAGING_FRONTEND_URL secret absent; uploads report as artifact

- feat(commit-msg): add husky commit-msg hook running commitlint
- feat(package.json): add commitlint packages and config-conventional preset

- fix(.gitignore): add root .firebase/ to ignored paths

* fix(pr-smoke-e2e): remove secrets context from job if condition

secrets context is not available in job-level if expressions;
use vars.STAGING_FRONTEND_URL (repository variable) instead

* fix(codeql): upgrade CodeQL actions v3 to v4

* chore(codeql): remove custom CodeQL workflow in favour of GitHub default setup

* fix(backend): resolve pre-existing TypeScript errors caught by pr-checks

- fix(cohortsRepository): close missing } on resetHpforCohort body; add
  resetHpForStudent stub method (was called by service but not implemented)
- fix(ICohortsRepository): declare resetHpForStudent in interface
- fix(cohortsService): remove stray tempRes() debug call from listCohorts;
  declare local variables (courseVersionName, instructorEnrollments,
  enrolledVersionIds, enrolledCohortIds) that were used but never declared
- fix(ISettings): add optional crowdsourcedQuestionSubmissionEnabled field
  used by StudentQuestionService

* Update .github/workflows/pr-smoke-e2e.yml

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* fix(vite.config.ts): add coverage reporters json-summary, json, html for vitest coverage report action

Agent-Logs-Url: https://github.com/vicharanashala/vibe/sessions/ff1c6382-230a-4b77-827d-22dd0be5b748

Co-authored-by: MeenakshiArunsankar <45432051+MeenakshiArunsankar@users.noreply.github.com>

* Update .github/workflows/jest-test.yml

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>

* Port stashed changes to new branch

* Progress summary quiz scores updated and progress percent greater than 100 fixed

* Potential fix for pull request finding 'CodeQL / Incomplete string escaping or encoding'

Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>

* fix: resolve merge conflicts with origin main

Agent-Logs-Url: https://github.com/vicharanashala/vibe/sessions/75f05d07-27d7-4356-8ab3-e6adfee830cd

* fix: include all cohort quiz submissions in student progress detail

getBatchQuizSubmissionGrades was filtering cohortId: null when no
cohort was passed, missing submissions stored with a real cohortId.
Changed fallback from { cohortId: null } to {} so quiz score totals
are computed across all cohorts for a given student.

* fix: restore quiz score debug logs lost in merge conflicts

---------

Co-authored-by: ASHIF-MOHAMED <ashifmohd.offl@gmail.com>
Co-authored-by: Abiram-k <abiramk0107@gmail.com>
Co-authored-by: Nandan Prabhudesai <nandanprabhudesai@gmail.com>
Co-authored-by: Meenakshi <meenakshi@Meenakshis-MacBook-Air.local>
Co-authored-by: S-Hamsalekha-annamai <hamsalekha.s@annam.ai>
Co-authored-by: Thirumalesh921 <thirumalesnemalipuri@outlook.com>
Co-authored-by: Pushan Sinha <61679844+programm3d@users.noreply.github.com>
Co-authored-by: Thanha Mariyam <83301883+ThanhaMariyam@users.noreply.github.com>
Co-authored-by: Rishav Kumar <152714834+rishavkumarnit@users.noreply.github.com>
Co-authored-by: Ganesh M <ganeshmeti2004@gmail.com>
Co-authored-by: Rishabh Shukla <99525642+Persu1t@users.noreply.github.com>
Co-authored-by: Srichandan Hota <schota99@gmail.com>
Co-authored-by: Sreehari V R <vrsreehari61@gmail.com>
Co-authored-by: Riya Mehta <riyamehtaatwork@gmail.com>
Co-authored-by: Thanha Mariyam <thanhathanha665@gmail.com>
Co-authored-by: Tamadaramya <tamadaramya7@gmail.com>
Co-authored-by: Tamadaramya <150316412+Tamadaramya@users.noreply.github.com>
Co-authored-by: SAKSHI SHARMA <imsakshivk@gmail.com>
Co-authored-by: AyushAggarwal108 <ayush25112004@gmail.com>
Co-authored-by: Nilesh Sharma <128891455+nxtnilesh@users.noreply.github.com>
Co-authored-by: Rishabh Shukla <shuklarishabh890@gmail.com>
Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>

---------

Co-authored-by: Aditya <58661255+adityabmv@users.noreply.github.com>
Co-authored-by: Nandan Prabhudesai <nandanprabhudesai@gmail.com>
Co-authored-by: Abiram-k <abiramk0107@gmail.com>
Co-authored-by: PrabhudesaiNandan <nandan.prabhudesai@kilowott.com>
Co-authored-by: Saaransh Garg <68538240+saaranshgarg1@users.noreply.github.com>
Co-authored-by: Saaransh Garg <saaranshgarg1@gmail.com>
Co-authored-by: agam <agam.w017@gmail.com>
Co-authored-by: Rishav <rishavkumar.nit@gmail.com>
Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: ASHIF-MOHAMED <ashifmohd.offl@gmail.com>
Co-authored-by: Meenakshi <meenakshi@Meenakshis-MacBook-Air.local>
Co-authored-by: S-Hamsalekha-annamai <hamsalekha.s@annam.ai>
Co-authored-by: Thirumalesh921 <thirumalesnemalipuri@outlook.com>
Co-authored-by: Pushan Sinha <61679844+programm3d@users.noreply.github.com>
Co-authored-by: Thanha Mariyam <83301883+ThanhaMariyam@users.noreply.github.com>
Co-authored-by: Rishav Kumar <152714834+rishavkumarnit@users.noreply.github.com>
Co-authored-by: Ganesh M <ganeshmeti2004@gmail.com>
Co-authored-by: Rishabh Shukla <99525642+Persu1t@users.noreply.github.com>
Co-authored-by: Srichandan Hota <schota99@gmail.com>
Co-authored-by: Sreehari V R <vrsreehari61@gmail.com>
Co-authored-by: Riya Mehta <riyamehtaatwork@gmail.com>
Co-authored-by: Thanha Mariyam <thanhathanha665@gmail.com>
Co-authored-by: Tamadaramya <tamadaramya7@gmail.com>
Co-authored-by: Tamadaramya <150316412+Tamadaramya@users.noreply.github.com>
Co-authored-by: SAKSHI SHARMA <imsakshivk@gmail.com>
Co-authored-by: AyushAggarwal108 <ayush25112004@gmail.com>
Co-authored-by: Nilesh Sharma <128891455+nxtnilesh@users.noreply.github.com>
Co-authored-by: Rishabh Shukla <shuklarishabh890@gmail.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* fix: resolve pre-existing codebase bugs

- AnomalyValidators.ts: fix circular import via barrel causing AnomalyType to be undefined
- creationFunctions.ts: add missing createBlogItem export
- EnrollmentRepository.ts: remove duplicate closing bracket causing syntax error
- ProgressRepository.ts: resolve 5 unresolved git merge conflict blocks

* fix: patch SlowBuffer for legacy buffer-equal-constant-time on Node.js v10+
…ilures (vicharanashala#956)

* Initial plan

* chore: outline minimal fix plan

Agent-Logs-Url: https://github.com/vicharanashala/vibe/sessions/85c14d92-50a1-4a12-a544-c7b340255982

* fix: resolve broken merge artifacts in enrollment and progress repositories

Agent-Logs-Url: https://github.com/vicharanashala/vibe/sessions/85c14d92-50a1-4a12-a544-c7b340255982

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: Meenakshi <45432051+MeenakshiArunsankar@users.noreply.github.com>
…icharanashala#954)

* fix: resolve merge conflict in EnrollmentService and codebase fixes

- Fix broken merge conflict in getDetailedEnrollment (duplicate ratio/progress logic)
- Add Math.min cap to percentCompleted calculation
- Uncomment and fix updateProgressPercentById call
- Fix itemCounts fallback scoping
- Other codebase fixes across repositories and workers

* fix: correct coverage report paths in CI workflow

Remove duplicate 'backend/' prefix from json-summary-path and json-final-path
since working-directory already sets the base to backend/

* fix: resolve merge conflicts in ProgressRepository

Accept combined-updates version with robust duration calculation
(client-reported duration with wall-clock fallback) and isExpired filter

* fix: resolve remaining TypeScript type errors across codebase

- Update IAnomalyData fields (userId, courseId, versionId, itemId) to string | ObjectId
- Fix AnomalyService.getCourseAnomalies to match getAnomaliesByCourse signature
- Add .toString() for ID type params in FirebaseAuthService enrollUser calls
- Add missing allowSkip property in GenAIService quiz details
- Remove unused textUploadOptions import from QuestionController
- Fix versionId.toString() in AnomalyService.createAnomaly
vicharanashala#958)

fix: update dependencies and polyfill Buffer.SlowBuffer for Node.js compatibility
…a#959)

* ci: isolate e2e dependency install in nightly workflow

* ci: sync pnpm version with packageManager
* ci: isolate e2e dependency install in nightly workflow

* ci: sync pnpm version with packageManager

* fix: add json5 and types for TypeScript compatibility
…la#961)

Co-authored-by: Meenakshi <meenakshi@Meenakshis-MacBook-Air.local>
chore(backend): add json5 dependency and lockfile entry

Co-authored-by: Meenakshi <meenakshi@Meenakshis-MacBook-Air.local>
@github-actions github-actions Bot added the frontend Changes to the frontend of the project label Apr 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

frontend Changes to the frontend of the project

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants