daranzolin / rcanvas

R Client for Canvas LMS API
Other
90 stars 43 forks source link

Error when using get_course_gradebook #24

Open jingramgbr opened 6 years ago

jingramgbr commented 6 years ago

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)

daranzolin commented 6 years ago

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

daranzolin commented 6 years ago

@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?

jingramgbr commented 6 years ago

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

alopezespino commented 5 years ago

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.

ALittel-Fontys commented 4 years ago

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