I think the PowerPac function
getPageNameList() is just what you need. This function analyzes the pages of your book and returns a list of qualifying pages based on the parameters you set.
Setup Example:pgRange = "all"
Next parameter defines which pages to analyze. If you only require that your student visit certain pages, then use a filter to analyze only those pages. For example if the required pages all have the a pattern to their page names like "Critical 1", "Critical 2", "Critical 3" and so on ...
filter = "Critical "
... or use a regular expression like
"/^Critical \d+/" which analyzes all pages whose page names begin with
"Critical" are followed by a space and then any number of integers.
scope = "visited"
excludeCurrentPg = "" (leave blank for default)
listSeparator = "," (or choose a separator that is not contained in any page names if a comma causes a conflict)
sort = (leave blank for default)
resultFieldName = (leave blank for no hyperlinking; default)
... store return value in a variable like
pageListThe result will be a comma-separated list of pages that have been
visited in the
pgRange and
filter.
Now we need to count the number of pages returned by spitting
pageList to an array and storing the count. We do this with
pgSplitToArray():

- Split to array parameters
- Image 1.png (10 KiB) Viewed 912 times
The variable
pageList now is an array where each index is one of the visited pages AND index [0] is the count of pages returned.
To access the count you would use
pageList [ 0 ] in the actions editor.
Finally, you need to call this routine in a location where the LMS has already restored the previous session so it can be read back in by these functions. I would recommend trying to call it
on load page for the background as this is one of the last events processed when the first page of the book loads.
Here is how simple this might look:

- Actions for on load page for background
- Image 2.png (3.04 KiB) Viewed 912 times
getPageNameList() is a powerful function for evaluating user interaction with a range of pages in a book. Using it to setup a progress bar is just one of its many uses.
Have fun!