mirror of
https://github.com/moodle/moodle.git
synced 2025-04-21 00:12:56 +02:00
Merge branch 'MDL-79604-master' of https://github.com/srobotta/moodle
This commit is contained in:
commit
b74b80ade1
@ -53,18 +53,16 @@ class data_field_checkbox extends data_field_base {
|
||||
}
|
||||
|
||||
function display_add_field($recordid = 0, $formdata = null) {
|
||||
global $CFG, $DB, $OUTPUT;
|
||||
|
||||
$content = array();
|
||||
global $DB, $OUTPUT;
|
||||
|
||||
if ($formdata) {
|
||||
$fieldname = 'field_' . $this->field->id;
|
||||
$content = $formdata->$fieldname;
|
||||
$content = $formdata->$fieldname ?? [];
|
||||
} else if ($recordid) {
|
||||
$content = $DB->get_field('data_content', 'content', array('fieldid'=>$this->field->id, 'recordid'=>$recordid));
|
||||
$content = $DB->get_field('data_content', 'content', ['fieldid' => $this->field->id, 'recordid' => $recordid]);
|
||||
$content = explode('##', $content);
|
||||
} else {
|
||||
$content = array();
|
||||
$content = [];
|
||||
}
|
||||
|
||||
$str = '<div title="' . s($this->field->description) . '">';
|
||||
|
Loading…
x
Reference in New Issue
Block a user