-
Notifications
You must be signed in to change notification settings - Fork 2
Labels
Description
Implement a download feature that allows users to download resources or data as needed within the CourseApplication platform. This could include course materials, generated reports, or any files relevant to user activity. The new feature should integrate seamlessly with the current application structure and UI.
Acceptance Criteria:
- Users can trigger downloads from relevant sections.
- The implementation supports common file types (e.g., PDF, DOCX, CSV).
- Proper error handling is in place for failed downloads.
- Access permissions for downloads are respected based on user role.
Potential Enhancements:
- Download progress indicators for large files.
- Bulk/multi-file download capability.
Implementation notes and code pointers:
- The main front-end logic is located in
frontend/script.js. This file handles navigation, UI updates, and contains candidate spots for adding UI controls and logic for download actions. For example, you can define new functions similar torefreshCourses,showCourseDetails, or utilize event handlers for modals to integrate download triggers (see script.js). - For managing download UI (modals/buttons), also reference the modal-related styles in
frontend/styles.cssfor consistent UI updates (see styles.css). - To support backend file retrieval, consider creating an appropriate API endpoint in the .NET backend (possibly in
Controllers/HomeController.cs) to serve downloadable files with access control (see HomeController.cs). - Ensure error handling in downloads leverages the front-end's error modal functionality (see
showErrorModalin script.js) and server-side HTTP error responses.
Please consider best practices for file security during the download process.
Reactions are currently unavailable