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


PHP grade_outcome::fetch_all方法代码示例

本文整理汇总了PHP中grade_outcome::fetch_all方法的典型用法代码示例。如果您正苦于以下问题:PHP grade_outcome::fetch_all方法的具体用法?PHP grade_outcome::fetch_all怎么用?PHP grade_outcome::fetch_all使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在grade_outcome的用法示例。


在下文中一共展示了grade_outcome::fetch_all方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: 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'));
    }
}
开发者ID:BackupTheBerlios,项目名称:samouk-svn,代码行数:31,代码来源:gradelib.php

示例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');
    }
}
开发者ID:saurabh947,项目名称:MoodleLearning,代码行数:40,代码来源:gradelib.php

示例3: test_grade_outcome_fetch_all

 function test_grade_outcome_fetch_all()
 {
     $grade_outcome = new grade_outcome();
     $this->assertTrue(method_exists($grade_outcome, 'fetch_all'));
     $grade_outcomes = grade_outcome::fetch_all(array());
     $this->assertEqual(count($this->grade_outcomes), count($grade_outcomes));
 }
开发者ID:vuchannguyen,项目名称:web,代码行数:7,代码来源:testgradeoutcome.php

示例4: fetch_all_local

 /**
  * Static function returning all local course outcomes
  * @static
  * @param int $courseid
  * @return object
  */
 function fetch_all_local($courseid)
 {
     if (!($outcomes = grade_outcome::fetch_all(array('courseid' => $courseid)))) {
         $outcomes = array();
     }
     return $outcomes;
 }
开发者ID:edwinphillips,项目名称:moodle-485cb39,代码行数:13,代码来源:grade_outcome.php

示例5: 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'));
    }
}
开发者ID:nuckey,项目名称:moodle,代码行数:42,代码来源:gradelib.php


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