$sql = 'SELECT * FROM '.$tbl_stats.' WHERE exe_exo_id = '.(int)$this->get_ref_id().' AND orig_lp_id = 0 AND orig_lp_item_id = 0';
//the following query should be similar (in conditions) to the one used in exercice/exercice.php, look for note-query-exe-results marker
$sql = 'SELECT * FROM '.$tbl_stats.' WHERE exe_exo_id = '.(int)$this->get_ref_id().' AND orig_lp_id = 0 AND orig_lp_item_id = 0 AND status <>\'incomplete\'';
@ -123,10 +126,13 @@ class GradebookTable extends SortableTable
$weight_total_links = 0;
foreach ($data_array as $data) {
// list of items inside the gradebook (exercises, lps, fora, etc)
$row = array ();
$item = $data[0];
$id = $item->get_id();
if (empty($_GET['selectcat']) ) {
//the following condition seems strange to me - YW 20110421
//GET['selectcat'] is the main gradebook. When defined, it means we are looking at the whole stuff instead of one sub-element (or something like that?)
if (empty($_GET['selectcat']) ) { //if not particular gradebook item was selected, take the certificate score for the current item