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

Implement search functionality for the repository_contentbank

XMLWordPrintable

    • MOODLE_39_STABLE
    • MOODLE_39_STABLE
    • MDL-67813-master-1
    • Hide

      Setup

      1. Login as Admin.
      2. Go to Site administration > Plugins > Repositories > Manage repositories
      3. Enable the 'Content bank' repository
      4. Create several courses:
        1. Course1 in the Miscellaneous category
        2. Course2 in the Miscellaneous category
      5. Add h5p files into the content bank for multiple contexts. (You can use the files uploaded in this issue)
        1. System context 
          1. How to add content:
            1. Go to 'Dashboard'
            2. Click on the 'Content bank' item in the navigation block
            3. Add the systemcontentfile.h5p file into the content bank
        2. Course category context
          1. Add into the following course category contexts:
            1. Miscellaneous
          2. How to add:
            1. Go to Site administration > Courses > Manage courses and categories
            2. Click on the link of the desired course category (ex. 'Miscellaneous')
            3. Click on the 'Content bank' item in the navigation block
            4. Add the categorycontentfile.h5p file into the content bank
        3. Course context
          1. Add into the following course contexts:
            1. Course1
            2. Course2
          2. How to add:
            1. Go to 'Site home'
            2. Click on the link of the desired course (ex. 'Course1') in the 'Available courses' section
            3. Click on the 'Content bank' item in the navigation block
            4. Add the course1contentfile.h5p file into the content bank for Course1, and course2contentfile.h5p  into the content bank for Course2
      6. Enrol a user as an editing teacher in the following courses:
        1. Course1

      Test 1 (Search returns the correct results)

      1. Login as Admin.
      2. Navigate to Course1
      3. Go to 'Edit settings'
      4. Click on the h5p button in the 'Course summary' editor and click on 'Browse repositories'
      5. Click on the 'Content bank' repository
        1. make sure you can see a search bar at the top of the content bank repository
      6. Using the search bar, search for 'contentfile'
        1. make sure you can see 4 results:
          1. systemcontentfile.h5p
          2. categorycontentfile.h5p
          3. course1contentfile.h5p
          4. course2contentfile.h5p
      7. Again, using the searchbar, search for 'SYSTEM' (case insensitive search)
        1. make sure you can see 1 result:
          1. systemcontentfile.h5p
      8. Search for 'somefile'
        1. make sure there are no results displayed

      Test 2 (Search returns only content that can be viewed/accessed by the user)

      1. Login as Editing Teacher.
      2. Navigate to Course1
      3. Go to 'Edit settings'
      4. Click on the h5p button in the 'Course summary' editor and click on 'Browse repositories'
      5. Click on the 'Content bank' repository
        1. make sure you can see a search bar at the top of the content bank repository
      6. Using the search bar, search for 'contentfile'
        1. make sure you can see 3 results (The editing teacher is not enrolled in Course2 and he does not have a permission to view course2contentfile.h5p):
          1. systemcontentfile.h5p
          2. categorycontentfile.h5p
          3. course1contentfile.h5p

      Test 3 (Has ability to reset the search criteria and return to the previous state)

      1. Login as Admin.
      2. Navigate to Course1
      3. Go to 'Edit settings'
      4. Click on the h5p button in the 'Course summary' editor and click on 'Browse repositories'
      5. Click on the 'Content bank' repository
      6. You should be able to see the available content in the Course1 context
      7. Using the search bar, search for 'system' and there should be 1 result (systemcontentfile.h5p)
      8. make sure there is a "Refresh" button at the top
      9. Click on the "Refresh" button
        1. make sure the search result is not displayed anymore
        2. make sure you are back in the state previous to the search action (Course1 content)

       

      Show
      Setup Login as Admin. Go to Site administration > Plugins > Repositories > Manage repositories Enable the 'Content bank' repository Create several courses: Course1 in the Miscellaneous category Course2 in the Miscellaneous category Add h5p files into the content bank for multiple contexts. (You can use the files uploaded in this issue) System context  How to add content: Go to 'Dashboard' Click on the 'Content bank' item in the navigation block Add the  systemcontentfile.h5p file into the content bank Course category context Add into the following course category contexts: Miscellaneous How to add: Go to Site administration > Courses > Manage courses and categories Click on the link of the desired course category (ex. 'Miscellaneous') Click on the 'Content bank' item in the navigation block Add the  categorycontentfile.h5p  file into the content bank Course context Add into the following course contexts: Course1 Course2 How to add: Go to 'Site home' Click on the link of the desired course (ex. 'Course1') in the 'Available courses' section Click on the 'Content bank' item in the navigation block Add the  course1contentfile.h5p  file into the content bank for Course1, and  course2contentfile.h5p   into the content bank for Course2 Enrol a user as an editing teacher in the following courses: Course1 Test 1 (Search returns the correct results) Login as Admin. Navigate to Course1 Go to 'Edit settings' Click on the h5p button in the 'Course summary' editor and click on 'Browse repositories' Click on the 'Content bank' repository make sure you can see a search bar at the top of the content bank repository Using the search bar, search for 'contentfile' make sure you can see 4 results: systemcontentfile.h5p categorycontentfile.h5p course1contentfile.h5p course2contentfile.h5p Again, using the searchbar, search for 'SYSTEM' (case insensitive search) make sure you can see 1 result: systemcontentfile.h5p Search for 'somefile' make sure there are no results displayed Test 2 (Search returns only content that can be viewed/accessed by the user) Login as Editing Teacher. Navigate to Course1 Go to 'Edit settings' Click on the h5p button in the 'Course summary' editor and click on 'Browse repositories' Click on the 'Content bank' repository make sure you can see a search bar at the top of the content bank repository Using the search bar, search for 'contentfile' make sure you can see 3 results (The editing teacher is not enrolled in Course2 and he does not have a permission to view course2contentfile.h5p ): systemcontentfile.h5p categorycontentfile.h5p course1contentfile.h5p Test 3 (Has ability to reset the search criteria and return to the previous state) Login as Admin. Navigate to Course1 Go to 'Edit settings' Click on the h5p button in the 'Course summary' editor and click on 'Browse repositories' Click on the 'Content bank' repository You should be able to see the available content in the Course1 context Using the search bar, search for 'system' and there should be 1 result (systemcontentfile.h5p) make sure there is a "Refresh" button at the top Click on the "Refresh" button make sure the search result is not displayed anymore make sure you are back in the state previous to the search action (Course1 content)  
    • 3

      As a teacher
      I want to be able to search in the content bank repository by content's name
      So that I can find the content I need to select in the file picker

      Acceptance criteria:

      • Be able to search content by name in the content bank repository
      • Reset search criteria to see all content in the content bank repository

      List of tasks:

      • Implement needed methods or functions to search in the content bank repository.
      • Design and implement search results view.
      • Reset the search criteria in order to go back to 'see all' view.

        1. categorycontentfile.h5p .h5p
          699 kB
        2. course1contentfile.h5p.h5p
          758 kB
        3. course2contentfile.h5p .h5p
          530 kB
        4. Screenshot_1.png
          Screenshot_1.png
          107 kB
        5. Screenshot_2.png
          Screenshot_2.png
          86 kB
        6. systemcontentfile.h5p
          617 kB

            Geshoski Mihail Geshoski
            sarjona Sara Arjona (@sarjona)
            Amaia Anabitarte Amaia Anabitarte
            Victor Déniz Falcón Victor Déniz Falcón
            Janelle Barcega Janelle Barcega
            Votes:
            0 Vote for this issue
            Watchers:
            9 Start watching this issue

              Created:
              Updated:
              Resolved:

                Estimated:
                Original Estimate - 0 minutes
                0m
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 1 week, 3 hours, 32 minutes
                1w 3h 32m

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