mirror of
https://github.com/moodle/moodle.git
synced 2025-04-22 00:42:54 +02:00
Fix for Bug #4969. Renamed variable $mode to $template.
This commit is contained in:
parent
311c697a86
commit
f41cadeba7
@ -318,12 +318,12 @@ function data_generate_default_template($data, $template, $recordid=0, $form=fal
|
||||
}
|
||||
|
||||
//get all the fields for that database
|
||||
if ($fields = get_records('data_fields', 'dataid', $data->id)){
|
||||
if ($fields = get_records('data_fields', 'dataid', $data->id)) {
|
||||
|
||||
$str = '<div align="center">';
|
||||
$str .= '<table>';
|
||||
|
||||
foreach ($fields as $field){
|
||||
foreach ($fields as $field) {
|
||||
|
||||
$str .= '<tr><td valign="top" align="right">';
|
||||
$str .= $field->name.':';
|
||||
@ -353,7 +353,7 @@ function data_generate_default_template($data, $template, $recordid=0, $form=fal
|
||||
|
||||
if ($update) {
|
||||
$newdata->id = $data->id;
|
||||
$newdata->{$mode} = $str;
|
||||
$newdata->{$template} = $str;
|
||||
if (!update_record('data', $newdata)) {
|
||||
notify('Error updating template');
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user