registerPage('tests', async (content, params = {}) => { document.getElementById('topbar-title').textContent = 'Tests'; async function render(search = '') { const r = await api('tests.php', { action: 'list', search }); if (!r.success) { document.getElementById('tests-table').innerHTML = emptyHTML(); return; } const rows = r.tests; document.getElementById('tests-table').innerHTML = rows.length === 0 ? emptyHTML('No tests found') : `
| Name | Description | NQF | Credits | Pass% | Expiry | Actions |
|---|---|---|---|---|---|---|
| ${t.test_name} | ${t.test_description || '—'} | ${t.nqf_level} | ${t.credits} | ${(+t.passmark * 100).toFixed(0)}% | ${t.expiry} mo |
Options (tick = correct answer)
No options yet.
'}No questions yet.
'}