apis/piazza_api.rb
# Add an instructor with login of type role to the course with class_id
Add an instructor with login of type role to the course with class_id
Add an instructor with login of type role to the course with class_id
def add_instructor(class_id, role, login)
    type = @roles[role]
    return nil if !type
    post_data = {
      "method": "network.update",
      "params": { "from": "ClassSettingsPage",
                  "add_#{type}": "#{login}@#{@mail_extn}",
                  "id": class_id
              }
    }
    self.apiCall(post_data)
    sleep(10)
  end
def add_instructor ( class_id , role , login ) type = @roles [ role ] return nil if ! type post_data = { "method" : "network.update" , "params" : { "from" : "ClassSettingsPage" , "add_#{type}" : "#{login}@#{@mail_extn}" , "id" : class_id } } self . apiCall ( post_data ) sleep ( 10 ) end
Add an instructor with login of type role to the course with class_id
Add an instructor with login of type role to the course with class_id
class_id
<not_specific>
role
<not_specific>
login
<not_specific>