本文整理汇总了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.