Details
-
Bug
-
Status: Closed
-
Minor
-
Resolution: Fixed
-
3.10
-
MOODLE_310_STABLE
-
MOODLE_310_STABLE, MOODLE_39_STABLE
-
MDL-70063-39-1 -
MDL-70063-master-1 -
Hide
Prerequisites
- You will need to obtain an API key (https://developers.google.com/youtube/v3/getting-started)
- Login as admin.
- Go to Site administration > Plugins > Blocks > Manage blocks
- Enable and configure ("Settings" link) the Youtube block.
- In the configuration page, add the API key and save changes.
- Go to Site home, turn editing on and add the Tags block to the page via the 'Add a block' link.
- Go to the Admin's profile via the 'Profile' link in the user menu (top right)
- Click on 'Edit profile' in the 'User details' section.
- In the 'Interests' section add "cars" (You will need to press enter to add the tag) and save the changes.
Test 1
- Go to Site home.
- You should see the added "cars" tag in the Tags block.
- Click on the tag.
- In the Tags page, turn editing on and add the Youtube block via the 'Add a block' link.
- Configure the Youtube block.
- Set Category = "Education"
- Save changes.
- In the Tags page
- confirm the Youtube block properly displays videos related to the selected category without any errors.
Test 2 (upgrade)
NOTE: If you have already run the upgrade and you hit a screen or message saying that your version of code is older than the current code, then run the following mdk command in the console:
"mdk run version"- Without the patch applied (git checkout to the commit prior to "
MDL-70063block_tag_youtube: Update category config to use category ID") - Go to the Site home.
- Click on the tag in the Tags block.
- In the Tags page, turn editing on and add the Youtube block via the 'Add a block' link.
- Configure the Youtube block.
- Set Category = "Films & Animation"
- Save changes.
- The Youtube block should now display an error (no videos as well)
- Apply the patch (git checkout to the commit "
MDL-70063block_tag_youtube: Fix category config in existing instances") - Run the upgrade.
- Go to Site home.
- Click on the tag in the Tags block.
- In the Tags page
- confirm the Youtube block properly displays videos related to the selected category without any errors.
Test 3 (upgrade - Youtube API key not set)
NOTE: If you have already run the upgrade and you hit a screen or message saying that your version of code is older than the current code, then run the following mdk command in the console:
"mdk run version"- Without the patch applied (git checkout to the commit prior to "
MDL-70063block_tag_youtube: Update category config to use category ID") - Go to Site administration > Plugins > Blocks > Manage blocks
- Configure the Youtube block.
- Remove the API key and save changes.
- Go to the Site home.
- Click on the tag in the Tags block.
- In the Tags page, turn editing on and add the Youtube block via the 'Add a block' link.
- Configure the Youtube block.
- Set Category = "Education"
- Save changes.
- The Youtube block should now display an error: API key is not set (no videos as well)
- Apply the patch (git checkout to the commit "
MDL-70063block_tag_youtube: Fix category config in existing instances") - Run the upgrade.
- confirm that you see a warning message during the upgrade stating that the API key is not configured and therefore the category setting will be set by default to "Any category" as the categories cannot be obtained and mapped.
- Go to Site administration > Plugins > Blocks > Manage blocks
- Configure the Youtube block.
- Add a valid API key and save changes.
- Go to Site home.
- Click on the tag in the Tags block.
- In the Tags page,
- confirm the Youtube block properly displays videos
- Configure the Youtube block.
- confirm the Category is set to "Any category"
Test 4 (upgrade - Youtube API key is not valid)
NOTE: If you have already run the upgrade and you hit a screen or message saying that your version of code is older than the current code, then run the following mdk command in the console:
"mdk run version"- Without the patch applied (git checkout to the commit prior to "
MDL-70063block_tag_youtube: Update category config to use category ID") - Go to Site administration > Plugins > Blocks > Manage blocks
- Configure the Youtube block.
- For the API key, add an value that does not represents a valid key (ex. 'invalidkeyvalue').
- Go to the Site home.
- Click on the tag in the Tags block.
- In the Tags page, turn editing on and add the Youtube block via the 'Add a block' link.
- Configure the Youtube block.
- Set Category = "Films & Animation"
- Save changes.
- The Youtube block should not display any videos
- Apply the patch (git checkout to the commit "
MDL-70063block_tag_youtube: Fix category config in existing instances") - Run the upgrade.
- confirm that you see a warning message during the upgrade stating that the API key is not valid and therefore the category setting will be set by default to "Any category" as the categories cannot be obtained and mapped.
- Go to Site administration > Plugins > Blocks > Manage blocks
- Configure the Youtube block.
- Add a valid API key and save changes.
- Go to Site home.
- Click on the tag in the Tags block.
- In the Tags page,
- confirm the Youtube block properly displays videos
- Configure the Youtube block.
- confirm the Category is set to "Any category"
ShowPrerequisites You will need to obtain an API key ( https://developers.google.com/youtube/v3/getting-started ) Login as admin. Go to Site administration > Plugins > Blocks > Manage blocks Enable and configure ("Settings" link) the Youtube block. In the configuration page, add the API key and save changes. Go to Site home, turn editing on and add the Tags block to the page via the 'Add a block' link. Go to the Admin's profile via the ' Profile ' link in the user menu (top right) Click on ' Edit profile ' in the 'User details' section. In the 'Interests' section add " cars " (You will need to press enter to add the tag) and save the changes. Test 1 Go to Site home. You should see the added " cars " tag in the Tags block. Click on the tag. In the Tags page, turn editing on and add the Youtube block via the 'Add a block' link. Configure the Youtube block. Set Category = "Education" Save changes. In the Tags page confirm the Youtube block properly displays videos related to the selected category without any errors. Test 2 (upgrade) NOTE: If you have already run the upgrade and you hit a screen or message saying that your version of code is older than the current code, then run the following mdk command in the console: " mdk run version " Without the patch applied (git checkout to the commit prior to " MDL-70063 block_tag_youtube: Update category config to use category ID") Go to the Site home. Click on the tag in the Tags block. In the Tags page, turn editing on and add the Youtube block via the 'Add a block' link. Configure the Youtube block. Set Category = "Films & Animation" Save changes. The Youtube block should now display an error (no videos as well) Apply the patch (git checkout to the commit " MDL-70063 block_tag_youtube: Fix category config in existing instances") Run the upgrade. Go to Site home. Click on the tag in the Tags block. In the Tags page confirm the Youtube block properly displays videos related to the selected category without any errors. Test 3 (upgrade - Youtube API key not set) NOTE: If you have already run the upgrade and you hit a screen or message saying that your version of code is older than the current code, then run the following mdk command in the console: " mdk run version " Without the patch applied (git checkout to the commit prior to " MDL-70063 block_tag_youtube: Update category config to use category ID") Go to Site administration > Plugins > Blocks > Manage blocks Configure the Youtube block. Remove the API key and save changes. Go to the Site home. Click on the tag in the Tags block. In the Tags page, turn editing on and add the Youtube block via the 'Add a block' link. Configure the Youtube block. Set Category = "Education" Save changes. The Youtube block should now display an error: API key is not set (no videos as well) Apply the patch (git checkout to the commit " MDL-70063 block_tag_youtube: Fix category config in existing instances") Run the upgrade. confirm that you see a warning message during the upgrade stating that the API key is not configured and therefore the category setting will be set by default to "Any category" as the categories cannot be obtained and mapped. Go to Site administration > Plugins > Blocks > Manage blocks Configure the Youtube block. Add a valid API key and save changes. Go to Site home. Click on the tag in the Tags block. In the Tags page, confirm the Youtube block properly displays videos Configure the Youtube block. confirm the Category is set to "Any category" Test 4 (upgrade - Youtube API key is not valid) NOTE: If you have already run the upgrade and you hit a screen or message saying that your version of code is older than the current code, then run the following mdk command in the console: " mdk run version " Without the patch applied (git checkout to the commit prior to " MDL-70063 block_tag_youtube: Update category config to use category ID") Go to Site administration > Plugins > Blocks > Manage blocks Configure the Youtube block. For the API key, add an value that does not represents a valid key (ex. 'invalidkeyvalue'). Go to the Site home. Click on the tag in the Tags block. In the Tags page, turn editing on and add the Youtube block via the 'Add a block' link. Configure the Youtube block. Set Category = "Films & Animation" Save changes. The Youtube block should not display any videos Apply the patch (git checkout to the commit " MDL-70063 block_tag_youtube: Fix category config in existing instances") Run the upgrade. confirm that you see a warning message during the upgrade stating that the API key is not valid and therefore the category setting will be set by default to "Any category" as the categories cannot be obtained and mapped. Go to Site administration > Plugins > Blocks > Manage blocks Configure the Youtube block. Add a valid API key and save changes. Go to Site home. Click on the tag in the Tags block. In the Tags page, confirm the Youtube block properly displays videos Configure the Youtube block. confirm the Category is set to "Any category"
-
3
-
4.0 holding pattern 8
Description
How to reproduce:
- As admin navigate to <Site home>
- Turn editing on
- Add a new tags block
- Click on any of the tag in the block (tester used cars)
- Turn editing on
- Add youtube block (on test instance it has to be enabled in site administration / plugins / blocks and it needs proper API key)
- Edit the new block and select one of the categories
Initially I've thought this might be an issue where there are no videos found. However, this has been tested on a car tag and the category was autos & vehicles so it's more than certain there should be some hits.
Attachments
Issue Links
- blocks
-
MDLQA-15240 CLONE - YouTube and Flickr blocks on tag page display related content
-
- Passed
-
- caused a regression
-
MDL-74287 Early (web) installation steps lead to table does not exist errors
-
- Closed
-