rcanvas icon indicating copy to clipboard operation
rcanvas copied to clipboard

Error when using get_course_gradebook

Open jingramgbr opened this issue 7 years ago • 5 comments

I'm receiving this error when using get_course_gradebook.

Error: by can't contain join column user_id which is missing from LHS

It appears to be in this sequence.

gradebook <- purrr::map_df(seq_len(n_pages), function(page) { submissions <- purrr::pmap_dfr(list(course_id, course_assignments$id, page), get_assignment_submissions) gradebook_page <- dplyr::left_join(submissions, students, by = "user_id") %>% dplyr::left_join(course_assignments %>% dplyr::select(id, assignment_name = name), by = c("assignment_id" = "id")) return(gradebook_page)

jingramgbr avatar Apr 14 '18 03:04 jingramgbr

Thanks Jeff, I'm planning on setting time aside this weekend to dig into this and hopefully add some other features.

daranzolin avatar Apr 19 '18 17:04 daranzolin

@jingramgbr I think I've managed to reproduce this error. As far as I can tell, it occurs when there are no published assignments within a course. Can you confirm otherwise?

daranzolin avatar Apr 21 '18 22:04 daranzolin

Thanks for looking. We do have published assignments, might be that it isn't pulling through those assignments.

jingramgbr avatar Apr 26 '18 18:04 jingramgbr

Hi @jingramgbr and @daranzolin,

I have the same problem and after digging a little bit I think the issue (at least in my case) is that the assignments where submitted in groups, so the submissions data frame does not have the user_id column, but has an assignment_group_id column instead.

alopezespino avatar Jan 16 '19 07:01 alopezespino

I have the same problem with one course. But with three other courses, it works fine. Those courses have group assignments.....

ALittel-Fontys avatar Feb 04 '20 14:02 ALittel-Fontys