Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-82656

Content added in new field is not saved

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Not a bug
    • Icon: Minor Minor
    • None
    • 4.4 regressions
    • Course, Database SQL/XMLDB
    • None

      Hi, I'm starting developing in Moodle 4, and I'm trying to custom the courses edit_form.php

      I'm trying to add new fields to existing sections, for example, in the General section. This works, a new field appears, but the information added here is not saved, once the page is updated, all the other fields are changed, except this one.

      The code I added in core/course/edit_form.php:

       

          $rootpath = get_config('repository_pluginname', 'rootpath');
          $mform->addElement('text', 'rootpath', get_string('rootpath', 'repository_pluginname'), array('size' => '40'));
          $mform->setDefault('rootpath', $rootpath);

      On the other hand, right now I am trying to make these changes in the original file, but I would like to know if there is a way to make these changes in other files, for example, in files belonging to a plugin. I have tried to extend the class, but I have not been able to see any changes.

       

       

       

            Unassigned Unassigned
            dlddld Dld Dld
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved:

                Error rendering 'clockify-timesheets-time-tracking-reports:timer-sidebar'. Please contact your Jira administrators.