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


PHP workshop::get_examples_for_reviewer方法代码示例

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


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

示例1: get_examples

 /**
  * Returns example submissions to be assessed by the owner of the planner
  *
  * This is here to cache the DB query because the same list is needed later in view.php
  *
  * @see workshop::get_examples_for_reviewer() for the format of returned value
  * @return array
  */
 public function get_examples() {
     if (is_null($this->examples)) {
         $this->examples = $this->workshop->get_examples_for_reviewer($this->userid);
     }
     return $this->examples;
 }
开发者ID:nuckey,项目名称:moodle,代码行数:14,代码来源:locallib.php

示例2: foreach

    // check this flag against the group membership yet
    if (groups_get_activity_groupmode($workshop->cm) == SEPARATEGROUPS) {
        // user must have accessallgroups or share at least one group with the submission author
        if (!has_capability('moodle/site:accessallgroups', $workshop->context)) {
            $usersgroups = groups_get_activity_allowed_groups($workshop->cm);
            $authorsgroups = groups_get_all_groups($workshop->course->id, $submission->authorid, $workshop->cm->groupingid, 'g.id');
            $sharedgroups = array_intersect_key($usersgroups, $authorsgroups);
            if (empty($sharedgroups)) {
                $canviewall = false;
            }
        }
    }
}
if ($editable and $workshop->useexamples and $workshop->examplesmode == workshop::EXAMPLES_BEFORE_SUBMISSION and !has_capability('mod/workshop:manageexamples', $workshop->context)) {
    // check that all required examples have been assessed by the user
    $examples = $workshop->get_examples_for_reviewer($USER->id);
    foreach ($examples as $exampleid => $example) {
        if (is_null($example->grade)) {
            $editable = false;
            break;
        }
    }
}
$edit = ($editable and $edit);
$seenaspublished = false;
// is the submission seen as a published submission?
if ($submission->id and ($ownsubmission or $canviewall or $isreviewer)) {
    // ok you can go
} elseif ($submission->id and $ispublished) {
    // ok you can go
    $seenaspublished = true;
开发者ID:alanaipe2015,项目名称:moodle,代码行数:31,代码来源:submission.php

示例3: foreach

}

// check that all required examples have been assessed by the user
if ($assessmenteditable and $workshop->useexamples and $workshop->examplesmode == workshop::EXAMPLES_BEFORE_ASSESSMENT
        and !has_capability('mod/workshop:manageexamples', $workshop->context)) {
    // the reviewer must have submitted their own submission
    $reviewersubmission = $workshop->get_submission_by_author($assessment->reviewerid);
    if (!$reviewersubmission) {
        // no money, no love
        $assessmenteditable = false;
        echo $output->header();
        echo $output->heading(get_string('exampleneedsubmission', 'workshop'), 2);
        echo $output->footer();
        exit;
    } else {
        $examples = $workshop->get_examples_for_reviewer($assessment->reviewerid);
        foreach ($examples as $exampleid => $example) {
            if (is_null($example->grade)) {
                $assessmenteditable = false;
                echo $output->header();
                echo $output->heading(get_string('exampleneedassessed', 'workshop'), 2);
                echo $output->footer();
                exit;
            }
        }
    }
}

// load the grading strategy logic
$strategy = $workshop->grading_strategy_instance();
开发者ID:nigeldaley,项目名称:moodle,代码行数:30,代码来源:assessment.php


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