Access The Last Opened Unit

This code will work in the following case:
1. If the user completed a unit.
2. Then Hit Back To Course Button
3. When again access the course, the user will fall on the last completed unit.
Paste this code in WPLMS Customizer Plugin

 if(!empty($course_curriculum) && count($course_curriculum)){
    $key = array_search($unit_id, $course_curriculum);
    if(!empty($key) && !empty($course_curriculum[$key-1])){
       $unit_id =$course_curriculum[$key-1];
 return $unit_id;

Was this article helpful?

Related Articles

Leave A Comment?