public async Task<bool> UpdateCourseUser(CourseUserUpdateRequest request)
 {
     try
     {
         HttpResponseMessage httpResp = apiCom.executePutAPI("CourseUser", JsonConvert.SerializeObject(request));
         if (httpResp.IsSuccessStatusCode)
         {
             return true;
         }
         else
         {
             return false;
         }
     }
     catch
     {
         return false;
     }
 }
 public async Task<ActionResult> JoinACourse(DisplayCourseModel Model)
 {
     if(ModelState.IsValid)
     {
         StringBuilder answerSet = new StringBuilder();
         foreach(var question in Model.Questions)
         {
             if(!string.IsNullOrWhiteSpace(question.selectedAnswer))
             {
                 answerSet.Append(question.selectedAnswer + ",");
             } 
         }
         answerSet.Remove(answerSet.Length - 1, 1);
         CourseUserUpdateRequest cuur = new CourseUserUpdateRequest()
         {
             email = MvcApplication.userEmail,
             courseCode = Model.CourseCode,
             RoleCode = "Student",
             answerSet = answerSet.ToString()
         };
         bool result = _courseUserCom.UpdateCourseUser(cuur).Result;
         if(result)
         {
             MvcApplication.courses.Add(Model.CourseCode, Model.CourseName);
             MvcApplication.courseDescription.Add(Model.CourseCode, Model.CourseDescription);
             return RedirectToAction("Student", "Course");
         }
         else
         {
             ModelState.AddModelError("", "Oops! Something wrong happened! Please try again.");
             return View(Model);
         }
     }
     ModelState.AddModelError("", "Oops! Something wrong happened! Please try again.");
     return View(Model);
 }