Skip to content
Snippets Groups Projects
Verified Commit 1a54e183 authored by Christopher Bohn's avatar Christopher Bohn :thinking:
Browse files

Rubustified student tracking

parent 1df56e1a
No related branches found
No related tags found
No related merge requests found
{
"canvas course id": 167285,
"canvas course id": 179734,
"end of grading periods": [
"2024-02-23",
"2024-04-05",
"2024-05-10"
"2024-10-04",
"2024-11-08",
"2024-12-13"
],
"first semester": {
"teams": [
"UNL BSE Hebets",
"UNMC Nebraska Medicine"
"ALLO Fiber",
"Aulick Industries",
"Blue Cross Blue Shield of Nebraska",
"CLAAS",
"Compass North",
"DMSi",
"DPA Auctions",
"Farm Credit Services of America",
"Hinco",
"Kiewit",
"McCain Foods",
"Mutual of Omaha",
"Nebraska Public Media",
"Nebraska Trucking Association",
"Nebraska Water Center",
"Nelnet",
"Scoular",
"UNL COE Kiewit Hall",
"UNL Department of Special Education",
"UNL SoC Bohn",
"UNL SoC Falkinburg",
"UNL SoC Sharif",
"UNL SoC Yao",
"UNL State Museum",
"UNL University Operations",
"UNMC College of Nursing",
"UNO Department of Biology",
"Werner Enterprises"
],
"submission assignments": [
"Lab Report 1",
......@@ -19,38 +45,38 @@
"Team Performance (Grading Period 1)",
"Team Performance (Grading Period 2)",
"Team Performance (Grading Period 3)",
"Individual Performance (Grading Period 1)",
"Individual Performance (Grading Period 2)",
"Individual Performance (Grading Period 3)",
"Behaviors (Grading Period 1)",
"Behaviors (Grading Period 2)",
"Behaviors (Grading Period 3)",
"Professionalism and Respect (Grading Period 1)",
"Professionalism and Respect (Grading Period 2)",
"Professionalism and Respect (Grading Period 3)",
"Verbal Communication (Grading Period 1)",
"Verbal Communication (Grading Period 2)",
"Verbal Communication (Grading Period 3)",
"Written Communication (Grading Period 1)",
"Written Communication (Grading Period 2)",
"Written Communication (Grading Period 3)"
"Written Communication (Grading Period 3)",
"Workshop: Project Initiation",
"Workshop: Teaming",
"Workshop: Processes and Tools",
"Workshop: Story Mapping",
"Workshop: Risk Management",
"Workshop: Process Mapping",
"Workshop: Release Management",
"Workshop: Effective Feedback",
"Workshop: Testing",
"Workshop: CI/CD",
"Workshop: Transition"
]
},
"second semester": {
"teams": [
"Aulick Industries",
"CLAAS Omaha",
"Compass North",
"Crete Carrier",
"DMSi",
"Emerson",
"Farm Credit Services of America",
"Fast Forward",
"Firework Media Studio Xrenegades",
"Henderson State Bank",
"Mutual of Omaha",
"National Indemnity",
"Nebraska Water Center",
"Nelnet",
"Streck",
"UNL BSE Brown-Brandl",
"UNL SoC Falkinburg-Daniel",
"UNL SoC Liu",
"UNL SoC Ramamurthy",
"UNMC College of Nursing",
"USDA-NRCS",
"Werner Enterprises"
"UNL BSE Hebets",
"Nebraska Medicine"
],
"submission assignments": [
"Lab Report 4",
......@@ -61,9 +87,18 @@
"Team Performance (Grading Period 4)",
"Team Performance (Grading Period 5)",
"Team Performance (Grading Period 6)",
"Individual Performance (Grading Period 4)",
"Individual Performance (Grading Period 5)",
"Individual Performance (Grading Period 6)",
"Behaviors (Grading Period 4)",
"Behaviors (Grading Period 5)",
"Behaviors (Grading Period 6)",
"Professionalism and Respect (Grading Period 4)",
"Professionalism and Respect (Grading Period 5)",
"Professionalism and Respect (Grading Period 6)",
"Verbal Communication (Grading Period 4)",
"Verbal Communication (Grading Period 5)",
"Verbal Communication (Grading Period 6)",
"Written Communication (Grading Period 4)",
"Written Communication (Grading Period 5)",
"Written Communication (Grading Period 6)"
......@@ -74,15 +109,22 @@
"teams": "Entrepreneur",
"submission assignments": [],
"floating assignments": [
"Entrepreneur Behaviors (Grading Period 4)",
"Entrepreneur Behaviors (Grading Period 5)",
"Entrepreneur Behaviors (Grading Period 6)"
"Entrepreneur Behaviors (Grading Period 1)",
"Entrepreneur Behaviors (Grading Period 2)",
"Entrepreneur Behaviors (Grading Period 3)"
]
},
{
"teams": "PM Protege",
"teams": "Project Manager Protege",
"submission assignments": [],
"floating assignments": []
"floating assignments": [
"PM Protege Performance (Grading Period 1)",
"PM Protege Performance (Grading Period 2)",
"PM Protege Performance (Grading Period 3)",
"PM Protege Behaviors (Grading Period 1)",
"PM Protege Behaviors (Grading Period 2)",
"PM Protege Behaviors (Grading Period 3)"
]
},
{
"teams": "Research",
......@@ -92,51 +134,22 @@
"Researcher Behaviors (second grading period of the semester)",
"Researcher Behaviors (third grading period of the semester)"
]
},
{
"teams": "Tech Reviewer",
"submission assignments": [],
"floating assignments": [
"Tech Reviewer Behaviors (first grading period of the semester)",
"Tech Reviewer Behaviors (second grading period of the semester)",
"Tech Reviewer Behaviors (third grading period of the semester)"
]
}
],
"individual assignments": [
{
"description": "Individual Performance",
"select students": {
"students": [
"Matthew Lobmeyer"
],
"assignments": [
"PM Protege Performance (Grading Period 1)",
"PM Protege Performance (Grading Period 2)",
"PM Protege Performance (Grading Period 3)",
"PM Protege Behaviors (Grading Period 1)",
"PM Protege Behaviors (Grading Period 2)",
"PM Protege Behaviors (Grading Period 3)"
]
"students": [],
"assignments": []
},
"everybody else": [
"Individual Performance (first grading period of the semester)",
"Individual Performance (second grading period of the semester)",
"Individual Performance (third grading period of the semester)"
]
"everybody else": []
},
{
"description": "PM Protege Behaviors",
"select students": {
"students": [
"Sarah Oran",
"Han Tran"
],
"assignments": [
"PM Protege Behaviors (Grading Period 4)",
"PM Protege Behaviors (Grading Period 5)",
"PM Protege Behaviors (Grading Period 6)"
]
"students": [],
"assignments": []
},
"everybody else": []
},
......@@ -144,21 +157,48 @@
"description": "Verbal Communication",
"select students": [],
"everybody else": [
"Verbal Communication (first grading period of the semester)",
"Verbal Communication (second grading period of the semester)",
"Verbal Communication (third grading period of the semester)",
"Verbal Communication (across semester)"
"Verbal Communication (leads sponsor meeting)"
]
},
{
"description": "Professionalism",
"select students": [],
"everybody else": [
"Professionalism and Respect (first grading period of the semester)",
"Professionalism and Respect (second grading period of the semester)",
"Professionalism and Respect (third grading period of the semester)",
"Engagement and Participation (across semester)"
]
}
],
"manually add": [
{
"teams": "Entrepreneur",
"submission assignments": [],
"floating assignments": [
"Individual Performance (Grading Period 1)",
"Individual Performance (Grading Period 2)",
"Individual Performance (Grading Period 3)"
]
}
],
"manually excuse": [
{
"teams": ["Entrepreneur", "Project Manager Protege", "Research"],
"submission assignments": [],
"floating assignments": [
"Verbal Communication (leads sponsor meeting)"
],
"note": "probably could have made these students the 'select students' on 'Verbal Communication'"
}
],
"manually assign": [
"assign 486, 486H, 488, 488H to the ethics quizzes"
],
"missing": [
"performance for researcher",
"professionalism and respect for PM protege",
"professionalism and respect for researcher",
"communication for researcher",
"communication for PM protege",
"communication for entrepreneurs",
"second year helping out"
]
}
\ No newline at end of file
......@@ -67,7 +67,10 @@ class CompositeUser:
if self.canvas_user is None:
# self.canvas_user = CanvasUser(self.NUID) # n.b., can retrieve own user but not arbitrary user
all_students: List[CanvasUser] = CanvasCourse(Course.canvas_course_id).get_students()
self.canvas_user = list(filter(lambda s: s.get_username() == self.canvas_username, all_students))[0]
try:
self.canvas_user = list(filter(lambda s: s.get_username() == self.canvas_username, all_students))[0]
except IndexError:
print(f'*** WARNING *** Could not locate Canvas user for {self.canvas_username} among the {len(all_students)} students that were retrieved.')
# this still seems to be a teensy bit flaky
return self.canvas_user
......
......@@ -4,7 +4,8 @@ from deprecated import deprecated
from functools import reduce
from typing import ClassVar, Dict, Iterable, List, Optional, Set, Union
from gitlab import Gitlab, MAINTAINER_ACCESS
from gitlab import Gitlab#, MAINTAINER_ACCESS
from gitlab.const import MAINTAINER_ACCESS
from gitlab.v4.objects import Issue, Project, ProjectCommit, ProjectMilestone, User
from config import Config
......
......@@ -31,7 +31,7 @@ def extract_gitlab_usernames(student_responses: Dict[CanvasUser, str]) -> Dict[C
response: str = student_responses[student]
if response is None:
response = ''
candidate_username: List[str] = response.split()
candidate_username: List[str] = response.replace(' ', ' ').strip().split()
if len(candidate_username) == 1:
username: str = candidate_username[0]
if username[0] == '@':
......@@ -130,7 +130,8 @@ def create_cloning_script(user_repos: Dict[CompositeUser, Optional[GitlabProject
repo = user_repos[composite_student]
if repo is not None:
repo_url = repo.get_cloning_url()
student_name = composite_student.get_canvas_user().get_name().replace(' ', '_')
# student_name = composite_student.get_canvas_user().get_name().replace(' ', '_')
student_name = composite_student.get_name().replace(' ', '_')
file.write(f'git clone {repo_url} {student_name}')
if composite_student.gitlab_email is None: # breaking encapsulation?
file.write(' # may have inadequate permissions')
......@@ -141,7 +142,8 @@ def create_cloning_script(user_repos: Dict[CompositeUser, Optional[GitlabProject
file.write('\n# Students without homework repositories '
'(check for misspelled repository names or repositories created but not shared):\n')
for composite_student in no_repo:
student_name = composite_student.get_canvas_user().get_name().replace(' ', '_')
#student_name = composite_student.get_canvas_user().get_name().replace(' ', '_')
student_name = composite_student.get_name().replace(' ', '_')
file.write(f'# git clone {composite_student.get_gitlab_user().get_username()}/... {student_name}\n')
if len(no_username) > 0:
file.write('\n# Students without valid gitlab usernames (check for repositories shared but username not '
......@@ -157,7 +159,9 @@ def create_cloning_script(user_repos: Dict[CompositeUser, Optional[GitlabProject
if __name__ == '__main__':
course = CanvasCourse(Course.canvas_course_id)
canvas_course_id: int = int(input('What is the Canvas course ID? '))
# course = CanvasCourse(Course.canvas_course_id)
course = CanvasCourse(canvas_course_id)
print(f'Using course: {course}')
print('First, select the "setup" assignment to extract student information from.\n')
assignment_groups = course.get_assignment_groups()
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment