Proyectos de Subversion Moodle

Rev

Rev 1 | Mostrar el archivo completo | | | Autoría | Ultima modificación | Ver Log |

Rev 1 Rev 1441
Línea 258... Línea 258...
258
        }
258
        }
259
    }
259
    }
Línea 260... Línea 260...
260
 
260
 
261
    // Get record from sql_internal_table_reader and merge with records got from legacy log (if needed).
261
    // Get record from sql_internal_table_reader and merge with records got from legacy log (if needed).
-
 
262
    if (!$onlyuselegacyreader) {
-
 
263
        $anonymoussql = !has_capability('moodle/site:viewanonymousevents', $context) ? 'AND l.anonymous = 0' : '';
262
    if (!$onlyuselegacyreader) {
264
 
263
        $sql = "SELECT ra.userid, $usernamefields, u.idnumber, COUNT(DISTINCT l.timecreated) AS count
265
        $sql = "SELECT ra.userid, $usernamefields, u.idnumber, COUNT(DISTINCT l.timecreated) AS count
264
                  FROM {user} u
266
                  FROM {user} u
265
                  JOIN {role_assignments} ra ON u.id = ra.userid AND ra.contextid $relatedctxsql AND ra.roleid = :roleid
267
                  JOIN {role_assignments} ra ON u.id = ra.userid AND ra.contextid $relatedctxsql AND ra.roleid = :roleid
266
             $groupsql
268
             $groupsql
267
                  LEFT JOIN {" . $logtable . "} l
269
                  LEFT JOIN {" . $logtable . "} l
268
                     ON l.contextinstanceid = :instanceid
270
                     ON l.contextinstanceid = :instanceid
269
                       AND l.timecreated > :timefrom" . $crudsql ."
271
                       AND l.timecreated > :timefrom" . $crudsql ."
270
                       AND l.edulevel = :edulevel
272
                       AND l.edulevel = :edulevel
271
                       AND l.anonymous = 0
273
                       " . $anonymoussql . "
272
                       AND l.contextlevel = :contextlevel
274
                       AND l.contextlevel = :contextlevel
273
                       AND (l.origin = 'web' OR l.origin = 'ws')
275
                       AND (l.origin = 'web' OR l.origin = 'ws')
274
                       AND l.userid = ra.userid";
276
                       AND l.userid = ra.userid";
275
        // We add this after the WHERE statement that may come below.
277
        // We add this after the WHERE statement that may come below.
Línea 386... Línea 388...
386
        echo html_writer::select($displaylist, 'formaction', '', array('' => 'choosedots'), $withselectedparams);
388
        echo html_writer::select($displaylist, 'formaction', '', array('' => 'choosedots'), $withselectedparams);
387
        echo '</div>';
389
        echo '</div>';
388
        echo '</div>'."\n";
390
        echo '</div>'."\n";
389
        echo '</form>'."\n";
391
        echo '</form>'."\n";
Línea 390... Línea -...
390
 
-
 
391
        $options = new stdClass();
-
 
392
        $options->courseid = $course->id;
-
 
393
        $options->noteStateNames = note_get_state_names();
-
 
394
        $options->stateHelpIcon = $OUTPUT->help_icon('publishstate', 'notes');
392
 
395
        $PAGE->requires->js_call_amd('report_participation/participants', 'init', [$options]);
393
        $PAGE->requires->js_call_amd('report_participation/participants', 'init');
396
    }
394
    }
397
    echo '</div>'."\n";
395
    echo '</div>'."\n";
Línea 398... Línea 396...
398
}
396
}