当前位置: 首页>>代码示例>>PHP>>正文


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怎么用?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.
开发者ID:Gavinthisisit,项目名称:Moodle,代码行数:31,代码来源:index.php


注:本文中的grade_helper::fetch_all_natural_weights_for_course方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。