EzerIT / BibleOL

Web-based instruction in Biblical Hebrew and Greek
Other
26 stars 16 forks source link

Select All Function for Quizzes (Exercises) #14

Closed tmccormack165 closed 9 months ago

tmccormack165 commented 11 months ago

The purpose of this objective is to add a button that selects all of the quizzes (exercises) owned by a teacher. There is already an 'Unselect All' button, but there is no 'Select All' button.

To view the quizzes panel:

1. Log onto Bible Online Learner as a adminstrator
2. Go to Administration >> Manage Exercises

These steps will take you to this page:

Screenshot 2023-10-03 at 10 04 27 PM

In the top left corner of the exercises table you will see an Unselect All button, but no Select All button, the objective of this task is to add a functional Select All button.

tmccormack165 commented 9 months ago

Check All Button:

Screenshot 2023-11-12 at 7 05 12 PM
tmccormack165 commented 9 months ago

This issue has been solved by adding an almost identical checkAll() function to the uncheckAll() function.

function uncheckAll() {
      $('input[name="file[]"]:checked').prop('checked',false);
    }

function checkAll() {
      $('input[name="file[]"]:not(:checked)').prop('checked',true);
    }

The issue is closed with this commit: f3aae78db292defde335e706889117d2f814a22e