Bugfix where the wrong levels were loaded in a levelset
This commit is contained in:
parent
a112367fad
commit
78cb3b2e5a
|
@ -38,12 +38,12 @@ class block_gradelevel_levelset {
|
|||
$this->data = $dataObject;
|
||||
}
|
||||
else {
|
||||
// database validity check sou
|
||||
// database validity check went south, retrieve again
|
||||
$this->data = $DB->get_record('block_gradelevel_levelset', array('id' => $this->id));
|
||||
}
|
||||
|
||||
//retrieve levels for this levelset
|
||||
$this->levels = $DB->get_records('block_gradelevel_levels', array('levelset_id' => $levelset_id));
|
||||
$this->levels = $DB->get_records('block_gradelevel_levels', array('levelset_id' => $this->id));
|
||||
|
||||
usort( $this->levels, function( $a, $b) {
|
||||
return ( $a->points < $b->points ) ? -1 : 1;
|
||||
|
|
Loading…
Reference in New Issue
Block a user