SH / index.html
Mr-67's picture
Update index.html
009c43d verified
Raw History Blame Contribute Delete
27.2 kB
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Teacher Platform Assistant</title>
<script src="https://cdn.tailwindcss.com"></script>
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap" rel="stylesheet">
<style>
body {
font-family: 'Inter', system-ui, -apple-system, sans-serif;
}
.custom-scrollbar::-webkit-scrollbar {
width: 6px;
}
.custom-scrollbar::-webkit-scrollbar-track {
background: #f1f5f9;
border-radius: 4px;
}
.custom-scrollbar::-webkit-scrollbar-thumb {
background: #cbd5e1;
border-radius: 4px;
}
.custom-scrollbar::-webkit-scrollbar-thumb:hover {
background: #94a3b8;
}
</style>
<script type="module">
import { pipeline } from 'https://cdn.jsdelivr.net/npm/@huggingface/transformers@3.0.0';
let generator = null;
let isModelLoading = false;
// Comprehensive knowledge base for standard platform how-tos
const knowledgeBase = {
synergy: {
extension: `To transfer/copy grades from Canvas to Synergy using a browser extension:
1. Open Canvas Gradebook in one tab and locate the assignment column you want to export.
2. Open Synergy TeacherVUE Gradebook in another tab and create or select the target assignment.
3. Click the Grade Transfer extension icon in your browser toolbar while viewing Canvas to grab/copy the scores.
4. Switch to the Synergy TeacherVUE Gradebook entry screen.
5. Click the extension icon again and select "Paste Grades" or "Fill Grades".
6. Verify that student names and scores match correctly down the list.
7. Click "Save" in Synergy TeacherVUE to lock in the transferred scores.`,
attendance: `To take Daily / Period Attendance in Synergy (TeacherVUE):
1. Log into Synergy TeacherVUE.
2. Click the Attendance icon (green checkmark) for your current class period on the home screen.
3. Choose your view mode: "Chart" (seating chart) or "List".
4. Mark absent or tardy students:
- Click a student's photo/name once for Tardy (T).
- Click twice for Unexcused Absence (A).
- Leave present students blank/default.
5. Review the attendance counts at the top.
6. Click the green "Save" button to submit your attendance to the office.`,
pass: `To handle Hall Passes / Student Tracking in Synergy (BSD):
1. Log into Synergy TeacherVUE.
2. Select your current class section from the main dashboard.
3. Open the "Classroom Management" or "Attendance" tab.
4. Click on the student's name or photo.
5. Select "Issue Hall Pass" or update their out-of-class status location (Restroom, Nurse, Office, Library) and record the start time.
6. Click Save so school administration and office staff can see active passes in real time.`,
assignment: `To post an assignment to StudentVUE / ParentVUE:
1. Go to TeacherVUE > Gradebook > Assignment Main.
2. Click "Add Assignment".
3. Enter Assignment Name, Category (e.g., Homework, Quiz), and Total Points.
4. Set the Due Date and Score Type.
5. Check the "Post to StudentVUE/ParentVUE" box.
6. Click "Save" at the top of the screen.`,
email: `To email parents/guardians directly through Synergy:
1. Go to TeacherVUE > Communication > Send Email.
2. Select the class section(s) you wish to contact.
3. Choose your target audience (Parents/Guardians, Students, or Both).
4. Enter your subject line and compose your message in the body area.
5. Click "Send" to route through the Synergy mail system.`,
comment: `To enter Report Card / Term Comments in Synergy:
1. Open TeacherVUE > Report Card > Report Card Matrix.
2. Select the grading period and class period.
3. Use the dropdown menu in the "Comment" column to choose standard district codes.
4. Enter any custom narrative remarks into the text field if permitted.
5. Click "Save" to finalize grades and comments.`
},
canvas: {
extension: `To transfer grades from Canvas to Synergy:
1. Open Canvas Gradebook and click the browser extension icon to copy the selected assignment column.
2. Switch to Synergy TeacherVUE Gradebook.
3. Open the target assignment score entry grid and click the extension icon to paste scores.`,
attendance: `Note on Attendance in Canvas:
Official school/district attendance is submitted through Synergy SIS. Canvas offers the Roll Call Attendance LTI tool for instructor tracking, but official record-keeping must be completed in Synergy.`,
pass: `Note on Hall Passes in Canvas:
Canvas LMS does not have a native hall pass tool. In districts like BSD, official online hall passes are managed strictly through Synergy SIS.`,
assignment: `To post an assignment in Canvas LMS:
1. Open your course and click "Assignments" in the left sidebar menu.
2. Click the "+ Assignment" button at the top right.
3. Enter the Title, Description, Points, and Submission Type (Online, Paper, External Tool).
4. Set the Due Date and Assign To options (Everyone or specific sections).
5. Click "Save & Publish" to make it visible to students and parents.`,
email: `To message parents or students in Canvas:
1. Click the "Inbox" icon in the global navigation menu on the far left.
2. Click the "Compose a new message" icon at the top.
3. Select your Course, then click the Address Book icon to pick Students or Observers (Parents).
4. Type your Subject and Message, then click "Send".`,
comment: `To leave feedback or assignment comments in Canvas:
1. Open your course and click "SpeedGrader" from an assignment page or the Gradebook.
2. Select the student from the top-right dropdown.
3. View the student submission, enter a score, and type your narrative feedback into the "Assessment Comments" box.
4. Click "Submit".`
},
seesaw: {
extension: `Note on Grade Transfer Extensions:
Grade copying extensions typically target Canvas to Synergy directly. Scores from Seesaw must be manually entered or exported via CSV into Synergy.`,
attendance: `Note on Attendance in Seesaw:
Seesaw does not record official attendance for district reporting. Switch the platform selector to Synergy to record and submit official period attendance.`,
pass: `Note on Hall Passes in Seesaw:
Seesaw does not feature a hall pass or student movement tracking system. For district tracking, switch the platform selector to Synergy to issue official electronic passes.`,
assignment: `To assign an Activity in Seesaw:
1. Click the green "+ Add" button at the top of your class view.
2. Select "Assign Activity".
3. Choose an existing activity from your Library or click "Create New Activity".
4. Add Student Instructions, Voice Instructions, or a Student Template if needed.
5. Click "Save", then click "Assign" and pick the class section(s) or individual students.`,
email: `To send an Announcement or Family Message in Seesaw:
1. Click the green "+ Add" button at the top right.
2. Select "Send Announcement".
3. Choose your recipients (All Families, All Students, or Families & Students).
4. Type your message and attach any photos, videos, or files.
5. Click "Send Now".`,
comment: `To review student work and add feedback comments in Seesaw:
1. Click on the "Journal" or "Activities" tab to view pending submissions.
2. Locate the student submission and click "Review".
3. Add a typed comment, record a voice comment, or use the drawing tools to annotate their work.
4. Click "Approve" (or "Send Back" for revisions) to post it to the journal.`
},
lightspeed: {
message: `To send a message to students in Lightspeed Classroom:
1. Send Message to Entire Class (Broadcast):
- Click the "Send Message" button in the top action bar on your classroom dashboard.
- Type your message in the pop-up text box (e.g., "5 minutes remaining on this assignment!").
- Click "Send". The message will pop up prominently on every connected student's screen.
2. Send Message to an Individual Student:
- Click on the student's individual screen thumbnail tile.
- Click the "Send Message" icon inside their student view panel.
- Type your private notification (e.g., "Please return to the assigned Canvas tab").
- Click "Send" to push the discreet pop-up notice directly to that student's Chromebook/device screen.
3. Student Acknowledgement:
- Messages appear as overlay dialogs on student screens. Students must click "OK" or "Dismiss" on their screen to close the pop-up message and continue working.`,
screen: `To monitor student screens in Lightspeed Classroom:
1. Log into Lightspeed Classroom and select your active class period.
2. Click "Start Class" to initiate the session monitoring.
3. The dashboard will show live thumbnail views of each connected student's screen.
4. Click on any student's screen tile to zoom in, view active browser tabs, or close off-task tabs directly.`,
lock: `To pause internet or lock student screens in Lightspeed:
1. Click the "Lock Screen" or "Pause Web" button at the top navigation bar to apply to all students.
2. To lock an individual student, click on their screen tile and select "Lock Screen".
3. Enter a custom display message (e.g., "Eyes on the Teacher") if prompted.
4. Click "Unlock" when ready to restore student access.`,
push: `To send/push a website link to student devices:
1. Click the "Send Web Link" or "Push URL" button in the top menu bar.
2. Paste or type the target URL (e.g., https://canvas.beaverton.k12.or.us).
3. Choose whether to open the link in a new tab or force open on all student devices.
4. Click "Send" to push the webpage instantly to all active student screens.`,
history: `To check recent student browsing history in Lightspeed:
1. Select the student's tile from the main classroom view.
2. Click "View History" or "Tabs".
3. Review the real-time list of opened URLs, active tab titles, and blocked attempt logs.
4. You can click "Close Tab" next to any off-task site to close it remotely on their device.`,
rules: `To create and manage Web Rules (Allow Lists / Block Lists) in Lightspeed Classroom:
1. Setting up Custom Web Lists:
- Click "Web Rules" in the top class navigation bar.
- Choose whether you want to create an "Allow List" (students can ONLY visit approved sites) or a "Block List" (students can visit any site EXCEPT blocked ones).
- Click "+ New List". Name your list (e.g., "Math Testing Mode" or "Game Site Block") and select a shield icon color.
- Add target URLs (e.g., "khanacademy.org" or "youtube.com/watch?v=12345"). You can add up to 100 URLs per list.
- Click "Save List".
2. Applying Rules to Class:
- In the "Web Rules" window, click "Select List" on the list(s) you want to enforce.
- Choose your mode:
• Allow Mode: Restricts student browsing exclusively to the URLs on your selected Allow List.
• Block Mode: Blocks access to specific sites on your Block List while leaving the rest of the web open.
- Click "Apply Lists". The Web Rules button on your dashboard will turn highlighted blue to confirm rules are active.
3. Turning Rules Off:
- Click "Web Rules" again and select "Turn Off Web Rules" to restore default district filtering.`,
urlformat: `Best Practices for URL Formatting in Lightspeed Web Rules:
1. Omit "https://" and "www.":
- Standard domain: Write "canvas.beaverton.k12.or.us" instead of "https://www.canvas.beaverton.k12.or.us".
2. Domain vs. Specific Webpage Path:
- Entire Site Block/Allow: Entering "youtube.com" applies to all pages on YouTube.
- Specific Video Only: To allow a single video without opening all of YouTube, enter the specific video URL path (e.g., "youtube.com/watch?v=dQw4w9WgXcQ").
- Specific Google Tool: Enter "docs.google.com" or "classroom.google.com" instead of allowing all of "google.com".`
}
};
window.updateQuestions = function() {
const platform = document.getElementById('platformSelect').value;
const quickSelect = document.getElementById('quickSelect');
const input = document.getElementById('userPrompt');
input.value = "";
if (platform === 'synergy') {
quickSelect.innerHTML = `
<option value="custom">-- Choose a question or type below --</option>
<option value="How do I use the copy-paste extension to sync grades from Canvas to Synergy?">How do I use the extension to copy Canvas grades to Synergy?</option>
<option value="How do I take attendance in Synergy TeacherVUE?">How do I take period attendance?</option>
<option value="How do I create an electronic hall pass in Synergy?">How do I create an electronic hall pass?</option>
<option value="How do I post an assignment to StudentVUE and ParentVUE?">How do I post an assignment to StudentVUE/ParentVUE?</option>
<option value="How do I email parents from the gradebook?">How do I email parents from the gradebook?</option>
<option value="How do I enter report card comments in Synergy?">How do I enter report card comments?</option>
`;
} else if (platform === 'canvas') {
quickSelect.innerHTML = `
<option value="custom">-- Choose a question or type below --</option>
<option value="How do I copy grades from Canvas to Synergy using an extension?">How do I export grades to Synergy using an extension?</option>
<option value="How do I record attendance in Canvas?">How do I record attendance in Canvas?</option>
<option value="Can I make a hall pass in Canvas?">Can I make a hall pass in Canvas?</option>
<option value="How do I post an assignment in Canvas LMS?">How do I create and publish an assignment?</option>
<option value="How do I message students and parents in Canvas Inbox?">How do I message students/parents in Canvas?</option>
<option value="How do I add feedback comments in SpeedGrader?">How do I leave feedback in SpeedGrader?</option>
`;
} else if (platform === 'seesaw') {
quickSelect.innerHTML = `
<option value="custom">-- Choose a question or type below --</option>
<option value="Can I take attendance in Seesaw?">Can I take attendance in Seesaw?</option>
<option value="Can I track hall passes in Seesaw?">Can I track hall passes in Seesaw?</option>
<option value="How do I create and assign an activity in Seesaw?">How do I create/assign an activity?</option>
<option value="How do I send family announcements in Seesaw?">How do I send family announcements?</option>
<option value="How do I review work and add feedback comments in Seesaw?">How do I comment on student work?</option>
`;
} else if (platform === 'lightspeed') {
quickSelect.innerHTML = `
<option value="custom">-- Choose a question or type below --</option>
<option value="How do I send a message or pop-up notification to student screens in Lightspeed?">How do I message students or broadcast pop-up notices?</option>
<option value="How do I set up Web Rules, Allow Lists, or Block Lists in Lightspeed?">How do I set up Web Rules, Allow Lists, or Block Lists?</option>
<option value="How should I format URLs for Lightspeed web filtering?">How should I format URLs for filtering specific sites/videos?</option>
<option value="How do I view and monitor student screens in Lightspeed?">How do I view live student screens?</option>
<option value="How do I lock screens or pause internet in Lightspeed Classroom?">How do I lock screens or pause web access?</option>
<option value="How do I push a website URL to student devices?">How do I send/push a website link to students?</option>
<option value="How do I check recent browsing history or close student tabs?">How do I view browsing history or close tabs?</option>
`;
}
};
window.handleQuickSelect = function() {
const quickSelect = document.getElementById('quickSelect').value;
const input = document.getElementById('userPrompt');
if (quickSelect !== "custom") {
input.value = quickSelect;
} else {
input.value = "";
}
};
window.runAssistant = async function() {
const platform = document.getElementById('platformSelect').value;
const input = document.getElementById('userPrompt').value.trim();
const output = document.getElementById('output');
const statusBadge = document.getElementById('statusBadge');
if (!input) {
output.textContent = "Please select a quick question or enter your question first.";
return;
}
const lower = input.toLowerCase();
const pData = knowledgeBase[platform];
// Lightspeed-specific routing
if (platform === 'lightspeed') {
if (lower.includes("message") || lower.includes("broadcast") || lower.includes("notify") || lower.includes("pop-up") || lower.includes("popup") || lower.includes("announcement")) {
output.textContent = pData.message;
return;
}
if (lower.includes("rule") || lower.includes("allow") || lower.includes("block list") || lower.includes("filter") || lower.includes("web list")) {
output.textContent = pData.rules;
return;
}
if (lower.includes("format") || lower.includes("url") || lower.includes("http") || lower.includes("www") || lower.includes("youtube")) {
output.textContent = pData.urlformat;
return;
}
if (lower.includes("screen") || lower.includes("monitor") || lower.includes("view")) {
output.textContent = pData.screen;
return;
}
if (lower.includes("lock") || lower.includes("pause") || lower.includes("block")) {
output.textContent = pData.lock;
return;
}
if (lower.includes("push") || lower.includes("send") || lower.includes("link")) {
output.textContent = pData.push;
return;
}
if (lower.includes("history") || lower.includes("tab") || lower.includes("close")) {
output.textContent = pData.history;
return;
}
}
// Knowledge base matching for other platforms
if (lower.includes("extension") || lower.includes("copy") || lower.includes("transfer") || lower.includes("sync")) {
output.textContent = pData.extension;
return;
}
if (lower.includes("attendance") || lower.includes("tardy") || lower.includes("absent")) {
output.textContent = pData.attendance;
return;
}
if (lower.includes("hall pass") || lower.includes("pass")) {
output.textContent = pData.pass;
return;
}
if (lower.includes("assignment") || lower.includes("activity") || lower.includes("post") || lower.includes("publish")) {
output.textContent = pData.assignment;
return;
}
if (lower.includes("email") || lower.includes("parent") || lower.includes("family") || lower.includes("message") || lower.includes("announcement") || lower.includes("inbox")) {
output.textContent = pData.email;
return;
}
if (lower.includes("comment") || lower.includes("report card") || lower.includes("speedgrader") || lower.includes("feedback") || lower.includes("review")) {
output.textContent = pData.comment;
return;
}
// Browser AI fallback for custom requests using Hugging Face Transformers.js
statusBadge.classList.remove('hidden');
statusBadge.textContent = "⚡ Running Local AI Model in Browser...";
output.textContent = "Processing custom request with local Hugging Face Transformers.js model (Xenova/LaMini-Flan-T5-77M)...";
try {
if (!generator) {
generator = await pipeline('text2text-generation', 'Xenova/LaMini-Flan-T5-77M');
}
let systemName = "Synergy SIS";
if (platform === 'canvas') systemName = "Canvas LMS";
if (platform === 'seesaw') systemName = "Seesaw Learning Platform";
if (platform === 'lightspeed') systemName = "Lightspeed Classroom";
const prompt = `Instruction: Write a clear guide for a teacher using ${systemName}. Request: ${input}`;
const result = await generator(prompt, {
max_new_tokens: 150,
repetition_penalty: 1.5,
no_repeat_ngram_size: 3,
temperature: 0.7
});
output.textContent = result[0].generated_text;
} catch (error) {
output.textContent = "Error generating response locally: " + error.message;
} finally {
statusBadge.classList.add('hidden');
}
};
window.copyOutput = function() {
const text = document.getElementById('output').textContent;
if (!text || text.includes("Response will appear here...")) return;
const el = document.createElement('textarea');
el.value = text;
document.body.appendChild(el);
el.select();
document.execCommand('copy');
document.body.removeChild(el);
const toast = document.getElementById('toast');
toast.classList.remove('translate-y-20', 'opacity-0');
toast.classList.add('translate-y-0', 'opacity-100');
setTimeout(() => {
toast.classList.add('translate-y-20', 'opacity-0');
toast.classList.remove('translate-y-0', 'opacity-100');
}, 2500);
};
</script>
</head>
<body class="bg-slate-900 text-slate-100 min-h-screen py-8 px-4 sm:px-6 flex flex-col items-center justify-center">
<div class="max-w-2xl w-full bg-slate-800/90 backdrop-blur-md rounded-2xl shadow-2xl border border-slate-700/80 p-6 sm:p-8 space-y-6">
<!-- Header -->
<div class="flex items-center justify-between border-b border-slate-700 pb-4">
<div>
<h1 class="text-2xl font-bold bg-gradient-to-r from-indigo-400 to-cyan-400 bg-clip-text text-transparent">
Teacher Platform Assistant
</h1>
<p class="text-xs text-slate-400 mt-1">Instant local guides & zero-cost AI helper for K-12 platforms</p>
</div>
<span class="px-2.5 py-1 text-xs font-semibold rounded-full bg-emerald-500/10 text-emerald-400 border border-emerald-500/20">
100% Free & Local
</span>
</div>
<!-- Platform Selector -->
<div>
<label for="platformSelect" class="block text-sm font-medium text-slate-300 mb-2">
Select Classroom Platform:
</label>
<select id="platformSelect" onchange="updateQuestions()" class="w-full bg-slate-900/80 border border-slate-700 rounded-xl px-4 py-3 text-slate-200 text-sm focus:outline-none focus:ring-2 focus:ring-indigo-500 transition-all">
<option value="synergy">Synergy SIS</option>
<option value="canvas">Canvas LMS</option>
<option value="seesaw">Seesaw</option>
<option value="lightspeed">Lightspeed Systems (Classroom)</option>
</select>
</div>
<!-- Quick Questions -->
<div>
<label for="quickSelect" class="block text-sm font-medium text-slate-300 mb-2">
Choose a Standard Task / Guide:
</label>
<select id="quickSelect" onchange="handleQuickSelect()" class="w-full bg-slate-900/80 border border-slate-700 rounded-xl px-4 py-3 text-slate-200 text-sm focus:outline-none focus:ring-2 focus:ring-indigo-500 transition-all">
<option value="custom">-- Choose a question or type below --</option>
<option value="How do I use the copy-paste extension to sync grades from Canvas to Synergy?">How do I use the extension to copy Canvas grades to Synergy?</option>
<option value="How do I take attendance in Synergy TeacherVUE?">How do I take period attendance?</option>
<option value="How do I create an electronic hall pass in Synergy?">How do I create an electronic hall pass?</option>
<option value="How do I post an assignment to StudentVUE and ParentVUE?">How do I post an assignment to StudentVUE/ParentVUE?</option>
<option value="How do I email parents from the gradebook?">How do I email parents from the gradebook?</option>
<option value="How do I enter report card comments in Synergy?">How do I enter report card comments?</option>
</select>
</div>
<!-- Custom Prompt Textarea -->
<div>
<label for="userPrompt" class="block text-sm font-medium text-slate-300 mb-2">
Or Type Custom Question / Prompt:
</label>
<textarea id="userPrompt" rows="3" placeholder="Select a question above or enter custom request..." class="w-full bg-slate-900/80 border border-slate-700 rounded-xl p-3.5 text-slate-200 text-sm focus:outline-none focus:ring-2 focus:ring-indigo-500 transition-all resize-y custom-scrollbar"></textarea>
</div>
<!-- Action Button -->
<button onclick="runAssistant()" class="w-full bg-gradient-to-r from-indigo-600 to-indigo-500 hover:from-indigo-500 hover:to-indigo-400 text-white font-semibold py-3 px-6 rounded-xl shadow-lg shadow-indigo-500/20 active:scale-[0.99] transition-all flex items-center justify-center gap-2">
<span>Get Guide / Process Request</span>
</button>
<!-- Response Display -->
<div class="relative">
<div class="flex items-center justify-between mb-2">
<label class="text-sm font-medium text-slate-300">Guide Response:</label>
<span id="statusBadge" class="hidden text-xs text-amber-400 font-medium animate-pulse">
⚡ Processing with Local AI...
</span>
</div>
<div id="output" class="w-full bg-slate-950/80 border border-slate-800 rounded-xl p-4 text-slate-300 text-sm leading-relaxed whitespace-pre-wrap min-h-[120px] max-h-[320px] overflow-y-auto custom-scrollbar font-sans">
Response will appear here...
</div>
<button onclick="copyOutput()" class="mt-3 w-full bg-slate-700/80 hover:bg-slate-700 text-slate-200 text-xs font-semibold py-2.5 px-4 rounded-lg transition-all flex items-center justify-center gap-2 border border-slate-600">
<svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>
Copy Response to Clipboard
</button>
</div>
</div>
<div id="toast" class="fixed bottom-6 right-6 bg-emerald-600 text-white text-xs font-medium px-4 py-3 rounded-xl shadow-xl transform translate-y-20 opacity-0 transition-all duration-300 flex items-center gap-2 border border-emerald-400/30 pointer-events-none">
<svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M5 13l4 4L19 7"></path></svg>
Response copied to clipboard!
</div>
</body>
</html>