$section=optional_param('stusec', 'All',PARAM_TEXT);//retrieve secname $am_type_name=optional_param('mname', 'x',PARAM_TEXT); //retriving sections and activities based on course //print_r($aid); //print_r($am_type_name); switch($mid){ case 1: section_activities($secid,$cid);break; case 2: set_activity_status($aid);break; case 3: set_activity_completiondate($aid);break; case 4: get_activity_status();break; case 5: get_student_sections($cid);break; case 6: add_student_to_watchlist($cid,$uid);break; case 7: get_loggedin_users_by_section($section);break; case 8: get_user_quiz_grade($aid,$uid);break; case 9: get_user_quiz_instance($aid);break; case 10: get_itemid_from_grade_table($aid,$am_type_name,$cid);break; case 11: get_course_absenties($cid); case 12: set_course_absenties($cid,$aid); case 13: getCntofAbsentActivities($sid,$cid); case 14:getStudentAttandanceofActivity($sid,$aid,$cid); } function section_activities($secid,$cid){ $course=get_course($cid); $modinfo = get_fast_modinfo($course); $mods = $modinfo->get_cms(); $sections = $modinfo->get_section_info_all(); $sec_array = get_sections($sections); $arr = array();
$display_flag=1; } else{ $display_flag=0; } } //code to check whether the student is watchlisted or not $watchliststatus=getStatus($student->id,$cid); if($watchliststatus){ $watchlist_icon='eye-24-512.png'; } else{ $watchlist_icon='unwatch-512.png'; } $result=get_user_quiz_grade($qid,$student->id); if($display_flag){ if($DB->get_field('userinfo_tsl', 'loginstatus', array('userid' => $student->id))) { $loggedinstudents++; if ($result['grade'] == '--') { $statusImag = 'flag-red-icon.png';$statusNum=0; echo '<tr> <td><span style="display:none">'.$statusNum.'</span> <img src="' . $CFG->wwwroot . '/teacher/testcenter/images/' . $statusImag . '" width=" 16px" /></td> <td><a target="_blank" href=" ' . $CFG->wwwroot . '/teacher/student_profile.php?sid=' . $student->id . '">' . $rollnumber . '</a></td> <td><a target="_blank" href=" ' . $CFG->wwwroot . '/teacher/student_profile.php?sid=' . $student->id . '">' . $student->firstname . ' ' . $student->lastname . '</a></td> <td style="text-align:center">' . $result['grade'] . '</td>