mirror of
https://codeberg.org/flpolyaplus/aplus.git
synced 2024-11-24 10:20:30 -05:00
fix merge conflict dropping commit
This commit is contained in:
parent
cbcc7631a4
commit
3fbd4dc645
@ -79,17 +79,17 @@ func init_aplus_toolid(course_id int) error {
|
|||||||
return errors.New("Could not find A+ link and tool ID")
|
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)
|
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)
|
canvas_courses := get_courses(token, all_courses, client)
|
||||||
|
|
||||||
if !onlyreturn {
|
if !onlyreturn {
|
||||||
|
|
||||||
for _, course := range canvas_courses {
|
for _, course := range canvas_courses {
|
||||||
fmt.Printf("%d, %s\n", course.ID%10000, course.Name)
|
fmt.Printf("%d, %s\n", course.ID%10000, course.Name)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
return canvas_courses
|
return canvas_courses
|
||||||
|
Loading…
Reference in New Issue
Block a user