-
Notifications
You must be signed in to change notification settings - Fork 49
Open
Labels
blockedIssue blocked by another issueIssue blocked by another issue
Description
!!! Blocked By: #941 !!!
Description:
Add CSV bulk import functionality for Students with error reporting.
Tasks:
- Update
Admin::StudentsController:- Add
importaction to handle CSV upload - Use
BulkStudentImportService.import_from_csv - Validate file presence and format
- Partition results (success/errors)
- Build detailed error messages
- Return results via flash messages
- Add
- Add
templateaction to generate CSV template download - Update index view:
- Add import button to header
- Create import modal with form
- Show CSV requirements: "columns: classroom_id, username"
- Add template download button
- Implement JavaScript modal toggle
Acceptance Criteria:
- Import button opens modal
- Modal shows CSV requirements clearly
- Template download generates correct CSV format
- File upload accepts CSV files
- Import processes CSV using BulkStudentImportService
- Success count displayed after import
- Error messages display per-row details
- Modal closes after successful import
- Validation errors shown for missing file
- Flash messages styled correctly
Files to Update:
app/views/admin/students/index.html.erb
Reference:
app/controllers/admin/students_controller.rb(lines 17-40, 60-62)app/views/admin/students/index.html.erb(current - modal markup)app/services/bulk_student_import_service.rb
Metadata
Metadata
Assignees
Labels
blockedIssue blocked by another issueIssue blocked by another issue
Type
Projects
Status
Todo