feat: enhance asset import functionality and unit tracking

- Added WHISPER_URL environment variable to docker-compose for audio transcription service.
- Updated Nginx configuration to increase timeout settings for API requests.
- Enhanced asset ingestion process to extract unit numbers from ZIP entry paths, supporting various naming conventions.
- Implemented logic to split intensive courses into two regular courses during asset import.
- Added new fields to the Asset and QuestionBank models to track unit numbers and source asset links.
- Introduced backward-compatible fallbacks for fetching study plans and courses from legacy MySQL database.
- Improved error handling and progress tracking during ZIP file uploads in the frontend.
- Created a new SQL migration to add unit_number and source_asset_id columns to the assets and question_bank tables, along with necessary indexes for performance.
This commit is contained in:
2026-04-07 13:38:22 -04:00
parent 7f9b9d69ae
commit 024bd6e46d
11 changed files with 687 additions and 101 deletions
+3
View File
@@ -347,6 +347,7 @@ pub struct Asset {
pub english_level: Option<String>,
pub sam_plan_id: Option<i32>,
pub sam_course_id: Option<i32>,
pub unit_number: Option<i32>,
pub filename: String,
pub storage_path: String,
pub mimetype: String,
@@ -1402,6 +1403,8 @@ pub struct QuestionBank {
pub updated_at: chrono::DateTime<chrono::Utc>,
pub embedding: Option<String>, // PGVector embedding for semantic search
pub embedding_updated_at: Option<chrono::DateTime<chrono::Utc>>,
pub source_asset_id: Option<Uuid>, // audio/video asset that originated this RAG chunk
pub unit_number: Option<i32>, // syllabus unit number from ZIP folder structure
}
#[derive(Debug, Serialize, Deserialize, Clone)]