Skip to content

Commit e6c7fcf

Browse files
committed
Good night
1 parent a5274fe commit e6c7fcf

File tree

4 files changed

+65
-5
lines changed

4 files changed

+65
-5
lines changed

Makefile

+21-4
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,8 @@ dropdir/%:
6565
## Import TA marks (manual) and change empties to zeroes
6666
## This means you should add MSAFs as NAs before processing
6767
## Use named versions of marks.tsv (no revision control in Dropbox)
68+
## 2020 May 04 (Mon): Don't bother with versions in future;
69+
## docs has history in the unlikely event we need it
6870
## https://docs.google.com/spreadsheets/d/1nErh7vg1PfOS3CYmZu5tQIjT-_Hsyi77S17zh4ZzeRQ/edit#gid=728284690
6971
## downcall dropdir/marks8.tsv ##
7072
Ignore += marks.tsv
@@ -156,7 +158,7 @@ Sources += testnotes.txt
156158
######################################################################
157159

158160
## avenueMerge
159-
## Still developing
161+
## Still developing; right now I post things one at a time
160162
## Code that takes a whole spreadsheet to Avenue still in Tests/
161163

162164
## Put the final marking thing in a form that avenueMerge will understand
@@ -171,6 +173,9 @@ midterm%.grade.Rout: midterm%.merge.Rout finalscore.R
171173
final.grade.Rout: final.patch.Rout finalscore.R
172174
$(run-R)
173175

176+
course.grade.Rout: course.Rout courseGrade.R
177+
$(run-R)
178+
174179
## Do the same for an assignment (COVID!)
175180
## assign3.grade.Rout: assignscore.R
176181
.PRECIOUS: assign%.grade.Rout
@@ -191,6 +196,7 @@ Ignore += *.avenue.Rout.csv
191196
## but then we'd have to worry about the logic set up for posting more than
192197
## one score at once (which we don't use anyway)
193198

199+
## course.grade.avenue.csv: avenueNA.pl
194200
## final.grade.avenue.csv: avenueNA.pl
195201
## midterm2.grade.avenue.csv: avenueNA.pl
196202
## assign3.grade.avenue.csv: avenueNA.pl
@@ -203,6 +209,12 @@ Ignore += *.avenue.csv
203209

204210
######################################################################
205211

212+
## Code pledges
213+
214+
code.Rout:
215+
216+
######################################################################
217+
206218
## Polls
207219

208220
## Get PollEverywhere data:
@@ -272,19 +284,24 @@ course.Rout: gradeFuns.Rout tests.Rout pollScorePlus.Rout TAmarks.Rout course.R
272284
## Mosaic
273285

274286
## Go to course through faculty center
287+
## https://epprd.mcmaster.ca/psp/prepprd/EMPLOYEE/SA/c/SA_LEARNING_MANAGEMENT.SS_FACULTY.GBL?pslnkid=MCM_WC_FCLT_CNTR
275288
## You can download as EXCEL (upper right of roster display)
276289
## and upload as CSV
277290

278291
## downcall dropdir/mosaic.xls ## Insanity! This is an html file that cannot be read by R AFAICT, even though it opens fine in Libre ##
279292
## downcall dropdir/mosaic.csv
293+
## It would be better to change some of the code here and keep the
294+
## student numbers as strings
280295

281-
## Check class number
296+
## CHECK class number (needs to be cribbed from Mosaic and entered here)
282297
## Check dropCandidates in Rout
283-
## mosaic_grade.Rout.csv: mosaic_grade.R
298+
284299
mosaic_grade.Rout: dropdir/mosaic.csv course.Rout mosaic_grade.R
300+
## mosaic_grade.Rout.csv: mosaic_grade.R
301+
285302
## Upload this .csv to mosaic
286303
## Faculty center, online grading tab
287-
## ~/Downloads/grade_guide.pdf
304+
## ~/Downloads/grade_guide.pdf ##
288305
## There is no guidance about students with incomplete marks; let's see what happens
289306

290307
## Copy grades to dropdir for diffing:

course.R

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
## 1000 for no balance
44
downgrade <- 0
55
examRho <- 1.3 ## odds curve for final
6-
offset <- 0.5 ## 0 to round down
6+
offset <- 0.999 ## 0 to round down
77
testwt <- c(25, 25, 40)
88
asntot <- c(16, 12, 10)
99

courseGrade.R

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
library(dplyr)
2+
3+
## target parsing not implemented yet because transmute syntax
4+
scores <- (course
5+
%>% transmute(idnum, courseFinal_score=courseGrade)
6+
)
7+
8+
# rdsave(scores)

mosaic_grade.R

+35
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
library(dplyr)
2+
library(readr)
3+
4+
Class <- 10646
5+
6+
roster <- read_csv(input_files[[1]])
7+
names(roster) <- gsub(" ", "_", names(roster))
8+
9+
summary(course)
10+
course <- (course
11+
%>% mutate(idnum = gsub("#", "", idnum)
12+
, courseGrade=courseGrade
13+
)
14+
)
15+
16+
summary(course)
17+
18+
summary(roster)
19+
20+
## This mutate seems bad; if we could read the csv as strings in the first place it would be better.
21+
## Check strings as factors if you do that
22+
roster <- (roster
23+
%>% mutate(idnum=sprintf("%09d", as.numeric(ID)))
24+
%>% left_join(course)
25+
%>% filter(final.test > 0)
26+
%>% transmute(Class=Class, idnum, mark=courseGrade)
27+
) %>% write_csv(csvname, col_names=FALSE)
28+
29+
summary(roster)
30+
31+
print(dropCandidates <- roster %>% filter(is.na(mark)))
32+
33+
(roster
34+
%>% filter(!is.na(mark))
35+
) %>% write_csv(csvname, col_names=FALSE)

0 commit comments

Comments
 (0)