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

Exporting grades with custom fields with capitalisation is not possible

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: Major Major
    • None
    • 2.4.6, 2.5.2
    • Gradebook
    • MOODLE_24_STABLE, MOODLE_25_STABLE

      1. Go to [Administration ► Site administration ► Users ► Accounts ► User profile fields].
      2. Create a new 'text input field'.
        1. Set the shortname to: Capitalised (ensure first letter is capitalsied)
        2. Set name to 'Capitalised'
        3. Leave all other settings as default
      3. Go to [Administration ► Site administration ► Grades ► General settings].
      4. in 'grade_export_customprofilefields' put 'Capitalised,'
      5. Go to a course with some students enrolled
      6. Go to [Administration ► Grade administration ► Export ► Plain text file] and export the gradebook.

      Note that you'll get an error about the field:

      Notice: Undefined property: stdClass::$customfield_Capitalised in /Users/danp/git/integration/grade/lib.php on line 2757
      Call Stack
      #	Time	Memory	Function	Location
      1	0.0004	282872	{main}( )	../index.php:0
      2	5.9239	14994072	grade_export->display_preview( )	../index.php:62
      3	6.0108	15271568	grade_helper::get_user_field_value( )	../lib.php:285
      

      Note that if you use the uncapitalised version in the gradebook settings the field will not be exported.

      So the only way to resolve this problem is to remove capitalisation from shortname.

            Unassigned Unassigned
            poltawski Dan Poltawski
            Votes:
            1 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.