本文整理汇总了PHP中grade_scale::fetch_all方法的典型用法代码示例。如果您正苦于以下问题:PHP grade_scale::fetch_all方法的具体用法?PHP grade_scale::fetch_all怎么用?PHP grade_scale::fetch_all使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类grade_scale
的用法示例。
在下文中一共展示了grade_scale::fetch_all方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: fetch_all_local
/**
* Static function returning all local course scales
* @return object
*/
function fetch_all_local($courseid)
{
return grade_scale::fetch_all(array('courseid' => $courseid));
}
示例2: remove_course_grades
/**
* Remove all grade related course data
* Grade history is kept
*
* @param int $courseid The course ID
* @param bool $showfeedback If true success notifications will be displayed
*/
function remove_course_grades($courseid, $showfeedback)
{
global $DB, $OUTPUT;
$fs = get_file_storage();
$strdeleted = get_string('deleted');
$course_category = grade_category::fetch_course_category($courseid);
$course_category->delete('coursedelete');
$fs->delete_area_files(get_context_instance(CONTEXT_COURSE, $courseid)->id, 'grade', 'feedback');
if ($showfeedback) {
echo $OUTPUT->notification($strdeleted . ' - ' . get_string('grades', 'grades') . ', ' . get_string('items', 'grades') . ', ' . get_string('categories', 'grades'), 'notifysuccess');
}
if ($outcomes = grade_outcome::fetch_all(array('courseid' => $courseid))) {
foreach ($outcomes as $outcome) {
$outcome->delete('coursedelete');
}
}
$DB->delete_records('grade_outcomes_courses', array('courseid' => $courseid));
if ($showfeedback) {
echo $OUTPUT->notification($strdeleted . ' - ' . get_string('outcomes', 'grades'), 'notifysuccess');
}
if ($scales = grade_scale::fetch_all(array('courseid' => $courseid))) {
foreach ($scales as $scale) {
$scale->delete('coursedelete');
}
}
if ($showfeedback) {
echo $OUTPUT->notification($strdeleted . ' - ' . get_string('scales'), 'notifysuccess');
}
$DB->delete_records('grade_settings', array('courseid' => $courseid));
if ($showfeedback) {
echo $OUTPUT->notification($strdeleted . ' - ' . get_string('settings', 'grades'), 'notifysuccess');
}
}
示例3: remove_course_grades
/**
* Remove all grade related course data - history is kept
* @param int $courseid
* @param bool @showfeedback print feedback
*/
function remove_course_grades($courseid, $showfeedback)
{
$strdeleted = get_string('deleted');
$course_category = grade_category::fetch_course_category($courseid);
$course_category->delete('coursedelete');
if ($showfeedback) {
notify($strdeleted . ' - ' . get_string('grades', 'grades') . ', ' . get_string('items', 'grades') . ', ' . get_string('categories', 'grades'));
}
if ($outcomes = grade_outcome::fetch_all(array('courseid' => $courseid))) {
foreach ($outcomes as $outcome) {
$outcome->delete('coursedelete');
}
}
delete_records('grade_outcomes_courses', 'courseid', $courseid);
if ($showfeedback) {
notify($strdeleted . ' - ' . get_string('outcomes', 'grades'));
}
if ($scales = grade_scale::fetch_all(array('courseid' => $courseid))) {
foreach ($scales as $scale) {
$scale->delete('coursedelete');
}
}
if ($showfeedback) {
notify($strdeleted . ' - ' . get_string('scales'));
}
}
示例4: remove_course_grades
/**
* Remove all grade related course data - history is kept
*
* @global object
* @param int $courseid
* @param bool $showfeedback print feedback
*/
function remove_course_grades($courseid, $showfeedback) {
global $DB, $OUTPUT;
$strdeleted = get_string('deleted');
$course_category = grade_category::fetch_course_category($courseid);
$course_category->delete('coursedelete');
if ($showfeedback) {
echo $OUTPUT->notification($strdeleted.' - '.get_string('grades', 'grades').', '.get_string('items', 'grades').', '.get_string('categories', 'grades'));
}
if ($outcomes = grade_outcome::fetch_all(array('courseid'=>$courseid))) {
foreach ($outcomes as $outcome) {
$outcome->delete('coursedelete');
}
}
$DB->delete_records('grade_outcomes_courses', array('courseid'=>$courseid));
if ($showfeedback) {
echo $OUTPUT->notification($strdeleted.' - '.get_string('outcomes', 'grades'));
}
if ($scales = grade_scale::fetch_all(array('courseid'=>$courseid))) {
foreach ($scales as $scale) {
$scale->delete('coursedelete');
}
}
if ($showfeedback) {
echo $OUTPUT->notification($strdeleted.' - '.get_string('scales'));
}
$DB->delete_records('grade_settings', array('courseid'=>$courseid));
if ($showfeedback) {
echo $OUTPUT->notification($strdeleted.' - '.get_string('settings', 'grades'));
}
}