🎓 Congratulations

YOU EARNED IT

Your diploma is ready. Download it, share it, and join the MarkCMO Academy Graduate Wall.

🎓
🎓
Certificate of Completion
MARKCMO ACADEMY
Established 2026 · Mark Donnigan, Founder & Dean
This certifies that
GRADUATE NAME
has successfully completed the rigorous course of study in
Course Title
4.0
GPA
A
Grade
2026
Year
Summa Cum Laude
March 2026
markcmo.com/verify

Complete Your Graduate Profile

Your profile appears on the Graduate Wall & gets its own public page - shareable with employers, clients & peers.

Profile Photo
👤

Drag & drop or click to upload. Square crop works best.

You'll receive a private link to update your profile anytime. Only your name, photo, bio and credentials are public.

`); setTimeout(() => { w.document.close(); w.print(); }, 800); } // ── LINKEDIN SHARE ───────────────────────────────────────────────────────────── function shareLinkedIn() { const text = encodeURIComponent(`I just earned my ${courseTitle} diploma from MarkCMO Academy with a ${GPA} GPA - ${DESIGNATION}! Harvard/MIT-level rigour. This is what executive education should look like. 🎓 #MarkCMOAcademy #FractionalCMO #ExecutiveEducation`); const url = encodeURIComponent('https://markcmo.com/courses'); window.open(`https://www.linkedin.com/sharing/share-offsite/?url=${url}&summary=${text}`, '_blank'); } // ── PHOTO UPLOAD ────────────────────────────────────────────────────────────── let photoDataUrl = null; function handlePhotoSelect(e) { const file = e.target.files[0]; if (!file) return; processPhoto(file); } function handleDragOver(e) { e.preventDefault(); document.getElementById('drop-zone').classList.add('dragging'); } function handleDragLeave() { document.getElementById('drop-zone').classList.remove('dragging'); } function handleDrop(e) { e.preventDefault(); document.getElementById('drop-zone').classList.remove('dragging'); const file = e.dataTransfer.files[0]; if (file && file.type.startsWith('image/')) processPhoto(file); } function processPhoto(file) { const reader = new FileReader(); reader.onload = (ev) => { // Resize to max 400px to keep payload small const img = new Image(); img.onload = () => { const canvas = document.createElement('canvas'); const max = 400; let w = img.width, h = img.height; if (w > h) { if (w > max) { h = h*(max/w); w = max; } } else { if (h > max) { w = w*(max/h); h = max; } } canvas.width = w; canvas.height = h; canvas.getContext('2d').drawImage(img, 0, 0, w, h); photoDataUrl = canvas.toDataURL('image/jpeg', 0.82); const preview = document.getElementById('photo-preview'); preview.innerHTML = `Your photo`; toast('Photo uploaded - looking sharp 📸', 'gold'); }; img.src = ev.target.result; }; reader.readAsDataURL(file); } // ── PRE-FILL NAME ───────────────────────────────────────────────────────────── document.addEventListener('DOMContentLoaded', () => { const nameEl = document.getElementById('pf-name'); if (nameEl && STUDENT_NAME) nameEl.value = STUDENT_NAME; }); // ── SUBMIT PROFILE & JOIN GRAD WALL ────────────────────────────────────────── async function submitProfile() { const bio = document.getElementById('pf-bio').value.trim(); if (!bio) { toast('Please write a short bio - it appears on your profile page', 'red'); document.getElementById('pf-bio').focus(); return; } const btn = document.getElementById('submit-grad-btn'); btn.disabled = true; btn.textContent = 'Publishing...'; const payload = { name: document.getElementById('pf-name').value.trim() || STUDENT_NAME, course: COURSE_ID, courseTitle: courseTitle, gpa: parseFloat(GPA), letter: LETTER, designation: DESIGNATION, diplomaNumber: diplomaNum, completedAt: new Date().toISOString(), photo: photoDataUrl || null, bio: bio, title: document.getElementById('pf-title').value.trim(), company: document.getElementById('pf-company').value.trim(), location: document.getElementById('pf-location').value.trim(), linkedin: document.getElementById('pf-linkedin').value.trim(), website: document.getElementById('pf-website').value.trim(), twitter: document.getElementById('pf-twitter').value.trim() }; try { const resp = await fetch('/.netlify/functions/course-graduate', { method: 'POST', headers: { 'Content-Type': 'application/json' }, body: JSON.stringify(payload) }); const data = await resp.json(); if (data.success) { // Save owner token so Edit button shows on profile page localStorage.setItem('mcademy_my_diploma', diplomaNum); // Replace form with success state then redirect to profile const setupEl = document.getElementById('profile-setup'); setupEl.innerHTML = `
🎓
PROFILE PUBLISHED

You're live on the Graduate Wall. Redirecting to your profile page in a moment…

View My Profile → Graduate Wall

Profile: /profile?id=${diplomaNum}

`; // Auto-navigate to profile after 2.5s setTimeout(() => { location.href = '/profile?id=' + diplomaNum; }, 2500); } else { throw new Error(data.error || 'Save failed'); } } catch(e) { toast('Submission failed - please try again', 'red'); btn.disabled = false; btn.textContent = '✦ Publish Profile & Join Graduate Wall →'; } } // ── TOAST ────────────────────────────────────────────────────────────────────── let toastTimer; function toast(msg, type = 'gold') { const el = document.getElementById('toast'); el.textContent = msg; el.className = `toast ${type} show`; clearTimeout(toastTimer); toastTimer = setTimeout(() => el.classList.remove('show'), 4000); }