$vpl = new mod_vpl($id); $vpl->prepare_page('views/submissionslist.php',array('id' => $id)); $course = $vpl->get_course(); $cm = $vpl->get_course_module(); $context_module = $vpl->get_context(); //get students $currentgroup = groups_get_activity_group($cm, true); if(!$currentgroup){ $currentgroup=''; } $list = $vpl->get_students($currentgroup); // var_dump (count($list)); $submissions = $vpl->all_last_user_submission(); $submissions_number = $vpl->get_submissions_number(); //Get all information $all_data = array(); $subCount=0; $gradeCount=0; $section_flag=0; $studentCount=0; $statusNum=0; foreach ($list as $userinfo) { if($vpl->is_group_activity() && $userinfo->id != $vpl->get_group_leaderid($userinfo->id)){ continue; } $submission = null; if(!isset($submissions[$userinfo->id])){ /*if($subselection != 'all'){