Batterij Regeling Academy
UW
RESULTAAT.
Alle onderdelen van uw Academy-traject komen hier samen.
Eindstatus
TRAJECT
-
STATUS
Traject wordt geladen
Een ogenblik.
Kandidaat
-
Installatiebedrijf
-
Theorie
-
Praktijk
-
Uw traject
VAN LEREN TOT CERTIFICEREN.
Hieronder ziet u de status van ieder hoofdonderdeel van het traject.
Fase 1
Opleiding
Acht digitale opleidingsmodules.
Controleren
Fase 2
Examentrainer
Oefenen met de digitale vraagbank.
Controleren
Fase 3
Theorie-examen
Formele theoretische beoordeling.
Controleren
Fase 4
Praktijkassessment
Beoordeling door de examinator.
Controleren
Opleidingsmodules
8 MODULES. ÉÉN LEERLIJN.
Examengegevens
THEORIE & PRAKTIJK.
Theorie-examen
Niet afgerond
Theorie
Score
-
Examenversie
-
Examennummer
-
Status
-
Praktijkassessment
Niet afgerond
Praktijk
Kritieke handelingen
-
LFP-risico's
-
Examinator
-
Assessmentnummer
-
Certificaat
CERTIFICAATSTATUS.
Zodra theorie en praktijk succesvol zijn afgerond, wordt hier de certificaatstatus weergegeven.
Batterij Regeling Academy
-
Certificaatnummer
-
Uitgegeven
-
Geldig tot
-
Kwalificatie
EOS / LiFePO4
NOG GEEN RESULTATEN.
Op dit apparaat zijn nog geen resultaten van een Academy-traject opgeslagen. Start of hervat eerst de opleiding.
Naar de Academy →' +
'' +
name +
'' +
'' +
(
done ?
"Module afgerond" :
"Nog afronden"
) +
'' +
'
';
moduleGrid.appendChild(
item
);
}
);
/* =========================================================
TRAJECT — OPLEIDING
========================================================= */
const courseCard =
document.getElementById(
"trajectoryCourse"
);
const courseStatus =
document.getElementById(
"courseStatus"
);
if(
completedModules === 8
){
setCardState(
courseCard,
"completed",
courseStatus,
"8/8 afgerond"
);
}else{
setCardState(
courseCard,
"pending",
courseStatus,
completedModules +
"/8 afgerond"
);
}
/* =========================================================
TRAJECT — OEFENEN
========================================================= */
const practiceCard =
document.getElementById(
"trajectoryPractice"
);
const practiceStatus =
document.getElementById(
"practiceStatus"
);
if(
bestPracticeScore >= 75
){
setCardState(
practiceCard,
"completed",
practiceStatus,
"Examengereed"
);
}else if(
bestPracticeScore > 0
){
setCardState(
practiceCard,
"pending",
practiceStatus,
"Beste score " +
bestPracticeScore +
"%"
);
}else{
setCardState(
practiceCard,
"pending",
practiceStatus,
"Niet gestart"
);
}
/* =========================================================
THEORIE
========================================================= */
const theoryCard =
document.getElementById(
"trajectoryTheory"
);
const theoryStatus =
document.getElementById(
"theoryStatus"
);
const theoryDetailStatus =
document.getElementById(
"theoryDetailStatus"
);
let theoryPassed = false;
if(theory){
theoryPassed =
theory.passed === true;
document.getElementById(
"theoryScore"
).textContent =
theory.score +
" / " +
theory.total +
" (" +
theory.percentage +
"%)";
document.getElementById(
"theoryVersion"
).textContent =
theory.version ||
"-";
document.getElementById(
"theoryNumber"
).textContent =
theory.examNumber ||
"-";
document.getElementById(
"theoryResult"
).textContent =
theoryPassed ?
"Geslaagd" :
"Niet geslaagd";
document.getElementById(
"candidateTheory"
).textContent =
theory.percentage +
"%";
if(theoryPassed){
setCardState(
theoryCard,
"completed",
theoryStatus,
"Geslaagd"
);
theoryDetailStatus.className =
"pass";
theoryDetailStatus.textContent =
"Geslaagd";
}else{
setCardState(
theoryCard,
"failed",
theoryStatus,
"Niet geslaagd"
);
theoryDetailStatus.className =
"fail";
theoryDetailStatus.textContent =
"Niet geslaagd";
}
}else{
setCardState(
theoryCard,
"pending",
theoryStatus,
"Niet afgerond"
);
document.getElementById(
"candidateTheory"
).textContent =
"Open";
}
/* =========================================================
PRAKTIJK
========================================================= */
const practicalCard =
document.getElementById(
"trajectoryPractical"
);
const practicalStatus =
document.getElementById(
"practicalStatus"
);
const practicalDetailStatus =
document.getElementById(
"practicalDetailStatus"
);
let practicalPassed = false;
if(practical){
practicalPassed =
practical.passed === true;
document.getElementById(
"practicalScore"
).textContent =
practical.score +
" / " +
practical.total;
document.getElementById(
"lfpResult"
).textContent =
practical.lfpMastery ===
"yes"
?
"Beheerst"
:
"Niet beheerst";
document.getElementById(
"examinerName"
).textContent =
practical.examiner ||
"-";
document.getElementById(
"assessmentNumber"
).textContent =
practical.assessmentNumber ||
"-";
document.getElementById(
"candidatePractical"
).textContent =
practical.score +
"/" +
practical.total;
if(practicalPassed){
setCardState(
practicalCard,
"completed",
practicalStatus,
"Geslaagd"
);
practicalDetailStatus.className =
"pass";
practicalDetailStatus.textContent =
"Geslaagd";
}else{
setCardState(
practicalCard,
"failed",
practicalStatus,
"Niet geslaagd"
);
practicalDetailStatus.className =
"fail";
practicalDetailStatus.textContent =
"Niet geslaagd";
}
}else{
setCardState(
practicalCard,
"pending",
practicalStatus,
"Niet afgerond"
);
document.getElementById(
"candidatePractical"
).textContent =
"Open";
}
/* =========================================================
EINDSTATUS
========================================================= */
const allModulesDone =
completedModules === 8;
const passedAll =
allModulesDone &&
theoryPassed &&
practicalPassed;
const failed =
(
theory &&
!theoryPassed
) ||
(
practical &&
!practicalPassed
);
const finalCard =
document.getElementById(
"finalResultCard"
);
const mainTitle =
document.getElementById(
"resultMainTitle"
);
const mainText =
document.getElementById(
"resultMainText"
);
const bigValue =
document.getElementById(
"resultBigValue"
);
const bigLabel =
document.getElementById(
"resultBigLabel"
);
const smallState =
document.getElementById(
"resultStateSmall"
);
const heroText =
document.getElementById(
"heroText"
);
const heroActions =
document.getElementById(
"heroActions"
);
finalCard.classList.remove(
"incomplete",
"fail"
);
if(passedAll){
smallState.textContent =
"VOLTOOID";
bigValue.textContent =
"✓";
bigLabel.textContent =
"GESLAAGD";
mainTitle.textContent =
"GESLAAGD.";
mainText.textContent =
candidateName +
" heeft het volledige opleidingstraject, het theorie-examen en het praktijkassessment succesvol afgerond.";
heroText.textContent =
"Gefeliciteerd. Het volledige Batterij Regeling Academy-traject is succesvol afgerond.";
heroActions.innerHTML =
'' +
'Bekijk certificaat →' +
'' +
'' +
'Certificaat controleren' +
'';
}else if(failed){
finalCard.classList.add(
"fail"
);
smallState.textContent =
"HERKANSING";
bigValue.textContent =
"×";
bigLabel.textContent =
"NIET VOLTOOID";
mainTitle.textContent =
"NOG NIET GESLAAGD.";
mainText.textContent =
"Eén of meer examenonderdelen zijn nog niet succesvol afgerond.";
heroText.textContent =
"Bekijk hieronder welk examenonderdeel opnieuw moet worden uitgevoerd.";
}else{
finalCard.classList.add(
"incomplete"
);
smallState.textContent =
"IN UITVOERING";
bigValue.textContent =
completedModules +
"/8";
bigLabel.textContent =
"MODULES";
mainTitle.textContent =
"NOG NIET COMPLEET.";
mainText.textContent =
"Het Academy-traject is nog in uitvoering. Bekijk hieronder welke stap nog openstaat.";
heroText.textContent =
"Uw persoonlijke voortgang en resultaten staan hieronder overzichtelijk bij elkaar.";
}
/* =========================================================
CERTIFICAAT
========================================================= */
const certificateHeading =
document.getElementById(
"certificateHeading"
);
const certificateText =
document.getElementById(
"certificateText"
);
const certificateActions =
document.getElementById(
"certificateActions"
);
if(certificate){
document.getElementById(
"certificateNumber"
).textContent =
certificate.certificateNumber ||
"-";
document.getElementById(
"certificateIssued"
).textContent =
formatDate(
certificate.issued
);
document.getElementById(
"certificateValidUntil"
).textContent =
formatDate(
certificate.validUntil
);
document.getElementById(
"certificateState"
).textContent =
"UITGEGEVEN";
certificateHeading.textContent =
"CERTIFICAAT UITGEGEVEN.";
certificateText.textContent =
"Het certificaat van vakbekwaamheid is aangemaakt en gekoppeld aan het praktijkassessment.";
certificateActions.innerHTML =
'' +
'Bekijk certificaat →' +
'' +
'' +
'Controleer certificaat' +
'';
}else if(passedAll){
document.getElementById(
"certificateState"
).textContent =
"KLAAR VOOR UITGIFTE";
certificateHeading.textContent =
"MAAK UW CERTIFICAAT OP.";
certificateText.textContent =
"Alle voorwaarden zijn afgerond. Het persoonlijke certificaat kan nu worden aangemaakt.";
certificateActions.innerHTML =
'' +
'Certificaat opmaken →' +
'';
}else{
document.getElementById(
"certificateState"
).textContent =
"NOG GEBLOKKEERD";
certificateHeading.textContent =
"CERTIFICAAT NOG NIET BESCHIKBAAR.";
certificateText.textContent =
"Het certificaat wordt beschikbaar nadat de vereiste onderdelen succesvol zijn afgerond.";
}
/* =========================================================
VOLGENDE STAP
========================================================= */
const nextTitle =
document.getElementById(
"nextTitle"
);
const nextText =
document.getElementById(
"nextText"
);
const nextActions =
document.getElementById(
"nextActions"
);
if(
completedModules < 8
){
let nextModule = 1;
for(
let i = 1;
i <= 8;
i++
){
if(
localStorage.getItem(
"brAcademyModule" +
i
) !== "completed"
){
nextModule = i;
break;
}
}
nextTitle.textContent =
"GA VERDER MET MODULE " +
nextModule +
".";
nextText.textContent =
"Rond eerst de volledige digitale opleiding af voordat u verdergaat naar de examenfase.";
nextActions.innerHTML =
'' +
'Naar Module ' +
nextModule +
' →' +
'';
}else if(
!theory
){
if(
bestPracticeScore <
75
){
nextTitle.textContent =
"EERST NOG EVEN OEFENEN.";
nextText.textContent =
"Gebruik de examentrainer om uw kennis verder te testen voordat u het theorie-examen start.";
nextActions.innerHTML =
'' +
'Naar examentrainer →' +
'';
}else{
nextTitle.textContent =
"KLAAR VOOR HET THEORIE-EXAMEN.";
nextText.textContent =
"De opleiding is afgerond en uw oefenresultaat is voldoende om door te gaan.";
nextActions.innerHTML =
'' +
'Start theorie-examen →' +
'';
}
}else if(
!theoryPassed
){
nextTitle.textContent =
"THEORIE HERKANSEN.";
nextText.textContent =
"Het theorie-examen is nog niet succesvol afgerond. Oefen eerst opnieuw voordat u een nieuwe poging doet.";
nextActions.innerHTML =
'' +
'Terug naar examentrainer →' +
'';
}else if(
!practical
){
nextTitle.textContent =
"DOOR NAAR HET PRAKTIJKASSESSMENT.";
nextText.textContent =
"Het theorie-examen is succesvol afgerond. De volgende stap is de praktische beoordeling door de examinator.";
nextActions.innerHTML =
'' +
'Naar praktijkassessment →' +
'';
}else if(
!practicalPassed
){
nextTitle.textContent =
"PRAKTIJK NOG NIET AFGEROND.";
nextText.textContent =
"Het praktijkassessment is nog niet als geslaagd beoordeeld.";
nextActions.innerHTML =
'' +
'Bekijk praktijkassessment →' +
'';
}else if(
!certificate
){
nextTitle.textContent =
"MAAK HET CERTIFICAAT OP.";
nextText.textContent =
"Alle onderdelen zijn succesvol afgerond. Het certificaat kan nu worden aangemaakt.";
nextActions.innerHTML =
'' +
'Certificaat opmaken →' +
'';
}else{
nextTitle.textContent =
"TRAJECT VOLLEDIG AFGEROND.";
nextText.textContent =
"Opleiding, theorie, praktijk en certificering zijn voltooid. Het certificaat kan nu ook via de controlepagina worden geverifieerd.";
nextActions.innerHTML =
'' +
'Bekijk certificaat →' +
'' +
'' +
'Controleer certificaat' +
'';
}
/* =========================================================
CENTRALE ACADEMY-REGISTRATIE
Bevestigt de definitieve voortgang en examenresultaten
bij dezelfde deelnemer uit /academy-aanmelden.
========================================================= */
async function syncCentralResult(){
const participantId =
localStorage.getItem(
"brAcademyParticipantId"
);
const participantToken =
localStorage.getItem(
"brAcademyParticipantToken"
);
if(
!participantId ||
!participantToken
){
return;
}
try{
const response =
await fetch(
"https://kgbzjwacqzdaowjwbcfu.supabase.co/rest/v1/rpc/academy_update_voortgang",
{
method:"POST",
headers:{
"apikey":
"sb_publishable_8lBmk5Y6Ln5Tz7gOMZfWUw_Zb4-PiFK",
"Content-Type":
"application/json",
"Accept":
"application/json"
},
body:JSON.stringify({
p_deelnemer_id:
participantId,
p_toegang_token:
participantToken,
p_cursus_voortgang:
completedModules,
p_theorie_score:
theory &&
typeof theory.percentage ===
"number"
? theory.percentage
: null,
p_theorie_geslaagd:
theory
? theoryPassed
: null,
p_theorie_examennummer:
theory &&
theory.examNumber
? theory.examNumber
: null,
p_praktijk_score:
practical &&
typeof practical.score ===
"number"
? practical.score
: null,
p_praktijk_geslaagd:
practical
? practicalPassed
: null,
p_assessmentnummer:
practical &&
practical.assessmentNumber
? practical.assessmentNumber
: null
})
}
);
if(!response.ok){
const errorText =
await response.text();
console.error(
"Academy centrale resultaatregistratie:",
errorText
);
return;
}
const saved =
await response.json();
if(saved === true){
localStorage.setItem(
"brAcademyResultCentralSaved",
"true"
);
if(passedAll){
localStorage.setItem(
"brAcademyFullyPassed",
"true"
);
}
}
}catch(error){
console.error(
"Academy centrale resultaatregistratie:",
error
);
}
}
/* Resultaat automatisch centraal bevestigen */
syncCentralResult();
})();