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


PHP stdClass::get_aggregation_method方法代碼示例

本文整理匯總了PHP中stdClass::get_aggregation_method方法的典型用法代碼示例。如果您正苦於以下問題:PHP stdClass::get_aggregation_method方法的具體用法?PHP stdClass::get_aggregation_method怎麽用?PHP stdClass::get_aggregation_method使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在stdClass的用法示例。


在下文中一共展示了stdClass::get_aggregation_method方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: config_form_criteria

 /**
  * Add appropriate form elements to the criteria form
  *
  * @param stdClass $data details of overall criterion
  */
 public function config_form_criteria($data)
 {
     global $OUTPUT;
     $prefix = 'criteria-' . $this->id;
     if (count($data->criteria) > 2) {
         echo $OUTPUT->box_start();
         if (!empty($this->description)) {
             $badge = new badge($this->badgeid);
             echo $OUTPUT->box(format_text($this->description, $this->descriptionformat, array('context' => $badge->get_context())), 'criteria-description');
         }
         echo $OUTPUT->heading($this->get_title(), 2);
         $agg = $data->get_aggregation_methods();
         if (!$data->is_locked() && !$data->is_active()) {
             $editurl = new moodle_url('/badges/criteria_settings.php', array('badgeid' => $this->badgeid, 'edit' => true, 'type' => $this->criteriatype, 'crit' => $this->id));
             $editaction = $OUTPUT->action_icon($editurl, new pix_icon('t/edit', get_string('edit')), null, array('class' => 'criteria-action'));
             echo $OUTPUT->box($editaction, array('criteria-header'));
             $url = new moodle_url('criteria.php', array('id' => $data->id, 'sesskey' => sesskey()));
             echo $OUTPUT->single_select($url, 'update', $agg, $data->get_aggregation_method($this->criteriatype), null, null, array('aria-describedby' => 'overall'));
             echo html_writer::span(get_string('overallcrit', 'badges'), '', array('id' => 'overall'));
         } else {
             echo $OUTPUT->box(get_string('criteria_descr_' . $this->criteriatype, 'badges', core_text::strtoupper($agg[$data->get_aggregation_method()])), 'clearfix');
         }
         echo $OUTPUT->box_end();
     }
 }
開發者ID:evltuma,項目名稱:moodle,代碼行數:30,代碼來源:award_criteria_overall.php

示例2: config_form_criteria

 /**
  * Add appropriate form elements to the criteria form
  *
  * @param stdClass $data details of overall criterion
  */
 public function config_form_criteria($data)
 {
     global $OUTPUT;
     $prefix = 'criteria-' . $this->id;
     if (count($data->criteria) > 2) {
         echo $OUTPUT->box_start();
         echo $OUTPUT->heading($this->get_title(), 2);
         $agg = $data->get_aggregation_methods();
         if (!$data->is_locked() && !$data->is_active()) {
             $url = new moodle_url('criteria.php', array('id' => $data->id, 'sesskey' => sesskey()));
             $table = new html_table();
             $table->attributes = array('class' => 'clearfix');
             $table->colclasses = array('', 'activatebadge');
             $table->data[] = array($OUTPUT->single_select($url, 'update', $agg, $data->get_aggregation_method($this->criteriatype), null), get_string('overallcrit', 'badges'));
             echo html_writer::table($table);
         } else {
             echo $OUTPUT->box(get_string('criteria_descr_' . $this->criteriatype, 'badges', strtoupper($agg[$data->get_aggregation_method()])), 'clearfix');
         }
         echo $OUTPUT->box_end();
     }
 }
開發者ID:bobpuffer,項目名稱:moodleUCLA-LUTH,代碼行數:26,代碼來源:award_criteria_overall.php

示例3: config_form_criteria

 /**
  * Add appropriate criteria elements
  *
  * @param stdClass $data details of various criteria
  */
 public function config_form_criteria($data)
 {
     global $OUTPUT;
     $agg = $data->get_aggregation_methods();
     $editurl = new moodle_url('/badges/criteria_settings.php', array('badgeid' => $this->badgeid, 'edit' => true, 'type' => $this->criteriatype, 'crit' => $this->id));
     $deleteurl = new moodle_url('/badges/criteria_action.php', array('badgeid' => $this->badgeid, 'delete' => true, 'type' => $this->criteriatype));
     $editaction = $OUTPUT->action_icon($editurl, new pix_icon('t/edit', get_string('edit')), null, array('class' => 'criteria-action'));
     $deleteaction = $OUTPUT->action_icon($deleteurl, new pix_icon('t/delete', get_string('delete')), null, array('class' => 'criteria-action'));
     echo $OUTPUT->box_start();
     if (!$data->is_locked() && !$data->is_active()) {
         echo $OUTPUT->box($deleteaction . $editaction, array('criteria-header'));
     }
     echo $OUTPUT->heading($this->get_title() . $OUTPUT->help_icon('criteria_' . $this->criteriatype, 'badges'), 3, 'main help');
     if (!empty($this->description)) {
         $badge = new badge($this->badgeid);
         echo $OUTPUT->box(format_text($this->description, $this->descriptionformat, array('context' => $badge->get_context())), 'criteria-description');
     }
     if (!empty($this->params)) {
         if (count($this->params) > 1) {
             echo $OUTPUT->box(get_string('criteria_descr_' . $this->criteriatype, 'badges', core_text::strtoupper($agg[$data->get_aggregation_method($this->criteriatype)])), array('clearfix'));
         } else {
             echo $OUTPUT->box(get_string('criteria_descr_single_' . $this->criteriatype, 'badges'), array('clearfix'));
         }
         echo $OUTPUT->box($this->get_details(), array('clearfix'));
     }
     echo $OUTPUT->box_end();
 }
開發者ID:evltuma,項目名稱:moodle,代碼行數:32,代碼來源:award_criteria.php


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