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;
|
$this->data = $dataObject;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
// database validity check sou
|
// database validity check went south, retrieve again
|
||||||
$this->data = $DB->get_record('block_gradelevel_levelset', array('id' => $this->id));
|
$this->data = $DB->get_record('block_gradelevel_levelset', array('id' => $this->id));
|
||||||
}
|
}
|
||||||
|
|
||||||
//retrieve levels for this levelset
|
//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) {
|
usort( $this->levels, function( $a, $b) {
|
||||||
return ( $a->points < $b->points ) ? -1 : 1;
|
return ( $a->points < $b->points ) ? -1 : 1;
|
||||||
|
|
Loading…
Reference in New Issue
Block a user