Esempio n. 1
0
        //get a progress object
        private async Task <Progress> GetProgressAsync(string userid, string contentid)
        {
            var progressServices = new ProgressServices();
            var response         = await progressServices.GetProgress(userid, contentid);

            return(response);
        }
        //get or set a progress object for assessment
        private async Task GetAssessmentProgressAsync(string userid, string contentid)
        {
            var progressServices = new ProgressServices();
            var message          = await progressServices.GetProgressBool(userid, contentid);

            if (message)
            {
                //-->if record existed
                progress = await progressServices.GetProgress(userid, contentid);
            }
            else
            {
                //-->if record not exist
                progress = new Progress(userid, contentid, "NA", "0", DateTime.Now);
            }
        }