Add "instructor" mode to Sonar.

Review Request #7930 — Created Jan. 30, 2016 and submitted

Information

student-sonar
master
8132d61...

Reviewers

This change adds a new "type" field to users which can be one of "student",
"mentor", or "instructor". Mentors are still the superusers of the system,
and instructors are a limited class where they can see all the other users
within their own groups but cannot see anyone else, and cannot make changes.

  • Set myself to be an instructor and joined one of our active groups. Saw
    everything that I expected to.
  • Set myself to be a student and saw the limited student view.
Description From Last Updated

Might as well just use isMentor || isInstructor here.

mike_conleymike_conley
reviewbot
  1. Tool: Pyflakes
    Ignored Files:
        lib/frontend/application.js
        lib/frontend/header-view.js
        lib/frontend/user-detail-view.js
        lib/api.js
        lib/frontend/sidebar-view.js
        lib/frontend/calendar-view.js
        lib/frontend/application-view.js
        views/main.handlebars
        lib/routes.js
        lib/schema.js
        lib/frontend/models.js
    
    
    
    Tool: PEP8 Style Checker
    Ignored Files:
        lib/frontend/application.js
        lib/frontend/header-view.js
        lib/frontend/user-detail-view.js
        lib/api.js
        lib/frontend/sidebar-view.js
        lib/frontend/calendar-view.js
        lib/frontend/application-view.js
        views/main.handlebars
        lib/routes.js
        lib/schema.js
        lib/frontend/models.js
    
    
  2. 
      
mike_conley
  1. So how are the types assigned? Mentors used to be in the mentors group, but that doesn't look to be the case anymore... is this a matter of just flipping a thing in the DB for now?

    1. Yeah, it's just something I can set in the UI that MongoLab provides. I'll add a TODO for creating a drop-down in sonar.

  2. lib/frontend/application-view.js (Diff revision 1)
     
     
     
    Show all issues

    Might as well just use isMentor || isInstructor here.

  3. 
      
david
reviewbot
  1. Tool: PEP8 Style Checker
    Ignored Files:
        lib/frontend/application.js
        lib/frontend/header-view.js
        lib/frontend/user-detail-view.js
        lib/api.js
        lib/frontend/sidebar-view.js
        lib/frontend/calendar-view.js
        lib/frontend/application-view.js
        views/main.handlebars
        lib/routes.js
        lib/schema.js
        lib/frontend/models.js
    
    
    
    Tool: Pyflakes
    Ignored Files:
        lib/frontend/application.js
        lib/frontend/header-view.js
        lib/frontend/user-detail-view.js
        lib/api.js
        lib/frontend/sidebar-view.js
        lib/frontend/calendar-view.js
        lib/frontend/application-view.js
        views/main.handlebars
        lib/routes.js
        lib/schema.js
        lib/frontend/models.js
    
    
  2. 
      
mike_conley
  1. I assume in your testing you also made sure that as a Mentor you saw the right things?

  2. 
      
david
Review request changed
Status:
Completed
Change Summary:
Pushed to master (0efcf25)