protected function course_students_query_filter($prefix = false) {
        global $DB;

        if ($prefix) {
            $prefix = $prefix . '.';
        }

        // Check the amount of student logs in the 4 previous weeks.
        list($studentssql, $studentsparams) = $DB->get_in_or_equal($this->get_students(), SQL_PARAMS_NAMED);
        $filterselect = $prefix . 'courseid = :courseid AND ' . $prefix . 'userid ' . $studentssql;
        $filterparams = array('courseid' => $this->course->id) + $studentsparams;

        return array($filterselect, $filterparams);
    }
protected function course_students_query_filter($prefix = false) {
        global $DB;

        if ($prefix) {
            $prefix = $prefix . '.';
        }

        // Check the amount of student logs in the 4 previous weeks.
        list($studentssql, $studentsparams) = $DB->get_in_or_equal($this->get_students(), SQL_PARAMS_NAMED);
        $filterselect = $prefix . 'courseid = :courseid AND ' . $prefix . 'userid ' . $studentssql;
        $filterparams = array('courseid' => $this->course->id) + $studentsparams;

        return array($filterselect, $filterparams);
    }
protected function course_students_query_filter ( $ prefix = false ) { global $ DB ; if ( $ prefix ) { $ prefix = $ prefix . '.' ; } // Check the amount of student logs in the 4 previous weeks. list ( $ studentssql , $ studentsparams ) = $ DB -> get_in_or_equal ( $ this -> get_students ( ) , SQL_PARAMS_NAMED ) ; $ filterselect = $ prefix . 'courseid = :courseid AND ' . $ prefix . 'userid ' . $ studentssql ; $ filterparams = array ( 'courseid' => $ this -> course -> id ) + $ studentsparams ; return array ( $ filterselect , $ filterparams ) ; }
Returns the query and params used to filter the logstore by this course students.

@param string $prefix
@return array
Returns the query and params used to filter the logstore by this course students .