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

Create an output component that displays an activity's information for a user

    XMLWordPrintable

    Details

    • Testing Instructions:
      Hide

      Setup

      1. Create a course with completion tracking enabled.
      2. Enrol a student and a teacher in the course.
      3. Create 3 choice activities in a course with the following completion settings:
        • Choice 1
          • Completion tracking: No completion
        • Choice 2
          • Completion tracking: Manual completion
        • Choice 3
          • Completion tracking: Automatic completion
          • Completion requirements: Students must view the activity; and Students must make a choice

      Activity dates

      1. Log in as a teacher.
      2. Set various open and close times for the choice activities (e.g. Choice 1 has both open and close times, Choice 2 has open date only, Choice 3 has none.)
      3. View to the choice activities
      4. Confirm that display of the "Open" date.
        1. It should match the date/time that was set in the "Allow responses from" field.
        2. If "Allow responses from" was not set, then it should not be displayed.
        3. If this date is in the future, the wording should be "Opens"
        4. If the date is in the past, the wording should be "Opened"
      5. Confirm that display of the "Close" date.
        1. It should match the date/time that was set in the "Allow responses until" field.
        2. If "Allow responses until" was not set, then it should not be displayed.
        3. If this date is in the future, the wording should be "Closes"
        4. If the date is in the past, the wording should be "Closed"

      Completion

      No completion
      1. Log in as either a teacher or a student.
      2. Go to Choice 1
      3. Confirm that you don't see any "To do:" or "Mark as done" button on the page.
      Manual completion
      Teacher view
      1. Log in as a teacher
      2. Go to Choice 2
      3. Confirm that you see a disabled "Mark as done" button and that you cannot press it.
      Student view
      1. Log in as a student
      2. Go to Choice 2
      3. Confirm that you see the "Mark as done" button.
      4. Press it.
      5. Confirm that it now indicates "Done"
      6. Go to the course home page.
      7. Confirm that it is also marked done
      8. Untick Choice 2 on the course homepage.
      9. Go back to Choice 2
      10. Confirm that it now says "Mark as done"
      Automatic completion
      Teacher view
      1. Log in as a teacher
      2. Go to Choice 3
      3. Confirm that you don't see the completion requirements "View" and "Make a choice" on the page.
      4. Confirm that they are not prefixed with "To do:".
      Student view
      1. Log in as a student
      2. Go to Choice 3.
      3. Confirm that you don't see the completion requirements "View" and "Make a choice" on the page.
      4. Confirm that "View" is prefixed with "Done:" while "Make a choice" is prefixed with "To do:"
      5. Select an option from the choice and activity and submit it.
      6. Confirm that "Make a chocie" is now prefixed with "Done:"
      Show
      Setup Create a course with completion tracking enabled. Enrol a student and a teacher in the course. Create 3 choice activities in a course with the following completion settings: Choice 1 Completion tracking: No completion Choice 2 Completion tracking: Manual completion Choice 3 Completion tracking: Automatic completion Completion requirements: Students must view the activity; and Students must make a choice Activity dates Log in as a teacher. Set various open and close times for the choice activities (e.g. Choice 1 has both open and close times, Choice 2 has open date only, Choice 3 has none.) View to the choice activities Confirm that display of the " Open " date. It should match the date/time that was set in the " Allow responses from " field. If " Allow responses from " was not set, then it should not be displayed. If this date is in the future, the wording should be " Opens " If the date is in the past, the wording should be " Opened " Confirm that display of the " Close " date. It should match the date/time that was set in the " Allow responses until " field. If " Allow responses until " was not set, then it should not be displayed. If this date is in the future, the wording should be " Closes " If the date is in the past, the wording should be " Closed " Completion No completion Log in as either a teacher or a student. Go to Choice 1 Confirm that you don't see any " To do: " or " Mark as done " button on the page. Manual completion Teacher view Log in as a teacher Go to Choice 2 Confirm that you see a disabled " Mark as done " button and that you cannot press it. Student view Log in as a student Go to Choice 2 Confirm that you see the " Mark as done " button. Press it. Confirm that it now indicates " Done " Go to the course home page. Confirm that it is also marked done Untick Choice 2 on the course homepage. Go back to Choice 2 Confirm that it now says " Mark as done " Automatic completion Teacher view Log in as a teacher Go to Choice 3 Confirm that you don't see the completion requirements " View " and " Make a choice " on the page. Confirm that they are not prefixed with " To do: ". Student view Log in as a student Go to Choice 3. Confirm that you don't see the completion requirements " View " and " Make a choice " on the page. Confirm that " View " is prefixed with " Done: " while " Make a choice " is prefixed with " To do: " Select an option from the choice and activity and submit it. Confirm that " Make a chocie " is now prefixed with " Done: "
    • Affected Branches:
      MOODLE_311_STABLE
    • Fixed Branches:
      MOODLE_311_STABLE
    • Pull 3.11 Branch:
      MDL-70817-311-8
    • Pull Master Branch:
      MDL-70817-master-8
    • Story Points:
      0
    • Sprint:
      Internationals - 3.11 Sprint 6, Internationals - 3.11 Sprint 7, Internationals - 3.11 Sprint 8, Internationals - 3.11 Sprint 9

      Description

      We need an output component that displays an activity's information for a user (completion info and activity dates).

      To do so, we need:

      • Output component function
      • Output component renderer
      • Output component renderable
      • Convert course/completion.js into AMD
      • Templates
        • Activity information which imports templates for
          1. Activity dates
          2. Completion details
      • Sample implementation for an activity
      • Unit tests
      • Behat tests

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              jpataleta Jun Pataleta
              Reporter:
              rezaie9 Shamim Rezaie
              Peer reviewer:
              Shamim Rezaie Shamim Rezaie
              Integrator:
              Adrian Greeve Adrian Greeve
              Tester:
              Gladys Basiana Gladys Basiana
              Participants:
              Component watchers:
              Sam Marshall, Amaia Anabitarte, Carlos Escobedo, Ferran Recio, Ilya Tregubov, Sara Arjona (@sarjona)
              Votes:
              2 Vote for this issue
              Watchers:
              6 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                Fix Release Date:
                17/May/21

                  Time Tracking

                  Estimated:
                  Original Estimate - 0 minutes
                  0m
                  Remaining:
                  Remaining Estimate - 0 minutes
                  0m
                  Logged:
                  Time Spent - 1 week, 1 day, 7 hours
                  1w 1d 7h