FinalsClub / karmaworld

KarmaNotes.org v3.0
GNU Affero General Public License v3.0
7 stars 6 forks source link

Include department and professor models in the Moderator Interface #307

Closed btbonval closed 10 years ago

btbonval commented 10 years ago

School moderators should have access to add/edit/remove departments and professors in the school. With that in mind, the Department model as well as the 3 or 4 Professor models should be added to the /moderator/ panel for easy peasy add/edit/remove.

This will also allow us to more easily backfill courses which are presently tied to School, but not Department. Department contains School references, so each Course should contain only a Department and not a School moving forward. Presently the OCW notes do this but the Add Course courses do not. See #294 for the Add Course button fix to move into the new Department system.

btbonval commented 10 years ago

Alright, well grabbing existing data is fail. Time to run the OCW importer on my VM to populate some sample data. PE is small.

btbonval commented 10 years ago

Looks like import OCW json won't work with the beta filepicker API

btbonval commented 10 years ago

The beta filepicker problem should have been resolved by the completion of #308 . This ticket should be clear for a second try.

AndrewMagliozzi commented 10 years ago

Did we add these fields to the view? Beta is acting up to I can't test it.

On Tue, Feb 4, 2014 at 3:13 AM, Bryan Bonvallet notifications@github.comwrote:

The beta filepicker problem should have been resolved by the completion of

308 https://github.com/FinalsClub/karmaworld/issues/308 . This ticket

should be clear for a second try.

Reply to this email directly or view it on GitHubhttps://github.com/FinalsClub/karmaworld/issues/307#issuecomment-34038481 .

btbonval commented 10 years ago

Nope. I won't push anything I didn't test, and every time I get to a point I'm ready to test, something else breaks that I have to chase. It's like dominoes, and this is the last domino, and someone keeps putting more dominoes in the middle. This and #294 are linked together, and both are waiting for #320 now. I also put #316 in front of these, which is also waiting on #320.

btbonval commented 10 years ago

In fact I put #294 in front of this ticket. There's no point trying to moderate these if people can still add courses with schools and no department. I need to get the Add Course button fixed first (which is waiting on #320 and is a lesser priority than #316), then we can fix this.

AndrewMagliozzi commented 10 years ago

This ticket is done, right @btbonval ?

btbonval commented 10 years ago

Nope.

super button took priority. On Mar 18, 2014 4:43 PM, "Andrew Magliozzi" notifications@github.com wrote:

This ticket is done, right @btbonval https://github.com/btbonval ?

Reply to this email directly or view it on GitHubhttps://github.com/FinalsClub/karmaworld/issues/307#issuecomment-37985099 .

AndrewMagliozzi commented 10 years ago

@William-Bratches is there any way you can tackle this ticket (ideally with some remove guidance from Bryan), this week?

On Tue, Mar 18, 2014 at 4:51 PM, Bryan Bonvallet notifications@github.comwrote:

Nope.

super button took priority. On Mar 18, 2014 4:43 PM, "Andrew Magliozzi" notifications@github.com wrote:

This ticket is done, right @btbonval https://github.com/btbonval ?

Reply to this email directly or view it on GitHub< https://github.com/FinalsClub/karmaworld/issues/307#issuecomment-37985099>

.

Reply to this email directly or view it on GitHubhttps://github.com/FinalsClub/karmaworld/issues/307#issuecomment-37986115 .

btbonval commented 10 years ago

It should look more or less like CourseModerator and NoteModerator here: https://github.com/FinalsClub/karmaworld/blob/c6445ac14b23da2af3ff6b16664da66ef6db164a/karmaworld/apps/moderation/admin.py

CourseModerator no longer needs to list_display school or instructor_name, but does need to display department and professor.

DepartmentModerator and ProfessorModerator need to be created. They'll basically look like CourseModerator.

CourseModerator fields come from here: https://github.com/FinalsClub/karmaworld/blob/7f5ed18a2c8ca7cb7e766d50428c82d60002bc95/karmaworld/apps/courses/models.py#L209-L228 (note we only use a subset of fields)

DepartmentModerator will only need name, school, and url fields from Department: https://github.com/FinalsClub/karmaworld/blob/7f5ed18a2c8ca7cb7e766d50428c82d60002bc95/karmaworld/apps/courses/models.py#L92-L96

ProfessorModerator will need both fields from Professor: https://github.com/FinalsClub/karmaworld/blob/7f5ed18a2c8ca7cb7e766d50428c82d60002bc95/karmaworld/apps/courses/models.py#L137-L138

You can see the moderator page by making an admin account (python manage.py createsuperuser), then flip over to https://(whatever)/moderator where whatever is probably localhost:6659 if you're using VM with standard options, maybe it's somewhere else depending on your local config.

william-bratches commented 10 years ago

Even though I failed spectacularly on the commit, all my tickets are done - I'll work on this tomorrow.

william-bratches commented 10 years ago

Added department and professor panels with commit, e02007c2822f2cae371cef6b2bded3434dbc275c, also fixed some minor mistakes I made with 0148b823e82685c6b32bd6884e3b972278c9023f and 26474f8cb675eacadeae2685769516f379132b7a.