Gamify icon indicating copy to clipboard operation
Gamify copied to clipboard

[Feature]: ELUSoC_2026 — Task submission modal ignores the backend links field, preventing URL-based submissions

Open Babin123456 opened this issue 5 months ago • 3 comments

Problem

The POST /api/tasks/:taskId/submissions backend endpoint accepts a links array field (alongside content), intended for submitters to attach reference URLs such as GitHub repositories, live demos, or video recordings. However, the SubmitTaskModal component in TasksPage.jsx only sends { content } — the links field is completely absent from the UI.

Current Behavior

  • The submit form only renders a single <textarea> for text content.
  • Members submitting tasks of type link, file, or multiple have no way to attach reference URLs via the web dashboard.
  • The links array stored in the TaskSubmission model is always empty, even when the task's submissionFormat implies URL references are expected.

Why This Improvement Is Needed

  • The backend API and database schema already support links — the gap is purely in the frontend.
  • For code challenges, participants need to submit GitHub repo links.
  • For creative tasks, participants may need to attach video/demo URLs.
  • Without this field, submitters must embed URLs inside the text area, making moderator review harder.

Proposed Solution

Extend SubmitTaskModal to include a "Reference Links" section that:

  1. Provides a type="url" input where users can paste a URL and click "Add" (or press Enter).
  2. Renders the added links as a removable chip list below the input.
  3. Validates each URL with the native URL constructor before adding.
  4. Caps the list at 5 links.
  5. Sends { content, links } to the backend when links are present.

Expected Outcome

  • Members can attach up to 5 reference URLs to any task submission.
  • Moderators reviewing submissions in the Moderation panel can see the submitted links.
  • The change is fully backward compatible — tasks without links continue to work as before.

Additional Notes

  • Only TasksPage.jsx needs changing; the backend, model, and route are already correct.
  • The field is optional — submissions without links are unchanged.

Babin123456 avatar Jun 27 '26 11:06 Babin123456

Thank you for raising this issue!

We'll review it as soon as possible. We truly appreciate your contributions! ✨

Meanwhile make sure you've visited the README.md, CONTRIBUTING.md, and CODE_OF_CONDUCT.md before creating a PR for this. Also, please do NOT create a PR until this issue has been assigned to you. 😊

github-actions[bot] avatar Jun 27 '26 11:06 github-actions[bot]

Hi, I'd like to work on this issue. I'll extend SubmitTaskModal with a Reference Links section supporting up to 5 URL inputs with validation and a removable chip list, wiring it to send { content, links } to the backend. Could you please assign it to me?

/assign /claim

anshul23102 avatar Jun 29 '26 07:06 anshul23102

Hi,could you assign this issue to me?

Keshavsspppp avatar Jul 03 '26 22:07 Keshavsspppp