From 9aea1f65dc70be3d2ed889caa64c2f4072bdfcc4 Mon Sep 17 00:00:00 2001 From: "Eugeniy E. Mikhailov" Date: Wed, 23 Oct 2024 23:10:46 -0400 Subject: remove non gradeable columbs for export to BlackBoard --- toBlackboardCSV.py | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'toBlackboardCSV.py') diff --git a/toBlackboardCSV.py b/toBlackboardCSV.py index 250da74..3694edc 100755 --- a/toBlackboardCSV.py +++ b/toBlackboardCSV.py @@ -27,4 +27,15 @@ dOut = dOut.loc[ dOut['GroupName'].isin(['student']) ] infoCol=['FirstName', 'LastName', 'GroupName', 'UserHiddenColums', 'UserHiddenGroups', 'UserHiddenGradeCategories', 'SectionNum', 'IdNum'] dOut = dOut.drop(infoCol, axis=1) +# drop non gradable columns +cCat = (dIn['UserName'] == '_Col_Category_') +colToDrop = [] +for c in dOut.columns: + if c == 'Username': + continue + category = dIn[cCat][c][0] + if category not in ['HomeWork', 'MidTerm', 'FinalExam', 'weighted_column']: + colToDrop.append(c) +dOut = dOut.drop(colToDrop, axis=1) + dOut.to_csv('BlackBoard.csv', index=False) -- cgit v1.2.3