Beispiel #1
0
        public async Task <bool> EnrollOrUnroll(_Class _class, bool clean = false)
        {
            var response = await HTMLUtils.PostString("/records/set-enrolled", string.Format("csrfmiddlewaretoken={0}&group={1}&enroll={2}", HTMLUtils.csrfToken, _class.enrollmentId, (!_class.IsSignedIn).ToString().ToLower()));

            var sigingResult = CoursesParsers.IsSignedIn(response, _class);

            return(sigingResult.Item1 != _class.IsSignedIn); //if differs, then some error must have occured
        }