Proyectos de Subversion Moodle

Rev

Rev 1 | Mostrar el archivo completo | | | Autoría | Ultima modificación | Ver Log |

Rev 1 Rev 1441
Línea 12... Línea 12...
12
// GNU General Public License for more details.
12
// GNU General Public License for more details.
13
//
13
//
14
// You should have received a copy of the GNU General Public License
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/>.
15
// along with Moodle.  If not, see <http://www.gnu.org/licenses/>.
Línea 16... Línea -...
16
 
-
 
17
/**
-
 
18
 * Contains class core_tag\output\tag
-
 
19
 *
-
 
20
 * @package   core_tag
-
 
21
 * @copyright 2015 Marina Glancy
-
 
22
 * @license   http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
-
 
23
 */
-
 
24
 
16
 
Línea 25... Línea 17...
25
namespace core_tag\output;
17
namespace core_tag\output;
26
 
18
 
27
use renderable;
19
use renderable;
28
use templatable;
20
use templatable;
29
use renderer_base;
-
 
30
use stdClass;
21
use renderer_base;
Línea 31... Línea 22...
31
use moodle_url;
22
use stdClass;
32
use core_tag_tag;
23
use core_tag_tag;
33
 
24
 
Línea 77... Línea 68...
77
        $r = new stdClass();
68
        $r = new stdClass();
78
        $r->id = (int)$this->record->id;
69
        $r->id = (int)$this->record->id;
79
        $r->tagcollid = clean_param($this->record->tagcollid, PARAM_INT);
70
        $r->tagcollid = clean_param($this->record->tagcollid, PARAM_INT);
80
        $r->rawname = clean_param($this->record->rawname, PARAM_TAG);
71
        $r->rawname = clean_param($this->record->rawname, PARAM_TAG);
81
        $r->name = clean_param($this->record->name, PARAM_TAG);
72
        $r->name = clean_param($this->record->name, PARAM_TAG);
-
 
73
        [$r->description, $r->descriptionformat] = \core_external\util::format_text(
82
        $format = clean_param($this->record->descriptionformat, PARAM_INT);
74
            $this->record->description,
83
        list($r->description, $r->descriptionformat) = \core_external\util::format_text($this->record->description,
75
            $this->record->descriptionformat,
84
            $format, \context_system::instance(), 'core', 'tag', $r->id);
76
            \context_system::instance(),
-
 
77
            'tag',
-
 
78
            'description',
-
 
79
            $r->id,
-
 
80
        );
-
 
81
 
85
        $r->flag = clean_param($this->record->flag, PARAM_INT);
82
        $r->flag = clean_param($this->record->flag, PARAM_INT);
86
        if (isset($this->record->isstandard)) {
83
        if (isset($this->record->isstandard)) {
87
            $r->isstandard = clean_param($this->record->isstandard, PARAM_INT) ? 1 : 0;
84
            $r->isstandard = clean_param($this->record->isstandard, PARAM_INT) ? 1 : 0;
88
        }
85
        }
89
        $r->official = $r->isstandard; // For backwards compatibility.
86
        $r->official = $r->isstandard; // For backwards compatibility.