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

tool_uploadcourse doesn't do role validation

    XMLWordPrintable

Details

    • Moppies Kanban

    Description

      It looks like there is no validation happening when you upload course via csv and specify enrolment method (currently supported are manual and self). So if you upload smth with valid role like

      shortname,fullname,category,enrolment_1,enrolment_1_role
      c1,course1,1,manual,teacher
      

      you will have enrolment instance with teacher role. But if you try smth with invalid role like

      shortname,fullname,category,enrolment_1,enrolment_1_role
      c2,course2,1,manual,teacherfdshfkj
      

      A course still will be created, no error/warning will be shown and you will have enrolment instance with student role.

      I think we should at least notify user that there is some bad data in csv. And may be its better to not allow the creation to happen at all.

      Attachments

        Issue Links

          Activity

            People

              ilyatregubov Ilya Tregubov
              ilyatregubov Ilya Tregubov
              Ferran Recio Ferran Recio
              Jun Pataleta Jun Pataleta
              CiBoT CiBoT
              Amaia Anabitarte, Bas Brands, Carlos Escobedo, Laurent David, Raquel Ortega, Sabina Abellan, Sara Arjona (@sarjona)
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:
                9/May/22

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0 minutes
                  0m
                  Logged:
                  Time Spent - 2 days, 46 minutes
                  2d 46m