From 3fbd4dc64502918c91d30632a84110b128cc5b90 Mon Sep 17 00:00:00 2001 From: vin Date: Fri, 12 Jan 2024 17:28:49 -0500 Subject: [PATCH] fix merge conflict dropping commit --- canvas.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/canvas.go b/canvas.go index 356a3a2..7020658 100644 --- a/canvas.go +++ b/canvas.go @@ -79,17 +79,17 @@ func init_aplus_toolid(course_id int) error { return errors.New("Could not find A+ link and tool ID") } -func list_all_courses() { +func list_all_courses(onlyreturn bool) []CanvasCourse { all_courses := fmt.Sprintf("%s/courses?access_token=%s&enrollment_state=active&per_page=100", base_link, token) canvas_courses := get_courses(token, all_courses, client) if !onlyreturn { - for _, course := range canvas_courses { fmt.Printf("%d, %s\n", course.ID%10000, course.Name) } + return nil } return canvas_courses