forked from q2a/question2answer
-
Notifications
You must be signed in to change notification settings - Fork 1
Open
Description
When Exam taken results are available on the exam page, currently the exam data is embedded in the HTML. It'll be better if we only embed the resultid and then fetch the exam data on the button click like in the below code.
$('.results-btn').on('click', function () {
const examId = this.dataset.examId;
const resultId = this.dataset.resultId;
// Fetch heavy data via AJAX
fetch(`/exam/result.php?id=${resultId}`)
.then(r => r.json())
.then(data => {
console.log(data);
});
});
Metadata
Metadata
Assignees
Labels
No labels