Skip to content

Production - #203

Merged
princegupta1131 merged 22 commits into
masterfrom
production
Sep 16, 2026
Merged

princegupta1131 merged 22 commits into
masterfrom
production

Conversation

@vpPavithra

Copy link
Copy Markdown

No description provided.

likhithThammegowda and others added 22 commits July 29, 2026 12:16
jumbler serves both practice quizzes and graded assessments. falseCreator zeroes
every option's isCorrect so answers can't be read client-side - correct for
graded assessments (scored server-side), but it breaks quizzes, which are scored
client-side (quiz.service.checkAnswer reads isCorrect; with all flags false,
filter(options,'isCorrect')[0] is undefined and throws). Now falseCreator runs
only when isAssessment is true; quizzes keep their real isCorrect flags.
Quiz fix: apply falseCreator only to graded assessments (v5.2.7)
The jumbler response now sets isAssessment: true for all content so the player
treats every quiz/assessment through the graded (assessment) path. The
falseCreator answer-hiding remains gated on the source isAssessment flag.
jumbler: always report isAssessment=true (v5.2.8)
Falls back to 60 when the source assessment JSON doesn't provide a passPercentage, instead of passing undefined through to the client.
…positive

jumbler now omits passPercentage from the response entirely when the source
assessment JSON doesn't provide a positive value, instead of forwarding a
hardcoded default to the client.
… of > 0

Includes passPercentage in the jumbler response whenever the source
assessment JSON provides a truthy value, rather than requiring it be
strictly greater than 0.
…assPercentage in jumbler

jumbler now omits passPercentage only when the source JSON has no value at
all. When present, it is passed through for assessments, and reported as 0
for non-assessment content.
Adds GET /protected/v8/report/mnc-attendance and /meta, streaming a
self-contained HTML report from a private S3 bucket to holders of the
MNC_REPORT_VIEWER role.

- ETag / If-None-Match returns 304, so the ~9.4MB body only transfers on
  days the daily upload actually changed rather than on every view
- The role is re-checked inside the route: PORTAL_API_WHITELIST_CHECK
  defaults to 'false', so the whitelist ROLE_CHECK cannot be relied on
- Whitelisted in both the API_LIST map and the flat array
- Passes Content-Encoding through when the object is already gzipped,
  otherwise the global compression middleware compresses on the fly
- S3 credentials are left undefined by default so the SDK falls back to
  the instance / IRSA role instead of static keys
Issue #000 feat: Serve MNC CNE attendance report from private S3 bucket
Issue #000 chore: Add release notes for v5.2.13
The report endpoints checked session.userRoles, which permissionHelper.ts and
rolePermission.ts both assign a hardcoded 16-role array that is identical for
every user. MNC_REPORT_VIEWER is not in that array, so the check could never
pass — the endpoints returned 403 no matter which roles a user actually held.

Adding the role to that array was not an option: it would grant it to every
authenticated user and expose the attendance roster to anyone able to log in.

Now reads session.orgs, which is populated from the real user profile, and
checks organisations[].roles — the same source SCOPE_CHECK uses in
apiWhiteList.ts. Scoped to this route only, so no other endpoint changes
behaviour.

Verified against the real bucket: 200 with the role, 403 without it, 304 on
revalidation, and 7.11MB gzipped from a 9.92MB object.
Issue #000 fix: Read real user roles for the MNC report gate (v5.2.14)
@princegupta1131
princegupta1131 merged commit 5e13654 into master Sep 16, 2026
1 check failed
@princegupta1131
princegupta1131 deleted the production branch September 23, 2026 07:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants