feat: Ingest complete Grade 10 Math textbook (Units 1-4) with semantic lesson naming, clean file hierarchy, and AI Video prompt generator

This commit is contained in:
Hamza-Ayed
2026-08-29 04:53:45 +03:00
parent 5b58ead215
commit 439572453f
37 changed files with 1153 additions and 602 deletions
+45 -3
View File
@@ -201,13 +201,16 @@ class CurriculumStudio
<!-- الذكاء الاصطناعي والمخرجات الذكية -->
<div style="background: rgba(255,255,255,0.02); border: 1px solid rgba(255,255,255,0.08); border-radius: 12px; padding: 20px;">
<div style="display: flex; justify-content: space-between; align-items: center; margin-bottom: 15px;">
<div style="display: flex; justify-content: space-between; align-items: center; margin-bottom: 15px; flex-wrap: wrap; gap: 10px;">
<h4 style="color: var(--accent-gold); font-size: 16px; margin: 0;">🧠 الاستوديو الذكي للدرس (AI Assets)</h4>
<button class="btn-primary" style="padding: 8px 16px; font-size: 13px;" onclick="generateAiAssets()">✨ توليد الملخص والاختبار آلياً</button>
<div style="display: flex; gap: 8px;">
<button type="button" class="btn-primary" style="padding: 8px 14px; font-size: 12px; background: linear-gradient(135deg, #7B2CBF, #9D4EDD);" onclick="copyAiVideoPrompt()">🎬 نسخ برومبت فيديو الشرح</button>
<button type="button" class="btn-primary" style="padding: 8px 14px; font-size: 12px;" onclick="generateAiAssets()">✨ توليد الملخص والاختبار آلياً</button>
</div>
</div>
<div style="margin-bottom: 15px;">
<label style="display: block; color: var(--text-secondary); margin-bottom: 8px; font-size: 13px;">رابط فيديو الشرح الذكي (مثلاً من NotebookLM):</label>
<label style="display: block; color: var(--text-secondary); margin-bottom: 8px; font-size: 13px;">رابط فيديو الشرح الذكي (مثلاً من NotebookLM أو YouTube):</label>
<input type="text" id="ai_video_url_input" style="width: 100%; background: #0A0F1A; border: 1px solid rgba(255,255,255,0.1); color: #FFF; padding: 12px; border-radius: 8px; font-size: 14px;" placeholder="https://...">
</div>
@@ -720,6 +723,45 @@ class CurriculumStudio
renderCurriculumTree(filtered);
}
function copyAiVideoPrompt() {
const md = document.getElementById('lesson_markdown_editor').value;
const title = document.getElementById('current_lesson_title').textContent;
if (!md || md.trim() === '') {
alert('يرجى اختيار درس أولاً.');
return;
}
const prompt = `أنت معلم خبير في المنهاج الأردني. بناءً على محتوى الدرس التالي:
عنوان الدرس: ${title}
المحتوى التعليمي والتطبيقات:
${md}
المطلوب:
1. توليد سيناريو شرح فيديو تفاعلي شيق وممتع للدرس (مدته 3-5 دقائق).
2. شرح فكرة الدرس والمفاهيم الأساسية، والخطوات الجبرية للأمثلة بالتفصيل.
3. التنبيه على الأخطاء الشائعة وحل مسألة اليوم أو مهارات التفكير العليا.`;
if (navigator.clipboard && window.isSecureContext) {
navigator.clipboard.writeText(prompt).then(() => {
alert('🎬 تم نسخ برومبت توليد الفيديو بنجاح! يمكنك الآن لصقه في NotebookLM أو منصة توليد الفيديو الذكية.');
}).catch(err => {
copyViaTextarea(prompt);
});
} else {
copyViaTextarea(prompt);
}
}
function copyViaTextarea(text) {
const t = document.createElement('textarea');
t.value = text;
document.body.appendChild(t);
t.select();
document.execCommand('copy');
document.body.removeChild(t);
alert('🎬 تم نسخ برومبت توليد الفيديو بنجاح!');
}
function escapeHtml(str) {
if (!str) return '';
const d = document.createElement('div');