$elements = array();
foreach ($data as $key => $value) {
- if (preg_match('/select_(i[0-9]*)/', $key, $matches)) {
+ if (preg_match('/select_(ig[0-9]*)/', $key, $matches)) {
$elements[] = $matches[1];
}
}
* @return string eid
*/
public function get_item_eid($grade_item) {
- return 'i'.$grade_item->id;
+ return 'ig'.$grade_item->id;
}
/**
$userid = $matches[2];
//extra security check - the grade item must be in this tree
- if (!$item_el = $this->locate_element('i'.$itemid)) {
+ if (!$item_el = $this->locate_element('ig'.$itemid)) {
return null;
}
return null;
}
//extra security check - the grade item must be in this tree
- if (!$item_el = $this->locate_element('i'.$grade->itemid)) {
+ if (!$item_el = $this->locate_element('ig'.$grade->itemid)) {
return null;
}
$grade->grade_item =& $item_el['object']; // this may speedup grade_grade methods!
// prepare unique identifier
if ($element['type'] == 'category') {
- $element['eid'] = 'c'.$element['object']->id;
+ $element['eid'] = 'cg'.$element['object']->id;
} else if (in_array($element['type'], array('item', 'courseitem', 'categoryitem'))) {
- $element['eid'] = 'i'.$element['object']->id;
+ $element['eid'] = 'ig'.$element['object']->id;
$this->items[$element['object']->id] =& $element['object'];
}
$userid = $matches[2];
//extra security check - the grade item must be in this tree
- if (!$item_el = $this->locate_element('i'.$itemid)) {
+ if (!$item_el = $this->locate_element('ig'.$itemid)) {
return null;
}
return null;
}
//extra security check - the grade item must be in this tree
- if (!$item_el = $this->locate_element('i'.$grade->itemid)) {
+ if (!$item_el = $this->locate_element('ig'.$grade->itemid)) {
return null;
}
$grade->grade_item =& $item_el['object']; // this may speedup grade_grade methods!