Exemplo n.º 1
0
        public static async Task ExecuteAuditAsync(string id, int type)
        {
            string bluePrintSubs = await HttpRequestor.MakeSimpleGetRequestAuth("https://byui.instructure.com/api/v1/courses/19272/blueprint_subscriptions");

            List <BluePrintSubscriptions> courses = JsonConvert.DeserializeObject <List <BluePrintSubscriptions> >(bluePrintSubs);
            string bluePrintID = courses[0].blueprint_course.id.ToString();

            System.Console.WriteLine(bluePrintID);
            //build group object for actual course
            List <List <Group> > groupList = await ObjectBuilder.BuildObjects(id, bluePrintID, type);

            System.Console.WriteLine();
        }
Exemplo n.º 2
0
        public static async Task <List <List <Group> > > BuildObjects(string copyCourseID, string bpID, int type)
        {
            //lets get the information for the copy course
            string ccGroupsStr = await HttpRequestor.MakeSimpleGetRequestAuth("https://byui.instructure.com/api/v1/courses/" + copyCourseID + "/groups");

            List <Group> ccGroups = JsonConvert.DeserializeObject <List <Group> >(ccGroupsStr);

            //lets get the information for the copy course
            string bpGroupsStr = await HttpRequestor.MakeSimpleGetRequestAuth("https://byui.instructure.com/api/v1/courses/" + bpID + "/groups");

            List <Group> BPGroups = JsonConvert.DeserializeObject <List <Group> >(bpGroupsStr);

            System.Console.WriteLine("Number of groups for CC = {0} and Number of groups for BPC = {1}", ccGroups.Count, BPGroups.Count);
            return(new List <List <Group> >()
            {
                ccGroups, BPGroups
            });
        }