{% extends 'base.html' %} {% block title %}Cloud Synchronization & Updates • Student Smart Portal{% endblock %} {% block content %}
CLASSROOM SYNC ENGINE

Cloud synchronization & Updates

Two-way cloud synchronization with Cloudflare D1 & automated OTA software updates.

πŸ“± Phone Sync (Offline Relay) →
πŸ’‘ Normal lectures and exams remain fully offline on SSP@OUC. Connect to the internet only when synchronizing records or checking for updates.
{% if msg %}
{{ msg }}
{% endif %}

System Software & OTA Updates

v{{ curr_ver }}

Installed Version: v{{ curr_ver }} (Classroom Server) • Last checked: {{ last_check_text }}

{% if last_status and last_status.get('update_available') %}
β˜… New Software Release Available: v{{ last_status.get('latest_version') }}

{{ last_status.get('release_notes', '') }}

{% elif last_status and last_status.get('error') %}

{{ last_status['error'] }}

{% endif %}

Direct Cloud Sync (Cloudflare D1)

{% if sync_status %} {% if sync_status.is_running %} ⚑ Syncing… {% elif sync_status.total_pending > 0 %} πŸ“¦ {{ sync_status.total_pending }} Queued Offline {% else %} βœ“ Synced {% endif %} {% endif %} Cloud ↔ Local

Securely downloads ready exams from Cloudflare, syncs faculty profiles, and uploads completed offline attendance and exam results.

{% if sync_status and sync_status.total_pending > 0 %}
Offline Queue: {{ sync_status.total_pending }} items ready to sync:
    {% if sync_status.pending_attendance %}
  • {{ sync_status.pending_attendance }} completed attendance sessions
  • {% endif %} {% if sync_status.pending_quiz_results %}
  • {{ sync_status.pending_quiz_results }} completed examination score batches
  • {% endif %} {% if sync_status.pending_local_quizzes %}
  • {{ sync_status.pending_local_quizzes }} locally created quizzes (drafts)
  • {% endif %}
{% endif %} {% if may_direct_sync %}
{% else %}

An administrator must initiate direct synchronization.

{% endif %}

Recent synchronization runs:

{% if runs %} {% else %}

No synchronization runs recorded yet.

{% endif %}
{% if is_primary_admin %}

Primary Local Administrator — Staff Mapping

Security & Permissions

Import the encrypted staff permissions file downloaded from the Cloudflare portal, then link each faculty member to the corresponding local account.

{% for x in links %} {% endfor %}
Cloud Username Cloud Role Status Local User
{{ x['cloud_username'] }} {{ x['cloud_role'] }} {{ x['cloud_status'] }} {% if x['local_username'] %} {{ x['local_username'] }} {% else %} Unlinked {% endif %}
{% endif %} {% if user['role'] == 'admin' %}

Open Attendance on Behalf of a Teacher

Administrators can launch a teacher's attendance session and display its QR code without using that teacher's password.

{% endif %}

Import a Ready MCQ Quiz (.ssp)

Upload an encrypted quiz package exported from home or mobile. Imported quizzes stay closed until you select Launch.

Imported Quizzes

{% if recent_quizzes %}
{% for x in recent_quizzes %} {% endfor %}
Quiz Revision Action
{{ x['title'] }} {{ x['revision'] }} Open & Show QR
{% else %}

No imported quizzes yet.

{% endif %}

Download Completed Classroom Records (.ssp)

Export encrypted offline results for manual upload or archiving.

Attendance Sessions:

MCQ Quizzes:

{% endblock %}