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

Handle hidden templates/frameworks when linking competencies

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 3.1
    • Fix Version/s: None
    • Component/s: Competencies
    • Labels:
    • Testing Instructions:
      Hide

      Testing competency that belong to hidden framework

      • Create two frameworks A and B, each with a competence CA and CB.
      • Create a learning plan template T
      • go on the template T page and click on "Link template competencies" button
      • You should see the frameworks A and B
      • Now edit the framework B and make visible No (false)
      • Return to the template T page and click on "Link template competencies" button
      • You should see only framework A
      • Now create a user learning plan P
      • Go on the plan P page and click on "Add competency" button
      • You should see only framework A

      Testing hidden template

      • Create a template T
      • Go to the list of templates and in the row of template T click the link in the Cohorts column
      • You should see the form to add cohort
      • Go to the list of templates and in the row of template T click the link in the Users plans column
      • You should see the form to create plans
      • Now edit the template T and make visible No(false)
      • Go to the list of templates and in the row of template T click the link in the Cohorts column
      • You should see the form to add cohort and you should see the message "Cohorts will not be synchronized while this template is hidden"
      • Go to the list of templates and in the row of template T click the link in the Users plans column
      • You should NOT see the form to create plans and you should see the message "New user plans can not created while this template is hidden"

      Run the unit test

      mdk phpunit -r -s tool_lp_testsuite
      

      Show
      Testing competency that belong to hidden framework Create two frameworks A and B, each with a competence CA and CB. Create a learning plan template T go on the template T page and click on "Link template competencies" button You should see the frameworks A and B Now edit the framework B and make visible No (false) Return to the template T page and click on "Link template competencies" button You should see only framework A Now create a user learning plan P Go on the plan P page and click on "Add competency" button You should see only framework A Testing hidden template Create a template T Go to the list of templates and in the row of template T click the link in the Cohorts column You should see the form to add cohort Go to the list of templates and in the row of template T click the link in the Users plans column You should see the form to create plans Now edit the template T and make visible No(false) Go to the list of templates and in the row of template T click the link in the Cohorts column You should see the form to add cohort and you should see the message "Cohorts will not be synchronized while this template is hidden" Go to the list of templates and in the row of template T click the link in the Users plans column You should NOT see the form to create plans and you should see the message "New user plans can not created while this template is hidden" Run the unit test mdk phpunit -r -s tool_lp_testsuite
    • Affected Branches:
      MOODLE_31_STABLE
    • Pull Master Branch:
      MDL-52229_master
    • Story Points:
      3
    • Sprint:
      CBE Sprint 3

      Description

      When a user is building a framework they can set their framework as hidden, in which case it will not show up in the different areas where a framework can be picked to then select some of its competencies. The same applies to templates, when the template is hidden it can not be selected to create a plan from that template.

      There is no security risks attached to this issue, which means that the functions listing the frameworks and templates use an optional argument to filter out the invisible template/frameworks. Everyone can list hidden frameworks/templates but the UI will only display the relevant ones (visible). Crafting a request will report the hidden frameworks/templates, and that's fine.

      However, the methods that are linking competencies to a framework/template should first check that the competency is not part of a hidden framework, in which case it cannot be linked. The method creating a plan from a template will perform the same check to ensure that the template is visible.

      Note that if a framework/template is hidden after the competency/plan was created nothing happens. The hidden option is just there to act as a draft/archived flag to only display the relevant options in the UI. If the competency/plan was already created then it remains visible regardless of the status of its origin.

      At a later stage we may decide to rename visible to something more relevant. Or to have a status on the framework/template (draft, active, archived). In that case a framework/template would have to be made "Active" to be visible in the relevant UI, and it could not be sent back as draft when used. Later maybe.

        Attachments

          Activity

            People

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

              Dates

              • Created:
                Updated:
                Resolved: