mirror of
https://github.com/moodle/moodle.git
synced 2025-08-05 00:46:50 +02:00
need to check vars aren't empty b4 using them! - another one!
This commit is contained in:
parent
2475a6c26d
commit
22d56e8015
1 changed files with 3 additions and 1 deletions
|
@ -74,7 +74,9 @@ function choice_add_instance($choice) {
|
|||
$option = NULL;
|
||||
$option->text = $value;
|
||||
$option->choiceid = $choice->id;
|
||||
$option->maxanswers = $choice->{'newlimit'.substr($name, 9)};
|
||||
if (isset($choice->{'newlimit'.substr($name, 9)})) {
|
||||
$option->maxanswers = $choice->{'newlimit'.substr($name, 9)};
|
||||
}
|
||||
$option->timemodified = time();
|
||||
insert_record("choice_options", $option);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue