Skip to content

Commit

Permalink
MDL-16913 Enabled Weight and Extra credit inputs for grade items, but…
Browse files Browse the repository at this point in the history
… not for category items
  • Loading branch information
nicolasconnault committed Feb 27, 2009
1 parent 08ec7ec commit b8436cc
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions grade/edit/tree/lib.php
Expand Up @@ -590,11 +590,10 @@ public function get_item_cell($item, $params) {
throw new Exception('Array key (element) missing from 2nd param of grade_edit_tree_column_weightorextracredit::get_item_cell($item, $params)');
}

$aggcoef_input = grade_edit_tree::get_weight_input($item);
$html = '<td class="cell">';

if ($params['element']['type'] == 'categoryitem' || $params['element']['type'] == 'courseitem') {
$html .= $aggcoef_input;
if (!in_array($params['element']['object']->itemtype, array('courseitem', 'categoryitem', 'category'))) {
$html .= grade_edit_tree::get_weight_input($item);
}

return $html.'</td>';
Expand Down

0 comments on commit b8436cc

Please sign in to comment.