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


PHP stdClass::is_locked方法代码示例

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


在下文中一共展示了stdClass::is_locked方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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 moodleform $mform  Moodle forms object
  * @param stdClass $data details of various modules
  */
 public function config_form_criteria($data)
 {
     global $OUTPUT;
     $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->params)) {
         echo $OUTPUT->box(get_string('criteria_descr_' . $this->criteriatype, 'badges') . $this->get_details(), array('clearfix'));
     }
     echo $OUTPUT->box_end();
 }
开发者ID:bobpuffer,项目名称:moodleUCLA-LUTH,代码行数:23,代码来源:award_criteria_course.php

示例3: 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

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