-
Notifications
You must be signed in to change notification settings - Fork 0
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
Set default tag values for categories install data and tag findMatches #19
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Were you able to get this changes to display through running ./nodebb setup again? I know there were some issues with that
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yep! the changes are working locally now 👍
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A note for later: since all of our changes hinge on fully uninstalling and reconfiguring NodeBB from default, we should keep track in the README of all the files and commands necessary to run in order to test changes for files in install
.
src/categories/create.js
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I also had to modify this to update default privileges; however, I wasn't able to get these to display. How did you approach it?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What difference did you observe between topics / categories ? Was updating both necessary ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great! My only comments would be for the future (and this is true for my branch as well) documenting the attributes we're adding into these configuration files.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A note for later: since all of our changes hinge on fully uninstalling and reconfiguring NodeBB from default, we should keep track in the README of all the files and commands necessary to run in order to test changes for files in install
.
@@ -6,7 +6,8 @@ | |||
"bgColor": "#fda34b", | |||
"color": "#ffffff", | |||
"icon" : "fa-bullhorn", | |||
"order": 1 | |||
"order": 1, | |||
"tagWhitelist": ["exam","quiz","homework"] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I need to do this as well with my tags, but documenting what these tags do in the README
would be helpful for future development.
@@ -17,6 +17,7 @@ const translator = require('../translator'); | |||
|
|||
module.exports = function (Topics) { | |||
Topics.create = async function (data) { | |||
// console.log('the data for topics.create func is ', data); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tiny bit of dead code here
Set default values ["exam", "quiz", "homework"] for tagWhitelist variable in the findMatches function for
src/topics/tags.js
. Also set default tagWhitelist values for categories data upon installation. Placed tagging privileges from registered users to moderator privileges in 'src/categories/create.js'.By limiting the default privileges for registered users, students are restricted from write access privileges for tagging topics. Setting default values for the tagWhitelist variables in the install data and findMatches functions allows the admin to configure tags across categories and topics easily.