-
Notifications
You must be signed in to change notification settings - Fork 13
#SBCOSS-584: Removed hardcoded bmgs #56
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
13 commits
Select commit
Hold shift + click to select a range
e6a11c5
SBCOSS-584: Remove access path rule definitions for board, gradeLevel…
Rakshitha-D 0364af9
SBCOSS-584: Removed parameter rule for board
Rakshitha-D a7c79ca
SBCOSS-584: created dynamic category manager to fetch framework categ…
Rakshitha-D 00e53f2
SBCOSS-584: updated accesspath/filter validations to be dynamic
Rakshitha-D 997989b
SBCOSS-584: remove hardcoded namespace
Rakshitha-D 9b919ae
SBCOSS-584: added setFrameworkCategoryParameters to dynamically set f…
Rakshitha-D 0368134
SBCOSS-584: added setFrameworkCategoryParameters to report and data s…
Rakshitha-D 26aeb22
SBCOSS-584: formatted dynamic category manager
Rakshitha-D 8b4e922
SBCOSS-584: updated reports to handle missing channel ids and access …
Rakshitha-D b766f04
SBCOSS-584: removed console statements and harcoded framework Name
Rakshitha-D b48eef6
SBCOSS-584: updated validation of accesspaths
Rakshitha-D 3a2c5c2
SBCOSS-584: updated condition validation
Rakshitha-D 147e941
SBCOSS-584: updation for awaiting for validation function
Rakshitha-D File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,26 @@ | ||
| const _ = require('lodash'); | ||
| const { channelRead, frameworkRead } = require('../../helpers/learnerHelper'); | ||
| const debug = require('debug')('dynamicCategoryManager'); | ||
|
|
||
| class DynamicCategoryManager { | ||
| async getCategoriesForChannel(channelId) { | ||
| try { | ||
| const channelReadResponse = await channelRead({ channelId }); | ||
| const frameworkName = _.get(channelReadResponse, 'data.result.channel.defaultFramework'); | ||
| if (!frameworkName) { | ||
| throw new Error('Default framework missing'); | ||
| } | ||
| const frameworkReadResponse = await frameworkRead({ frameworkId: frameworkName }); | ||
| const frameworkData = _.get(frameworkReadResponse, 'data.result.framework'); | ||
| const categories = _.map(frameworkData.categories, 'code'); | ||
|
|
||
| return categories; | ||
| } catch (error) { | ||
| debug('Failed to fetch framework categories', error); | ||
| return []; | ||
| } | ||
| } | ||
|
|
||
| } | ||
|
|
||
| module.exports = new DynamicCategoryManager(); |
This file was deleted.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.