foreach ($cours as $cou) { if($coun++==0) $courid=$cou->id; $html .= html_writer::start_tag('option', array('value' => $cou->id)); $html .= $cou->fullname; $html .= html_writer::end_tag('option'); } $html .= html_writer::end_tag('select'); echo $html; echo "</div>"; echo "<div id='notify'></div>"; echo "<div style='float:right;margin-top:5px;display:inline-block;'><input id='wsearch' placeholder='Search' type='text'></div>"; echo "<div id='wcontainer' style='display:inline;height:200px;margin-top: 15px;'>"; echo getWatchlistByCourse($courid); echo "</div>"; echo "<p class='tabres' id='resu'></p> <div id='btmexpo'><p id='expo' class='sortdiv'>Export As <select style='width: 100px !important;'> <option value='pdf'>PDF</option> <!-- <option value='csv'>CSV</option> <option value='xls'>XLS</option>--> </select> <img style='cursor:pointer;padding-left:5px;' id='wpdf' src='$CFG->wwwroot/pix/a/download_all.png'/></p></div>"; echo html_writer::tag('input', '', array('type' => 'button', 'name' => 'Remove from Watchlist','id'=>'rmv', 'class' => 'bt', 'value' => 'Remove from Watchlist')); echo "<input type='hidden' name='wcourse' id='wcourse' value=".$courid."/></div>"; echo html_writer::end_tag('form');
} return $arr; } //--------------------------------------------------------------------------------------// // Get all courses along with sections and labs $coursid= optional_param('courseid', -1, PARAM_INT); // getting course id if($coursid !=-1) { echo getWatchlistByCourse($coursid); // to get list of watchlisted people of a course } // Get all courses along with sections and labs $courid= optional_param('courid', -1, PARAM_INT); // getting course id if($courid !=-1) { echo getWatchlistByCoursePdf($courid); // to get list of watchlisted people of a course