本文整理汇总了PHP中workshop::count_potential_reviewers方法的典型用法代码示例。如果您正苦于以下问题:PHP workshop::count_potential_reviewers方法的具体用法?PHP workshop::count_potential_reviewers怎么用?PHP workshop::count_potential_reviewers使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类workshop
的用法示例。
在下文中一共展示了workshop::count_potential_reviewers方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: __construct
//.........这里部分代码省略.........
$task->completed = 'info';
$phase->tasks['assessmentenddatetime'] = $task;
}
if (isset($phase->tasks['assessmentstartdatetime']) or isset($phase->tasks['assessmentenddatetime'])) {
if (has_capability('mod/workshop:ignoredeadlines', $workshop->context, $userid)) {
$task = new stdclass();
$task->title = get_string('deadlinesignored', 'workshop');
$task->completed = 'info';
$phase->tasks['deadlinesignored'] = $task;
}
}
$this->phases[workshop::PHASE_ASSESSMENT] = $phase;
//---------------------------------------------------------
// setup | submission | assessment | * EVALUATION | closed
//---------------------------------------------------------
$phase = new stdclass();
$phase->title = get_string('phaseevaluation', 'workshop');
$phase->tasks = array();
if (has_capability('mod/workshop:overridegrades', $workshop->context)) {
$expected = $workshop->count_potential_authors(false);
$calculated = $DB->count_records_select('workshop_submissions', 'workshopid = ? AND (grade IS NOT NULL OR gradeover IS NOT NULL)', array($workshop->id));
$task = new stdclass();
$task->title = get_string('calculatesubmissiongrades', 'workshop');
$a = new stdclass();
$a->expected = $expected;
$a->calculated = $calculated;
$task->details = get_string('calculatesubmissiongradesdetails', 'workshop', $a);
if ($calculated >= $expected) {
$task->completed = true;
} elseif ($workshop->phase > workshop::PHASE_EVALUATION) {
$task->completed = false;
}
$phase->tasks['calculatesubmissiongrade'] = $task;
$expected = $workshop->count_potential_reviewers(false);
$calculated = $DB->count_records_select('workshop_aggregations', 'workshopid = ? AND gradinggrade IS NOT NULL', array($workshop->id));
$task = new stdclass();
$task->title = get_string('calculategradinggrades', 'workshop');
$a = new stdclass();
$a->expected = $expected;
$a->calculated = $calculated;
$task->details = get_string('calculategradinggradesdetails', 'workshop', $a);
if ($calculated >= $expected) {
$task->completed = true;
} elseif ($workshop->phase > workshop::PHASE_EVALUATION) {
$task->completed = false;
}
$phase->tasks['calculategradinggrade'] = $task;
} elseif ($workshop->phase == workshop::PHASE_EVALUATION) {
$task = new stdclass();
$task->title = get_string('evaluategradeswait', 'workshop');
$task->completed = 'info';
$phase->tasks['evaluateinfo'] = $task;
}
if (has_capability('moodle/course:manageactivities', $workshop->context, $userid)) {
$task = new stdclass();
$task->title = get_string('taskconclusion', 'workshop');
$task->link = $workshop->updatemod_url();
if (trim($workshop->conclusion)) {
$task->completed = true;
} elseif ($workshop->phase >= workshop::PHASE_EVALUATION) {
$task->completed = false;
}
$phase->tasks['conclusion'] = $task;
}
$this->phases[workshop::PHASE_EVALUATION] = $phase;
//---------------------------------------------------------