本文整理匯總了PHP中grade_helper::fetch_all_natural_weights_for_course方法的典型用法代碼示例。如果您正苦於以下問題:PHP grade_helper::fetch_all_natural_weights_for_course方法的具體用法?PHP grade_helper::fetch_all_natural_weights_for_course怎麽用?PHP grade_helper::fetch_all_natural_weights_for_course使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類grade_helper
的用法示例。
在下文中一共展示了grade_helper::fetch_all_natural_weights_for_course方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: elseif
$grade_item->update();
$recreatetree = true;
// Grade item checkbox inputs.
} elseif (preg_match('/^(weightoverride)_([0-9]+)$/', $key, $matches)) {
$param = $matches[1];
$aid = $matches[2];
$value = clean_param($value, PARAM_BOOL);
$grade_item = grade_item::fetch(array('id' => $aid, 'courseid' => $courseid));
$grade_item->{$param} = $value;
$grade_item->update();
$recreatetree = true;
}
}
$originalweights = grade_helper::fetch_all_natural_weights_for_course($courseid);
grade_regrade_final_grades($courseid);
$alteredweights = grade_helper::fetch_all_natural_weights_for_course($courseid);
if (array_diff($originalweights, $alteredweights)) {
$normalisationmessage = get_string('weightsadjusted', 'grades');
}
}
print_grade_page_head($courseid, 'settings', 'setup', get_string('categoriesanditems', 'grades'));
// Print Table of categories and items
echo $OUTPUT->box_start('gradetreebox generalbox');
echo '<form id="gradetreeform" method="post" action="' . $returnurl . '">';
echo '<div>';
echo '<input type="hidden" name="sesskey" value="' . sesskey() . '" />';
//did we update something in the db and thus invalidate $grade_edit_tree?
if ($recreatetree) {
$grade_edit_tree = new grade_edit_tree($gtree, $movingeid, $gpr);
}
// Check to see if we have a normalisation message to send.