Send a debug logs & Events to test the library (check console for results):
Abxr.LogDebug('User performed an action');
Abxr.Event('user_action', { action: 'button_click', source: 'demo' });
Test assessment start and complete events (check console for results):
Abxr.EventAssessmentStart('Math Quiz 101', { difficulty: 'intermediate' });
Abxr.EventObjectiveStart('Learn Fractions', { module: 'basic_math' });
Abxr.EventObjectiveComplete('Learn Fractions', '92', Abxr.EventStatus.Pass, { attempts: 2 });
Abxr.EventAssessmentComplete('Math Quiz 101', 85, Abxr.EventStatus.Pass, { questions_answered: 10 });
This is how simple it is to use the library:
<script src="node_modules/abxrlib-for-webxr/Abxr.js"></script>
<script>
Abxr_init('your-app-id', 'your-org-id', 'your-auth-secret');
</script>
<script>
Abxr_init('your-app-id');
</script>
Abxr.Event('user_action', { action: 'button_click' });
Abxr.LogDebug('User clicked button');
Abxr.EventAssessmentStart('Math Quiz 101', { difficulty: 'intermediate' });
Abxr.EventAssessmentComplete('Math Quiz 101', 85, Abxr.EventStatus.Pass, { questions_answered: 10 });
Abxr.EventObjectiveStart('Learn Fractions', { module: 'basic_math' });
Abxr.EventObjectiveComplete('Learn Fractions', '92', Abxr.EventStatus.Pass, { attempts: 2 });
Abxr.SetDebugMode(true);