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

Create a scheduled task to sync plans from template cohorts

    XMLWordPrintable

    Details

    • Type: Task
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 3.1
    • Fix Version/s: None
    • Component/s: Competencies
    • Labels:
    • Testing Instructions:
      Hide
      • create 4 users
      • create a cohort and assign 2 users to it
      • create a learning plan template
      • Go to the learning plan template page and click at the cohort link (0)
      • In the form select the cohort just created and submit the form
      • Go back to the learning plan template page you should see 2 users in column users of the template
      • Now assign 2 more users to the cohort
      • Run manually the task using this command:

        php admin/tool/task/cli/schedule_task.php --execute=\\tool_lp\\task\\sync_plans_from_cohorts_task
        

      • Go back to the learning plan template page you should see 4 users in column users of the template

      UnitTest

      mdk phpunit -r -s tool_lp_testsuite
      

      Show
      create 4 users create a cohort and assign 2 users to it create a learning plan template Go to the learning plan template page and click at the cohort link (0) In the form select the cohort just created and submit the form Go back to the learning plan template page you should see 2 users in column users of the template Now assign 2 more users to the cohort Run manually the task using this command: php admin/tool/task/cli/schedule_task.php --execute=\\tool_lp\\task\\sync_plans_from_cohorts_task Go back to the learning plan template page you should see 4 users in column users of the template UnitTest mdk phpunit -r -s tool_lp_testsuite
    • Affected Branches:
      MOODLE_31_STABLE
    • Pull Master Branch:
      MDL-52282_master
    • Story Points:
      3
    • Sprint:
      CBE Sprint 3

      Description

      The task will observe check if new users were added to a cohort and create the required plans. Note that when a plan is unlinked from a template the original template ID is stored. The cohort sync should not re-create plans that were unlinked.

        Attachments

          Issue Links

            Activity

              People

              • Votes:
                0 Vote for this issue
                Watchers:
                4 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: