Proyectos de Subversion Moodle

Rev

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

Rev 1 Rev 1441
Línea 507... Línea 507...
507
            }
507
            }
508
            return false;
508
            return false;
509
        }
509
        }
Línea 510... Línea 510...
510
 
510
 
-
 
511
        // Ensure we don't overflow the maximum length of the fullname field.
-
 
512
        if (
511
        // Ensure we don't overflow the maximum length of the fullname field.
513
            !empty($coursedata['fullname']) &&
-
 
514
            core_text::strlen($coursedata['fullname']) > \core_course\constants::FULLNAME_MAXIMUM_LENGTH
512
        if (!empty($coursedata['fullname']) && core_text::strlen($coursedata['fullname']) > 254) {
515
        ) {
-
 
516
            $this->error('invalidfullnametoolong', new lang_string('invalidfullnametoolong', 'tool_uploadcourse',
513
            $this->error('invalidfullnametoolong', new lang_string('invalidfullnametoolong', 'tool_uploadcourse', 254));
517
                \core_course\constants::FULLNAME_MAXIMUM_LENGTH));
514
            return false;
518
            return false;
Línea 515... Línea 519...
515
        }
519
        }
516
 
520
 
Línea 1144... Línea 1148...
1144
                        }
1148
                        }
1145
                    }
1149
                    }
Línea 1146... Línea 1150...
1146
 
1150
 
1147
                    // Now update values.
1151
                    // Now update values.
1148
                    // Sort out plugin specific fields.
1152
                    // Sort out plugin specific fields.
1149
                    $modifiedinstance = $plugin->update_enrol_plugin_data($course->id, $method, $instance);
1153
                    $modifiedinstance = $plugin->update_enrol_plugin_data($course->id, $method, clone $instance);
1150
                    $plugin->update_instance($instance, $modifiedinstance);
1154
                    $plugin->update_instance($instance, $modifiedinstance);
1151
                } else {
1155
                } else {
1152
                    foreach ($errors as $key => $message) {
1156
                    foreach ($errors as $key => $message) {
1153
                        $this->error($key, $message);
1157
                        $this->error($key, $message);