Giter VIP home page Giter VIP logo

edx_replace_staff's Introduction

edx_replace_staff

Adds and/or removes staff in multiple edX courses at once. Can also be run with the --list option to only create a list of who's staff where rather than making changes.

Using this script requires a CSV file with the following headers. You can find an example csv file in the test folder.

  • URL - the address of class' Course Team Settings page.
  • Add - the e-mail addresses of the staff to be added.
  • Promote - promotes an existing staff member to Admin.
  • Remove - removes staff from the course, regardless of whether they're currently Admin or not.
  • Demote - removes Admin status, but leaves the user as staff.

When you have multiple people in any of these categories, space-separate them. You can find an example in the test folder.

Chrome Web Driver

This repo includes a Mac version of the Chrome webdriver, which is licensed under the a separate set of terms. If you need a different version of the driver you'll have to replace that file (using the same name).

Since chromedriver is not a signed Mac application it will throw a warning the first time you run it. Go to System Preferences --> Security and Privacy and tell it to open anyway. You should be able to

Instructions

To install and use for the first time:

# clone this repo
$> git clone https://github.com/Colin-Fredericks/edx_replace_staff.git

# create a virtualenv and activate it
$> python3 -m venv edxstaff
$> source edxstaff/bin/activate
(edxstaff) $>

# install requirements
(edxstaff) $> cd hx_util
(edxstaff) $> pip3 install -r requirements.txt

# install hx_util
(edxstaff) $> pip3 install .

# to add or remove staff
(edxstaff) $> edx_replace_staff /path/to/input/csv

# when done
(edxstaff) $> deactivate

On later runs you can do a simpler version:

$> source edxstaff/bin/activate (edxstaff) $> edx_replace_staff /path/to/input/csv (edxstaff) $> deactivate

Run the whole process from the top if you need to reinstall (for instance, if the script and/or its requirements change).

Command-line options:

  • -h or --help: print the instructions and quit.
  • -l or --list: list staff in each course, make no changes.
  • -v or --visible: run with a visible browser instead of a headless one.

edx_replace_staff's People

Contributors

colin-fredericks avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.