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

Users not marked synced with membership updates

XMLWordPrintable

    • MOODLE_403_STABLE
    • MOODLE_403_STABLE
    • MDL-79614-master
    • Hide

      Setup

      1. Clone Andrew's helper repository:

        git clone https://github.com/andrewnicols/moodle-synapse
        cd moodle-synapse
        chmod 777 *_data
        

      2. Run the docker-compose up command:

        docker compose up -d
        

      3. Wait for about 10 seconds for the first run to complete
      4. Run the setup script:

        ./setup.sh
        

      5. Copy the command it outputs
      6. Change into your Moodle directory
      7. Paste in the command, for EXAMPLE:

        cd path/to/moodle
        sed -i '/^require_once.*lib.*setup.php.*$/i require_once("/Users/nicols/git/moodlehq/synapse/moodle-config.php");' config.php
        cd -
        

      8. If you have not done so already, edit your /etc/hosts file to add:

        127.0.0.1 element.container.docker.internal element
        127.0.0.1 synapse.container.docker.internal synapse
        127.0.0.1 keycloak.container.docker.internal keycloak
        

      9. Follow the instructions at https://github.com/andrewnicols/moodle-synapse#trusting to trust the root CA that is used for this.

      Test Scenario 1

      1. Create a new user
      2. Navigate to the Create a new course form
      3. Add all the required information to the form
      4. Scroll down to the Communication section
      5. Set the Communication service to 'Matrix'
      6. Set Room name to 'Test room'
      7. Save changes.
      8. Run the queued ad-hoc tasks by running cron from the command line: php admin/cli/cron.php
      9. Navigate back to your course participant page
      10. Add the created users as a teacher
      11. Run cron from the command line
      12. Get the user id of the user from the user table or from the URL of the user profile page
      13. Check the communication_user table for that user and confirm the sync flag is 1 for that user
      14. Change the role of a user from teacher to student
      15. Check the communication_user table for that user and confirm the sync flag is 0 for that user
      16. Run the queued ad-hoc tasks by running cron from the command line: php admin/cli/cron.php
      17. Confirm the sync flag in the database is now changed to 1 for that user
      Show
      Setup Clone Andrew's helper repository: git clone https://github.com/andrewnicols/moodle-synapse cd moodle-synapse chmod 777 *_data Run the docker-compose up command: docker compose up -d Wait for about 10 seconds for the first run to complete Run the setup script: ./setup.sh Copy the command it outputs Change into your Moodle directory Paste in the command, for EXAMPLE : cd path/to/moodle sed -i '/^require_once.*lib.*setup.php.*$/i require_once("/Users/nicols/git/moodlehq/synapse/moodle-config.php");' config.php cd - If you have not done so already, edit your /etc/hosts file to add: 127.0.0.1 element.container.docker.internal element 127.0.0.1 synapse.container.docker.internal synapse 127.0.0.1 keycloak.container.docker.internal keycloak Follow the instructions at https://github.com/andrewnicols/moodle-synapse#trusting to trust the root CA that is used for this. Test Scenario 1 Create a new user Navigate to the Create a new course form Add all the required information to the form Scroll down to the Communication section Set the Communication service to 'Matrix' Set Room name to 'Test room' Save changes. Run the queued ad-hoc tasks by running cron from the command line: php admin/cli/cron.php Navigate back to your course participant page Add the created users as a teacher Run cron from the command line Get the user id of the user from the user table or from the URL of the user profile page Check the communication_user table for that user and confirm the sync flag is 1 for that user Change the role of a user from teacher to student Check the communication_user table for that user and confirm the sync flag is 0 for that user Run the queued ad-hoc tasks by running cron from the command line: php admin/cli/cron.php Confirm the sync flag in the database is now changed to 1 for that user
    • 1
    • Team Hedgehog 2023 Sprint 3.3, Team Hedgehog 2023 Review 3

      The matrix update_room_membership() implementation is missing the call to mark users synced, so they will all be unnecessarily re-processed with each room membership update, rather than just the users who need to be processed.

      This seems to have been inadvertently dropped off when squashing in the issue it was intended to be introduced in.

            safat.shahin@moodle.com Safat Shahin
            michaelh Michael Hawkins
            Michael Hawkins Michael Hawkins
            Jun Pataleta Jun Pataleta
            Ron Carl Alfon Yu Ron Carl Alfon Yu
            Votes:
            0 Vote for this issue
            Watchers:
            10 Start watching this issue

              Created:
              Updated:
              Resolved:

                Estimated:
                Original Estimate - 0 minutes
                0m
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 3 hours, 18 minutes
                3h 18m

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