Skip to content

Conversation

@hornersa
Copy link
Contributor

@hornersa hornersa commented Jan 20, 2026

Summary by CodeRabbit

  • Bug Fixes
    • More reliable handling of encoded characters in resource identifiers so attachments with encoded spaces are processed correctly.
    • Attachment handling adjusted to be more consistent with actual file names/paths, reducing mismatches when retrieving uploaded content.

✏️ Tip: You can customize this high-level summary in your review settings.

@hornersa hornersa marked this pull request as draft January 20, 2026 22:21
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Jan 20, 2026

Warning

Rate limit exceeded

@hornersa has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 14 minutes and 28 seconds before requesting another review.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

Walkthrough

Extraction and attachment handling were changed: ExtractionHelper now URL-decodes the extracted resourceId (UTF-8), strips spaces, and builds fullFilePath from unzipLocation + "/" + oldResourceId; AttachmentHelper no longer URL-decodes incoming file path and filename before processing.

Changes

Cohort / File(s) Summary
ExtractionHelper: URL-decode and strip spaces
samigo/samigo-qti/src/java/org/sakaiproject/tool/assessment/qti/helper/ExtractionHelper.java
Added URLDecoder decoding of oldResourceId (UTF-8) inside makeFCKAttachment, wrapped in try-catch for UnsupportedEncodingException (logged). After decoding, spaces are removed via StringUtils.replace. fullFilePath now uses unzipLocation + "/" + oldResourceId without additional space-replacement.
AttachmentHelper: removed pre-decoding
samigo/samigo-qti/src/java/org/sakaiproject/tool/assessment/qti/helper/AttachmentHelper.java
Removed prior URL-decoding of fullFilePath and filename (and its try-catch). Inputs are now used as-is when determining MIME/type and creating ContentResource.
🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The pull request title clearly and specifically describes the main change: removing URL-encoded spaces from imported filenames in samigo, which matches the actual modifications across the two Java files.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@hornersa hornersa marked this pull request as ready for review January 20, 2026 22:39
@hornersa hornersa marked this pull request as draft January 28, 2026 00:02
@hornersa hornersa marked this pull request as ready for review January 28, 2026 00:20
@hornersa hornersa requested a review from ern January 28, 2026 00:21
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.

2 participants