Generates groups of four or two based on similar progress, different progress or randomly. Call the gem from the command line with the follow commands, and give it the batch id number of your class. For example, Web-1115 is batch 168:
work-together pairs --random 168
Gem sends request to Learn API endpoint of a given batch, parses payload into csv, uses csv to generate collection of Student objects and groups those students according to specification.
gem install work_together
work-together pairs --random batch-number
work-together tables --random batch-number
work-together pairs --mindful batch-number
work-together tables --mindful batch-number
work-together pairs --progress batch-number
work-together tables --progress batch-number
Using the gem in another project
Public-facing code is
- Initialize with an argument of the batch id number
- Generate groups from CSV with the
#generate_togethernessmethod. This method takes in two arguments:
wt = WorkTogether::Generator.new(168) wt.generate_togetherness(["pairs", "--random"], "quiet")`
- First argument of
#generate_togethernessis an array that contains the following options: first element-
"pairs", "random", "mindful", second element -
"--random", "--mindful", "--progress".
- Third argument is optional, defaults to
"quiet"if you don't wan't to
putsout resulting groups to the terminal.
- To generate a batch, i.e. a collection of
WorkTogether::Studentobjects, without then generating groups, use the
wt = WorkTogether::Generator.new(168) wt.make_batch => [#<WorkTogether::Student:0x007fbd6b4341c8 @active_track="Web Development Immersive 2016", @completion="201", @email="firstname.lastname@example.org", @first_name="Asia", @github_username="asialindsay", @last_name="Lindsay">, #<WorkTogether::Student:0x007fbd6b42fd58 @active_track="Web Development Immersive 2016", @completion="201", @email="email@example.com", @first_name="Chris", @github_username="cmc33", @last_name="McGuigan">, ...]
- Currently, Students have first and last names, active track (i.e. batch), completion (number of labs and readings they have finished, aliased via a
#progressmethod), email and Github username.