當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。