當前位置: 首頁>>代碼示例>>PHP>>正文


PHP workshop::count_potential_reviewers方法代碼示例

本文整理匯總了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;
     //---------------------------------------------------------
開發者ID:janaece,項目名稱:globalclassroom4_clean,代碼行數:67,代碼來源:locallib.php


注:本文中的workshop::count_potential_reviewers方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。