Search moodle.org's
Developer Documentation

See Release Notes

  • Bug fixes for general core bugs in 4.0.x will end 8 May 2023 (12 months).
  • Bug fixes for security issues in 4.0.x will end 13 November 2023 (18 months).
  • PHP version: minimum PHP 7.3.0 Note: the minimum PHP version has increased since Moodle 3.10. PHP 7.4.x is also supported.
   1  <?php
   2  // This file is part of Moodle - http://moodle.org/
   3  //
   4  // Moodle is free software: you can redistribute it and/or modify
   5  // it under the terms of the GNU General Public License as published by
   6  // the Free Software Foundation, either version 3 of the License, or
   7  // (at your option) any later version.
   8  //
   9  // Moodle is distributed in the hope that it will be useful,
  10  // but WITHOUT ANY WARRANTY; without even the implied warranty of
  11  // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  12  // GNU General Public License for more details.
  13  //
  14  // You should have received a copy of the GNU General Public License
  15  // along with Moodle.  If not, see <http://www.gnu.org/licenses/>.
  16  namespace mod_bigbluebuttonbn\output;
  17  
  18  use mod_bigbluebuttonbn\instance;
  19  use mod_bigbluebuttonbn\recording;
  20  
  21  /**
  22   * Renderer for recording name in place editable.
  23   *
  24   * @package   mod_bigbluebuttonbn
  25   * @copyright 2010 onwards, Blindside Networks Inc
  26   * @license   http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
  27   * @author    Laurent David  (laurent.david [at] call-learning [dt] fr)
  28   */
  29  class recording_description_editable extends recording_editable {
  30  
  31      /**
  32       * Specific constructor with the right label/hint for this editable
  33       *
  34       * @param recording $rec
  35       * @param instance $instance
  36       */
  37      public function __construct(recording $rec, instance $instance) {
  38          parent::__construct($rec, $instance,
  39              get_string('view_recording_description_editlabel', 'mod_bigbluebuttonbn'),
  40              get_string('view_recording_description_edithint', 'mod_bigbluebuttonbn'));
  41      }
  42  
  43      /**
  44       * Get the value to display
  45       *
  46       * @param recording $recording a recording
  47       * @return string
  48       */
  49      public function get_recording_value(recording $recording): string {
  50          $metadescription = $recording->get('description');
  51          return \html_writer::span($metadescription);
  52      }
  53  
  54      /**
  55       *  Get the type of editable
  56       */
  57      protected static function get_type() {
  58          return 'description';
  59      }
  60  }