Skip to content

Commit

Permalink
Merge branch 'MDL-35687' of git://github.com/netspotau/moodle-mod_assign
Browse files Browse the repository at this point in the history
  • Loading branch information
danpoltawski committed Oct 2, 2012
2 parents 813a772 + 70e8537 commit 001d5a0
Showing 1 changed file with 0 additions and 26 deletions.
26 changes: 0 additions & 26 deletions mod/assign/locallib.php
Expand Up @@ -1162,32 +1162,6 @@ private function get_userid_for_row($num, $last) {
return $userid;
}

/**
* Return all assignment submissions by ENROLLED students (even empty)
*
* @param string $sort optional field names for the ORDER BY in the sql query
* @param string $dir optional specifying the sort direction, defaults to DESC
* @return array The submission objects indexed by id
*/
private function get_all_submissions( $sort="", $dir="DESC") {
global $CFG, $DB;

if ($sort == "lastname" or $sort == "firstname") {
$sort = "u.$sort $dir";
} else if (empty($sort)) {
$sort = "a.timemodified DESC";
} else {
$sort = "a.$sort $dir";
}

return $DB->get_records_sql("SELECT a.*
FROM {assign_submission} a, {user} u
WHERE u.id = a.userid
AND a.assignment = ?
ORDER BY $sort", array($this->get_instance()->id));

}

/**
* Generate zip file from array of given files
*
Expand Down

0 comments on commit 001d5a0

Please sign in to comment.