mirror of
https://github.com/moodle/moodle.git
synced 2025-08-05 00:46:50 +02:00
MDL-44287 glossary: use course mod api to create new module when importing as new
This commit is contained in:
parent
76e4de31cc
commit
6f9354beb0
2 changed files with 25 additions and 40 deletions
|
@ -343,6 +343,9 @@ function set_moduleinfo_defaults($moduleinfo) {
|
|||
if (!isset($moduleinfo->completionview)) {
|
||||
$moduleinfo->completionview = COMPLETION_VIEW_NOT_REQUIRED;
|
||||
}
|
||||
if (!isset($moduleinfo->completionexpected)) {
|
||||
$moduleinfo->completionexpected = 0;
|
||||
}
|
||||
|
||||
// Convert the 'use grade' checkbox into a grade-item number: 0 if checked, null if not.
|
||||
if (isset($moduleinfo->completionusegrade) && $moduleinfo->completionusegrade) {
|
||||
|
@ -351,6 +354,13 @@ function set_moduleinfo_defaults($moduleinfo) {
|
|||
$moduleinfo->completiongradeitemnumber = null;
|
||||
}
|
||||
|
||||
if (!isset($moduleinfo->conditiongradegroup)) {
|
||||
$moduleinfo->conditiongradegroup = array();
|
||||
}
|
||||
if (!isset($moduleinfo->conditionfieldgroup)) {
|
||||
$moduleinfo->conditionfieldgroup = array();
|
||||
}
|
||||
|
||||
return $moduleinfo;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue