Uploaded image for project: 'LAMS Development'
  1. LAMS Development
  2. LDEV-3098

Include user creation to LessonManagerServlet

    Details

      Description

      This is a follow up from LDEV-3096.

      Now that LDEV-3096 is in the bag, we can pretty much have a functioning integration without the user callback.

      However, there's only one place where we need to add the feature to create the user option user detail parameters: joinLesson method for the LessonManagementServlet.

      In some integrations (ie: moodle), after the teacher creates a lesson, Moodle passes to LAMS the users to be added to the lesson using the join method. Usually if the user doesn't exist, then the call back gets the user details, creates the user and then adds it to the lesson.

      But if there's no callback then this will fail.

      So we need to implement the user detail parameters to this method so the users can be created when using the joinLesson method.
       

        Activity

        Hide
        dronych Andrey Balan added a comment -
        done

        new parameters:
        usePrefix
        firstNames - comma separated first names
        lastNames - comma separated last names
        emails - comma separated emails

        New changes should not affect existing integrations, and so if LMS doesn't send these new parameters it should work as it used to be.
        On the other hand, if LMS wants to create users when calling join to lesson method it should follow a few conventions:
        * firstNames, lastNames, emails - these are comma separated parameters;
        * if there is a need to create even only one user it is required to supply comma separated list of all users going to be joined to lesson.
        I.e. if learnerIds=user1,user1 then each of the new parameters should have 2 values, like firstNames=name1,name2 ...
        * in case if you want to join monitors as well during one call - learner's parameters should go first, before monitor's ones
        * if any of these 3 parameters(firstNames, lastNames, emails) is provided it is expected that all of them have the same number of comma separated elements
        Show
        dronych Andrey Balan added a comment - done new parameters: usePrefix firstNames - comma separated first names lastNames - comma separated last names emails - comma separated emails New changes should not affect existing integrations, and so if LMS doesn't send these new parameters it should work as it used to be. On the other hand, if LMS wants to create users when calling join to lesson method it should follow a few conventions: * firstNames, lastNames, emails - these are comma separated parameters; * if there is a need to create even only one user it is required to supply comma separated list of all users going to be joined to lesson. I.e. if learnerIds=user1,user1 then each of the new parameters should have 2 values, like firstNames=name1,name2 ... * in case if you want to join monitors as well during one call - learner's parameters should go first, before monitor's ones * if any of these 3 parameters(firstNames, lastNames, emails) is provided it is expected that all of them have the same number of comma separated elements
        Hide
        ernieg Ernie Ghiglione added a comment -
        Tested and closed. Thanks very much Andrey, works great.
        Show
        ernieg Ernie Ghiglione added a comment - Tested and closed. Thanks very much Andrey, works great.

          People

          • Assignee:
            dronych Andrey Balan
            Reporter:
            ernieg Ernie Ghiglione
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development