                     @set_activity(id:id)
                     cb?()
 
+        copy_assignment: (type, assignment_id, student_id) =>
+            # type = assigned, collected, graded
+            switch type
+                when 'assigned'
+                    @copy_assignment_to_student(assignment_id, student_id)
+                when 'collected'
+                    @copy_assignment_from_student(assignment_id, student_id)
+                when 'graded'
+                    @return_assignment_to_student(assignment_id, student_id)
+                else
+                    @set_error("copy_assignment -- unknown type: #{type}")
+
+        open_assignment: (type, assignment_id, student_id) =>
+            # type = assigned, collected, graded
+            assignment = store.get_assignment(assignment_id)
+            student    = store.get_student(student_id)
+            student_project_id = student.get('project_id')
+            if not student_project_id?
+                @set_error("open_assignment: student project not yet created")
+                return
+            # Figure out what to open
+            switch type
+                when 'assigned' # where project was copied in the student's project.
+                    path = assignment.get('target_path')
+                    proj = student_project_id
+                when 'collected'   # where collected locally
+                    path = assignment.get('collect_path') + '/' + student.get('student_id')  # TODO: refactor
+                    proj = project_id
+                when 'graded'  # where project returned
+                    path = assignment.get('graded_path')  # refactor
+                    proj = student_project_id
+                else
+                    @set_error("open_assignment -- unknown type: #{type}")
+            if not proj?
+                @set_error("no such project")
+                return
+            # Now open it
+            flux.getProjectActions(proj).open_directory(path)
 
     actions = flux.createActions(name, CourseActions)
 

- [x] (1:00?) return all... button
- [x] (0:45?) (0:20)  counter for each page heading (num students, num assignments)

- [ ] (1:00?) link to grade each student
- [ ] (1:00?) buttons to assign to one student, collect from one, etc.

---
- [ ] (0:30?) when adding assignments filter out folders contained in existing assignment folders

- [ ] (0:45?) delete student; show deleted students; permanently delete students

AssignmentStudents = rclass
    displayName : "CourseEditor-AssignmentStudents"
    propTypes:
        name       : rtypes.string.isRequired
        flux       : rtypes.object.isRequired
        assignment : rtypes.object.isRequired
        students   : rtypes.object.isRequired
