Exemplo n.º 1
0
        public async Task <ActionResult> AddAssignment()
        {
            AssignmentsApiAddModel model = new AssignmentsApiAddModel();

            model.AssignmentDate     = DateTime.Now;
            model.AssignmentType     = "Homework";
            model.AssignmentTypeId   = 1;
            model.CourseOfferingId   = 1;
            model.Title              = "Added from Cloasis App";
            model.MaxPoints          = 100;
            model.Weight             = (0.142857f);
            model.isGraded           = true;
            model.DisplayOrder       = 200;
            model.isGroupAssignment  = false;
            model.ShortTitle         = "HW1-1234";
            model.ParentAssignmentId = 0;
            model.GradeFormula       = null;
            var result = await client.AddNew(model);

            return(View());
        }
Exemplo n.º 2
0
        public async Task <AssignmentsResponse.AddResponse> AddNew(AssignmentsApiAddModel model)
        {
            var response = await PostEncodedContent <AssignmentsResponse.AddResponse, DefaultResponseApiModel, AssignmentsApiAddModel>(createUri, model);

            return(response);
        }