mirror of
https://github.com/moodle/moodle.git
synced 2025-08-05 08:56:36 +02:00
minor refactoring in grade export lib
This commit is contained in:
parent
c901b7a652
commit
350770f466
1 changed files with 8 additions and 3 deletions
|
@ -69,7 +69,12 @@ class grade_export {
|
|||
$this->publish = $publish;
|
||||
$this->strgrades = get_string("grades");
|
||||
$this->strgrade = get_string("grade");
|
||||
$this->itemids = $itemids;
|
||||
if (is_array($itemids)) {
|
||||
$this->itemids = $itemids;
|
||||
} else {
|
||||
$this->itemids = array();
|
||||
}
|
||||
|
||||
|
||||
$strmax = get_string("maximumshort");
|
||||
|
||||
|
@ -117,9 +122,9 @@ class grade_export {
|
|||
}
|
||||
|
||||
// if grade_item ids are specified
|
||||
if ($itemids) {
|
||||
if (empty($this->itemids)) {
|
||||
$gradeitems = array();
|
||||
foreach ($itemids as $iid) {
|
||||
foreach ($this->itemids as $iid) {
|
||||
$gradeitems[] = grade_item::fetch(array('id'=>(int)$iid, 'courseid'=>$this->id));
|
||||
}
|
||||
} else {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue