Skip to content

E2606 - Finish ImportExport Module - backend implementation #316

Open
kamatmihir2002 wants to merge 87 commits intoexpertiza:mainfrom
nadkarnik:main
Open

E2606 - Finish ImportExport Module - backend implementation #316
kamatmihir2002 wants to merge 87 commits intoexpertiza:mainfrom
nadkarnik:main

Conversation

@kamatmihir2002
Copy link
Copy Markdown

Problem statement overview:

In the current project, the import feature should be redesigned to support multiple entity types in a clean and scalable way. For each entity, we should clearly define which fields are mandatory, which are optional, and which are system-managed. Only the necessary and user-editable fields should be displayed in the UI. Duplicate handling rules should be defined separately for each entity type, with a short and clear explanation for each rule. This will make the system easier to use, reduce confusion, improve data quality, and allow future expansion without major rework.

You should write code to import users, teams, topics, and questionnaires with their associated “advice.”

You should write code to export assignment grades, author-feedback grades, teammate-review grades, users, teams, topics, and questionnaires with their associated “advice.”

TaylorBrown96 and others added 30 commits November 19, 2025 03:00
- app/helpers/importable_exportable_helper.rb
- app/helpers/duplicated_action_helper.rb
- app/services/export.rb
- app/services/import.rb
- app/services/field_mapping.rb
- app/controllers/export_controller.rb
- app/controllers/import_controller.rb

Note: I've added some filler code so GitHub doesn't throw "Cannot upload empty files" error when commited.
…stly implemented external classes for creation as well.
…elating to the Questionnaire Item and Question Advice example.
… duplicate records in the try_import_records method. This method should be extracted to the service.
…r, everywhere kept refering to the question_id. This wouldn't work for importing, so I changed the schema to use item_id rather than question_id and changed all the references I found to use item_id as well.
- Added script to export AssignmentTeam records filtered by assignment_id
- Included team members, emails, and member counts in detailed export
- Improved export process explanation and cleaned up runner command usage
- Ensured compatibility even without parent association by resolving assignment names manually
… the export controller to be able to send stuff to the frontend for export and index
# Conflicts:
#	app/helpers/importable_exportable_helper.rb
Import and Export Functionality
@github-actions
Copy link
Copy Markdown

2 Warnings
⚠️ Pull request is too big (more than 500 LoC).
⚠️ Pull request modifies config or setup files: config/database.yml.

Generated by 🚫 Danger

nadkarnik and others added 9 commits March 29, 2026 17:19
…cheme for csv table. Passed and made use of assignment_id to help scope the specific assignment an import/export operation is occuring on. Specs were also changed to match this new format.
…wing-up

ported over importable/exportable mixin into project_topic
…ating-correctly

Kdnadkar/fixing teams not populating correctly
@kamatmihir2002 kamatmihir2002 changed the title E2606 -- Finish Import Export (main pull request) E2606 - Finish ImportExport Module - backend implementation Mar 30, 2026
@kamatmihir2002 kamatmihir2002 marked this pull request as ready for review March 30, 2026 23:06
@kamatmihir2002
Copy link
Copy Markdown
Author

PR summary:

Single model export was changed to graph export for models dependent on exported models. (Questionnaires + questionadvice + item)
Enabled export of data that doesn't exist in models, via using spoofed models. Note that this data cannot be imported as of now. (grades)
Added code to hide fields from frontend by removing fields from metadata sent to frontend.

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.

6 participants