mirror of
https://github.com/moodle/moodle.git
synced 2025-04-19 07:25:30 +02:00
Merge branch 'master_MDL-31942' of git://github.com/danmarsden/moodle
This commit is contained in:
commit
42c8e4d66d
@ -587,29 +587,6 @@ function choice_delete_instance($id) {
|
||||
return $result;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the users with data in one choice
|
||||
* (users with records in choice_responses, students)
|
||||
*
|
||||
* @todo: deprecated - to be deleted in 2.2
|
||||
*
|
||||
* @param int $choiceid
|
||||
* @return array
|
||||
*/
|
||||
function choice_get_participants($choiceid) {
|
||||
global $DB;
|
||||
|
||||
//Get students
|
||||
$students = $DB->get_records_sql("SELECT DISTINCT u.id, u.id
|
||||
FROM {user} u,
|
||||
{choice_answers} a
|
||||
WHERE a.choiceid = ? AND
|
||||
u.id = a.userid", array($choiceid));
|
||||
|
||||
//Return students array (it contains an array of unique users)
|
||||
return ($students);
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns text string which is the answer that matches the id
|
||||
*
|
||||
|
Loading…
x
Reference in New Issue
Block a user