aboutsummaryrefslogtreecommitdiff
path: root/toBlackboardCSV.py
diff options
context:
space:
mode:
Diffstat (limited to 'toBlackboardCSV.py')
-rwxr-xr-xtoBlackboardCSV.py11
1 files changed, 11 insertions, 0 deletions
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)