             redux.getActions('projects').set_project_title(student_project_id, title)
 
         # start projects of all (non-deleted) students running
-        start_all_student_projects: () =>
+        action_all_student_projects: (action) =>
+            if action not in ['start', 'stop', 'restart']
+                throw Error("action must be start, stop or restart")
             get_store()?.get_students().map (student, student_id) =>
                 if not student.get('deleted')
                     # really only start non-deleted students' projects
                     student_project_id = student.get('project_id')
                     if student_project_id?
-                        redux.getActions('projects').start_project(student_project_id)
-            @start_shared_project()
+                        redux.getActions('projects')[action+"_project"](student_project_id)
+            @action_shared_project(action)
 
         set_all_student_project_titles: (title) =>
             actions = redux.getActions('projects')

    render_start_all_projects: ->
        r = @props.redux.getStore(@props.name).num_running_projects(@props.project_map)
        n = @props.redux.getStore(@props.name).num_students()

        <Panel header={<h4><Icon name='flash'/> Start all student projects</h4>}>
            <Row>
                <Col md=6>
                    <Button bsStyle='primary' onClick={@start_all_student_projects} disabled={n==r or n==0}><Icon name="flash"/> Start all student projects</Button>
                </Col>
                <Col md=6>
                    <div style={paddingTop: '10px'}>
                        {r} of {n} student projects are running.
                    </div>
                </Col>
            </Row>
            <hr/>
            <span style={color:'#666'}>
                <p>You may start all projects associated with this course so they are immediately ready for your students to use. For example, you might do this before a computer lab.
                </p>
            </span>
        </Panel>


    render_delete_all_projects: ->

            return x

        # start the shared project running (if it is defined)
        action_shared_project: (action) =>
            if action not in ['start', 'stop', 'restart']
                throw Error("action must be start, stop or restart")
            store = get_store()
            return if not store?
            shared_project_id = store.get_shared_project_id()
            if not shared_project_id
                return  # no shared project
            redux.getActions('projects')[action+"_project"]?(shared_project_id)

        # configure the shared project so that it has everybody as collaborators
        configure_shared_project: =>
