GroupEngAssign

Invoke Package Group Eng to Assign Students in Groups

source

AssignGroup

 AssignGroup (ghg:CanvasGroupy.github.GitHubGroup,
              cg:CanvasGroupy.canvas.CanvasGroup, groupeng_config='')

Initializer for Assign Group

Type Default Details
ghg GitHubGroup authenticated GitHub object
cg CanvasGroup authenticated canvas object
groupeng_config str Directory for the GroupEng config yml file

API


source

AssignGroup.assign_groups

 AssignGroup.assign_groups (groupeng_config:str,
                            assign_canvas_group=False,
                            create_gh_repo=False, username_quiz_id=-1,
                            in_group_category='', suffix='')
Type Default Details
groupeng_config str Directory for the GroupEng config yml file
assign_canvas_group bool False directly assign canvas groups
create_gh_repo bool False directly create GitHub repos
username_quiz_id int -1 username quiz id from canvas course
in_group_category str specify which group category the group belongs to
suffix str suffix to the group name
Returns (<class ‘bool’>, <class ‘str’>) Status and output directory of the compiled file.

source

AssignGroup.create_canvas_group

 AssignGroup.create_canvas_group (in_group_category='', suffix='')

Create canvas groups based on the generated group configuration

Type Default Details
in_group_category str specify which group category the group belongs to
suffix str suffix to the group name

source

AssignGroup.create_github_group

 AssignGroup.create_github_group (username_quiz_id:int)
Type Details
username_quiz_id int username quiz id from canvas course
# Create authenticated objects
ghg = GitHubGroup("../../../credentials.json",
                 "COGS118A"
                 )
cg = CanvasGroup("../../../credentials.json",
                 course_id=45532,
                 )
# create assign group object
ag = AssignGroup(ghg, cg)
Successfully Authenticated. GitHub account:  scott-yj-yang 
Target Organization Set:  COGS118A 
Authorization Successful!
Course Set:  COGS 195 - Instructional Apprenticeship - Fleischer [SP23] 
Getting List of Users... This might take a while...
Users Fetch Complete! The course has 5 students.
# create a group category to hold students
cg.create_group_category({"name": "Project 1"})
GroupCategory(_requester=<canvasapi.requester.Requester object>, id=16456, name=Project 1, role=None, self_signup=None, group_limit=None, auto_leader=None, created_at=2023-05-17T20:38:56Z, created_at_date=2023-05-17 20:38:56+00:00, context_type=Course, course_id=45532, groups_count=0, unassigned_users_count=5, protected=False, allows_multiple_memberships=False, is_member=False)
# assign, create both Canvas and GitHub Group in one call
status, out_dir = ag.assign_groups("../data/195_group_specification.groupeng",
                                   assign_canvas_group=True,
                                   create_gh_repo=True,
                                   username_quiz_id=139925,
                                   in_group_category="Project 1",
                                   suffix="-SP23-Testing"
                                   )
['H', 'B', '-']
['B', 'H', '-']
['-', 'H', 'B']
['B', 'H', '-']
['B', '-', 'H']
['-', 'B', 'H']
[None, 3.9, 3.1]
[3.9, 3.1, None]
[3.4, 2.5, 2.1]
[3.9, None, 3.1]
[3.4, 2.1, 2.5]
[3.4, 2.1, 2.5]
In Group Set: Project 1,
Group Group1-SP23-Testing Created!
Member dol005 Joined group Group1-SP23-Testing
Member xiw013 Joined group Group1-SP23-Testing
In Group Set: Project 1,
Group Group2-SP23-Testing Created!
Member jiz088 Joined group Group2-SP23-Testing
Member jiz100 Joined group Group2-SP23-Testing
Member nmackler Joined group Group2-SP23-Testing
Quiz: GitHub Username fetch! 
Generating Student Analaysis...
[====================] 100%
Report Generated!
The Question asked is 1399692: In plain text, what is your GitHub Username? Absolutely no typo, no extra space, no hyperlink please.. 
Make sure this is the correct question where you asked student for their GitHub id.
If you need to change the index of columns, change the col_index argument of this call.
dol005's GitHub Username not found
xiw013's GitHub Username not found
Repo  Group1-SP23-Testing  Created... Wait for 3 sec to updates
File Successfully Renamed from   Checkpoint_groupXXX.ipynb   to  Checkpoint_Group1-SP23-Testing.ipynb 
File Successfully Renamed from   FinalProject_groupXXX.ipynb   to  FinalProject_Group1-SP23-Testing.ipynb 
File Successfully Renamed from   Proposal_groupXXX.ipynb   to  Proposal_Group1-SP23-Testing.ipynb 
Team  Instructors_Sp23  added to  Group1-SP23-Testing  with permission  admin 
Group Repo:  Group1-SP23-Testing  successfuly created!
Repo URL: https://github.com/COGS118A/Group1-SP23-Testing

jiz100's GitHub Username not found
jiz088's GitHub Username not found
Repo  Group2-SP23-Testing  Created... Wait for 3 sec to updates
File Successfully Renamed from   Checkpoint_groupXXX.ipynb   to  Checkpoint_Group2-SP23-Testing.ipynb 
File Successfully Renamed from   FinalProject_groupXXX.ipynb   to  FinalProject_Group2-SP23-Testing.ipynb 
File Successfully Renamed from   Proposal_groupXXX.ipynb   to  Proposal_Group2-SP23-Testing.ipynb 
Added Collaborator:  nmackler  to:  Group2-SP23-Testing  with permission:  write 
Team  Instructors_Sp23  added to  Group2-SP23-Testing  with permission  admin 
Group Repo:  Group2-SP23-Testing  successfuly created!
Repo URL: https://github.com/COGS118A/Group2-SP23-Testing

The false means that at least one requirement is not satisfied. We can take a look at the file that was generated.