/// <summary>
        /// ExecuteCommand
        /// </summary>
        /// <param name="pCommand"></param>
        /// <returns></returns>
        public static int ExecuteCommand(SqlCommand pCommand)
        {
            string        sqlConnectionStr = string.Empty;
            SqlConnection sqlcon           = null;
            int           iRowIns;

            try
            {
                sqlConnectionStr    = EncryptionManager.Decrypt(ConnectionStringForError);
                sqlcon              = new SqlConnection(sqlConnectionStr);
                pCommand.Connection = sqlcon;
                sqlcon.Open();
                iRowIns = pCommand.ExecuteNonQuery();
            }
            catch (Exception exc)
            {
                throw exc;
            }
            finally
            {
                pCommand.Dispose();
                if (sqlcon.State != ConnectionState.Closed)
                {
                    sqlcon.Close();
                }
            }
            return(iRowIns);
        }
        //public static bool IsSSL()
        //{
        //    bool isSSL;
        //    string strSSLHeaderName = "HTTP_" + ConfigurationManager.AppSettings["SSLHeader_name"];
        //    string strSSLHeaderTrue = ConfigurationManager.AppSettings["SSLHeader_true"];

        //    if (HttpContext.Current.Request.ServerVariables[strSSLHeaderName] != null)
        //    {
        //        isSSL = HttpContext.Current.Request.ServerVariables[strSSLHeaderName] == strSSLHeaderTrue;
        //    }
        //    else
        //    {
        //        isSSL = HttpContext.Current.Request.IsSecureConnection;
        //    }

        //    return isSSL;
        //}

        public static string DecodeAndDecrypt(string encryptedValue)
        {
            var decodedValue = HttpContext.Current.Server.UrlDecode(encryptedValue);

            decodedValue = decodedValue.Replace(" ", "+");
            return(EncryptionManager.Decrypt(decodedValue));
        }
Exemplo n.º 3
0
 public string GetError(string LangId, string ClientId)
 {
     try
     {
         ClientId = EncryptionManager.Decrypt(ClientId);
         string msg = "COURSE_INTERNET_CONNECTION_ERROR";// MessageAdaptor.GetMessage(Services.Messages.ContentModule.COURSE_INTERNET_CONNECTION_ERROR, LangId, ClientId);
         return(string.IsNullOrEmpty(msg) ? "Internet Connection error" : msg);
     }
     catch
     {
         return("Internet Connection error");
     }
 }
        protected void Page_Load(object sender, EventArgs e)
        {
            if (Request.HttpMethod == "GET")
            {
                ////if (LMSSession.IsInSession(Client.CLIENT_SESSION_ID))
                ////    hdnClientId.Value = EncryptionManager.Encrypt(Convert.ToString(LMSSession.GetValue(Client.CLIENT_SESSION_ID)));

                if (LMSSession.IsInSession(ContentKeys.SESSION_ACTIVITYID))
                {
                    hdnContentModuleId.Value = EncryptionManager.Encrypt(Convert.ToString(LMSSession.GetValue(ContentKeys.SESSION_ACTIVITYID)));
                    courseId = Convert.ToString(LMSSession.GetValue(ContentKeys.SESSION_ACTIVITYID));
                }
                if (LMSSession.IsInSession(ContentKeys.SESSION_LEARNER_ID))
                {
                    hdnUserId.Value = EncryptionManager.Encrypt(Convert.ToString(LMSSession.GetValue(ContentKeys.SESSION_LEARNER_ID)));
                    learnerId       = Convert.ToString(LMSSession.GetValue(ContentKeys.SESSION_LEARNER_ID));
                }
                hdnCStartDate.Value = Convert.ToString(DateTime.UtcNow);
                return;
            }
            var    requestXml = LoadRequestXml();
            XMLLib xLib       = new XMLLib();

            if (requestXml == null)
            {
                Response.Redirect("DisplayError.aspx?error=SessionTimeout");
            }
            //sClientId = CommonManager.DecodeAndDecrypt(xLib.fGetValue(requestXml, "/Root/ClientId"));
            sessionId = xLib.fGetValue(requestXml, "/Root/SessionId");
            courseId  = EncryptionManager.Decrypt(Convert.ToString(hdnContentModuleId.Value));

            if (LMSSession.IsInSession(ContentKeys.SESSION_LEARNER_ID))
            {
                hdnUserId.Value = EncryptionManager.Encrypt(Convert.ToString(LMSSession.GetValue(ContentKeys.SESSION_LEARNER_ID)));
                learnerId       = Convert.ToString(LMSSession.GetValue(ContentKeys.SESSION_LEARNER_ID));
            }



            if (requestXml != null)
            {
                XmlNode oRootNode = null;

                if (xLib.fCreateFirstContext(requestXml, "Root", ref oRootNode))
                {
                    string useCase = xLib.fGetValue(requestXml, "/Root/Case");
                    ProcessRequest(requestXml, useCase);
                }
            }
        }
        public void CoursePlayerErrorLog()
        {
            try
            {
                string strContentModuleId = string.Empty;
                string strClientId        = string.Empty;
                string strSystemUserGUID  = "";

                DateTime d1;
                DateTime.TryParse(Convert.ToString(hdnCStartDate.Value), out d1);
                DateTime d2 = DateTime.UtcNow;
                TimeSpan ts = d2 - d1;

                if (string.IsNullOrEmpty(strClientId) && !string.IsNullOrEmpty(hdnClientId.Value))
                {
                    strClientId = EncryptionManager.Decrypt(hdnClientId.Value);
                }

                if (string.IsNullOrEmpty(strClientId) && !string.IsNullOrEmpty(hdnContentModuleId.Value))
                {
                    strContentModuleId = EncryptionManager.Decrypt(hdnContentModuleId.Value);
                }
                if (string.IsNullOrEmpty(strClientId) && !string.IsNullOrEmpty(hdnUserId.Value))
                {
                    strSystemUserGUID = EncryptionManager.Decrypt(hdnUserId.Value);
                }

                string        _strMessageId = "Course Session Expired";
                StringBuilder sb            = new StringBuilder();
                sb.Append("Course Start Date time : " + hdnCStartDate.Value);
                sb.Append(" Error Log Date time : " + DateTime.UtcNow);
                sb.Append(" ClientId : " + strClientId);
                sb.Append(" LoginName : " + strSystemUserGUID);
                sb.Append(" CourseId : " + strContentModuleId);
                sb.Append(" FunctionName :  Course Player");
                sb.Append(" Duration in Minutes : " + ts.TotalMinutes);
                sb.Append(" Error :  Session expired at course player launch.");
                sb.Append(" Error from page:  /CoursePlayer/ControlFrame.aspx.");

                Exception expCommon = new Exception(sb.ToString());

                //var _expCustom = new CustomException(_strMessageId, CustomException.WhoCallsMe(), ExceptionSeverityLevel.Critical, expCommon, true);
            }
            catch
            {
            }
        }
        /// <summary>
        /// This method does not Fill Child List
        /// </summary>
        /// <param name="pSqlReader"></param>
        /// <returns>Learner</returns>
        public Learner FillUserObject(SqlDataReader pSqlReader, bool pRangeList, SQLObject pSqlObject)
        {
            _entLearner = new Learner();
            //UserCustomFieldValue entUserCustomFieldValue;
            int index;

            if (pSqlReader.HasRows)
            {
                index = pSqlReader.GetOrdinal(Schema.Learner.COL_USER_ID);
                if (!pSqlReader.IsDBNull(index))
                {
                    _entLearner.ID = pSqlReader.GetString(index);
                }

                index = pSqlReader.GetOrdinal(Schema.Learner.COL_FIRST_NAME);
                if (!pSqlReader.IsDBNull(index))
                {
                    _entLearner.FirstName = pSqlReader.GetString(index);
                }
                else
                {
                    _entLearner.FirstName = "";
                }

                index = pSqlReader.GetOrdinal(Schema.Learner.COL_MIDDLE_NAME);
                if (!pSqlReader.IsDBNull(index))
                {
                    _entLearner.MiddleName = pSqlReader.GetString(index);
                }

                if (string.IsNullOrEmpty(_entLearner.MiddleName))
                {
                    _entLearner.MiddleName = "";
                }

                index = pSqlReader.GetOrdinal(Schema.Learner.COL_LAST_NAME);
                if (!pSqlReader.IsDBNull(index))
                {
                    _entLearner.LastName = pSqlReader.GetString(index);
                }
                else
                {
                    _entLearner.LastName = "";
                }

                index = pSqlReader.GetOrdinal(Schema.Learner.COL_EMAIL_ID);
                if (!pSqlReader.IsDBNull(index))
                {
                    _entLearner.Email = pSqlReader.GetString(index);
                }

                if (string.IsNullOrEmpty(_entLearner.Email))
                {
                    _entLearner.Email = "";
                }



                //if (pSqlObject.ReaderHasColumn(pSqlReader, Schema.Learner.COL_PHONE_NO))
                //{
                //    index = pSqlReader.GetOrdinal(Schema.Learner.COL_PHONE_NO);
                //    if (!pSqlReader.IsDBNull(index))
                //        _entLearner.PhoneNo = pSqlReader.GetString(index);
                //}

                index = pSqlReader.GetOrdinal(Schema.Learner.COL_USER_NAME_ALIAS);
                if (!pSqlReader.IsDBNull(index))
                {
                    _entLearner.UserName = pSqlReader.GetString(index);
                }
                else
                {
                    _entLearner.UserName = "";
                }

                index = pSqlReader.GetOrdinal(Schema.Learner.COL_USER_PASSWORD);
                if (!pSqlReader.IsDBNull(index))
                {
                    _entLearner.Password = pSqlReader.GetString(index);
                    _entLearner.Password = EncryptionManager.Decrypt(_entLearner.Password);
                }
                //index = pSqlReader.GetOrdinal(Schema.Learner.COL_ADDRESS);
                //if (!pSqlReader.IsDBNull(index))
                //    _entLearner.Address = pSqlReader.GetString(index);

                //index = pSqlReader.GetOrdinal(Schema.Learner.COL_DATE_OF_BIRTH);
                //if (!pSqlReader.IsDBNull(index))
                //    _entLearner.DateOfBirth = pSqlReader.GetDateTime(index);

                //index = pSqlReader.GetOrdinal(Schema.Learner.COL_DATE_OF_REGISTRATION);
                //if (!pSqlReader.IsDBNull(index))
                //    _entLearner.DateOfRegistration = pSqlReader.GetDateTime(index);

                //index = pSqlReader.GetOrdinal(Schema.Learner.COL_DATE_OF_TERMINATION);
                //if (!pSqlReader.IsDBNull(index))
                //    _entLearner.DateOfTermination = pSqlReader.GetDateTime(index);

                //index = pSqlReader.GetOrdinal(Schema.Learner.COL_USER_TYPE_ID);
                //if (!pSqlReader.IsDBNull(index))
                //    _entLearner.UserTypeId = pSqlReader.GetString(index);
                //else
                //    _entLearner.UserTypeId = "";

                //index = pSqlReader.GetOrdinal(Schema.Learner.COL_DEFAULT_LANGUAGE_ID);
                //if (!pSqlReader.IsDBNull(index))
                //    _entLearner.DefaultLanguageId = pSqlReader.GetString(index);

                //index = pSqlReader.GetOrdinal(Schema.Learner.COL_DEFAULT_THEME_ID);
                //if (!pSqlReader.IsDBNull(index))
                //    _entLearner.DefaultThemeID = pSqlReader.GetString(index);

                //index = pSqlReader.GetOrdinal(Schema.Learner.COL_GENDER);
                //if (!pSqlReader.IsDBNull(index))
                //    _entLearner.Gender = pSqlReader.GetBoolean(index);

                //index = pSqlReader.GetOrdinal(Schema.Learner.COL_MANAGER_ID);
                //if (!pSqlReader.IsDBNull(index))
                //    _entLearner.ManagerId = pSqlReader.GetString(index);

                //index = pSqlReader.GetOrdinal(Schema.Learner.COL_MANAGER_EMAIL);
                //if (!pSqlReader.IsDBNull(index))
                //    _entLearner.ManagerEmailId = pSqlReader.GetString(index);


                //if (pSqlObject.ReaderHasColumn(pSqlReader, Schema.Learner.COL_MANAGER_NAME))
                //{
                //    index = pSqlReader.GetOrdinal(Schema.Learner.COL_MANAGER_NAME);
                //    if (!pSqlReader.IsDBNull(index))
                //        _entLearner.ManagerName = pSqlReader.GetString(index);
                //}

                //index = pSqlReader.GetOrdinal(Schema.Learner.COL_DATE_LAST_LOGIN);
                //if (!pSqlReader.IsDBNull(index))
                //    _entLearner.DateLastLogin = pSqlReader.GetDateTime(index);

                //index = pSqlReader.GetOrdinal(Schema.Learner.COL_IS_ACTIVE);
                //if (!pSqlReader.IsDBNull(index))
                //    _entLearner.IsActive = pSqlReader.GetBoolean(index);

                index = pSqlReader.GetOrdinal(Schema.Client.COL_CLIENT_ID);
                if (!pSqlReader.IsDBNull(index))
                {
                    _entLearner.ClientId = pSqlReader.GetString(index);
                }

                index = pSqlReader.GetOrdinal(Schema.Common.COL_CREATED_BY);
                if (!pSqlReader.IsDBNull(index))
                {
                    _entLearner.CreatedById = pSqlReader.GetString(index);
                }

                index = pSqlReader.GetOrdinal(Schema.Common.COL_CREATED_ON);
                if (!pSqlReader.IsDBNull(index))
                {
                    _entLearner.DateCreated = pSqlReader.GetDateTime(index);
                }

                index = pSqlReader.GetOrdinal(Schema.Common.COL_MODIFIED_BY);
                if (!pSqlReader.IsDBNull(index))
                {
                    _entLearner.LastModifiedById = pSqlReader.GetString(index);
                }

                index = pSqlReader.GetOrdinal(Schema.Common.COL_MODIFIED_ON);
                if (!pSqlReader.IsDBNull(index))
                {
                    _entLearner.LastModifiedDate = pSqlReader.GetDateTime(index);
                }


                //index = pSqlReader.GetOrdinal(Schema.Learner.COL_UNIT_ID);
                //if (!pSqlReader.IsDBNull(index))
                //    _entLearner.UnitId = pSqlReader.GetString(index);

                //index = pSqlReader.GetOrdinal(Schema.Learner.COL_LEVEL_ID);
                //if (!pSqlReader.IsDBNull(index))
                //    _entLearner.LevelId = pSqlReader.GetString(index);

                //index = pSqlReader.GetOrdinal(Schema.Learner.COL_DEFAULT_RV);
                //if (!pSqlReader.IsDBNull(index))
                //    _entLearner.DefaultRegionView = pSqlReader.GetString(index);

                //index = pSqlReader.GetOrdinal(Schema.Learner.COL_CURRENT_RV);
                //if (!pSqlReader.IsDBNull(index))
                //    _entLearner.CurrentRegionView = pSqlReader.GetString(index);

                //if (pSqlObject.ReaderHasColumn(pSqlReader, Schema.Learner.COL_IS_FIRST_LOGIN))
                //{
                //    index = pSqlReader.GetOrdinal(Schema.Learner.COL_IS_FIRST_LOGIN);
                //    if (!pSqlReader.IsDBNull(index))
                //        _entLearner.IsFirstLogin = pSqlReader.GetBoolean(index);
                //}
                //if (pSqlObject.ReaderHasColumn(pSqlReader, Schema.Learner.COL_IS_PASSWORD_EXPIRED))
                //{
                //    index = pSqlReader.GetOrdinal(Schema.Learner.COL_IS_PASSWORD_EXPIRED);
                //    if (!pSqlReader.IsDBNull(index))
                //        _entLearner.IsPasswordExpired = pSqlReader.GetBoolean(index);
                //}
                //if (pSqlObject.ReaderHasColumn(pSqlReader, Schema.Learner.COL_USER_SCOPE))
                //{
                //    index = pSqlReader.GetOrdinal(Schema.Learner.COL_USER_SCOPE);
                //    if (!pSqlReader.IsDBNull(index))
                //        _entLearner.UserScope = pSqlReader.GetString(index);
                //}
                //if (pSqlObject.ReaderHasColumn(pSqlReader, Schema.Learner.COL_USER_DEFAULT_ORG))
                //{
                //    index = pSqlReader.GetOrdinal(Schema.Learner.COL_USER_DEFAULT_ORG);
                //    if (!pSqlReader.IsDBNull(index))
                //        _entLearner.UserDefaultOrg = pSqlReader.GetString(index);
                //}

                //if (pSqlObject.ReaderHasColumn(pSqlReader, Schema.Learner.COL_UserExpiryDate))
                //{
                //    index = pSqlReader.GetOrdinal(Schema.Learner.COL_UserExpiryDate);
                //    if (!pSqlReader.IsDBNull(index))
                //        _entLearner.userExpiryDate = pSqlReader.GetDateTime(index);
                //}

                if (pRangeList)
                {
                    _entRange = new EntityRange();
                    index     = pSqlReader.GetOrdinal(Schema.Common.COL_TOTAL_COUNT);
                    if (!pSqlReader.IsDBNull(index))
                    {
                        _entRange.TotalRows = pSqlReader.GetInt32(index);
                    }
                    _entLearner.ListRange = _entRange;
                    return(_entLearner);
                }
                // Below code to retrieve the list of current user roles.
                //pSqlReader.NextResult();

                //while (pSqlReader.Read())
                //{
                //    entUserAdminRole = new UserAdminRole();

                //    //User Id
                //    index = pSqlReader.GetOrdinal(Schema.Learner.COL_USER_ID);
                //    if (!pSqlReader.IsDBNull(index))
                //        entUserAdminRole.ID = pSqlReader.GetString(index);

                //    //Role Id
                //    index = pSqlReader.GetOrdinal(Schema.AdminRole.COL_ROLE_ID);
                //    if (!pSqlReader.IsDBNull(index))
                //        entUserAdminRole.RoleId = pSqlReader.GetString(index);
                //    //Level Id
                //    index = pSqlReader.GetOrdinal(Schema.Learner.COL_LEVEL_ID);
                //    if (!pSqlReader.IsDBNull(index))
                //        entUserAdminRole.LevelId = pSqlReader.GetString(index);

                //    //Unit Id
                //    index = pSqlReader.GetOrdinal(Schema.Learner.COL_UNIT_ID);
                //    if (!pSqlReader.IsDBNull(index))
                //        entUserAdminRole.UnitId = pSqlReader.GetString(index);

                //    //Unit Id
                //    index = pSqlReader.GetOrdinal(Schema.CustomGroup.COL_CSG_ID);
                //    if (!pSqlReader.IsDBNull(index))
                //        entUserAdminRole.CustomGroupId = pSqlReader.GetString(index);

                //    if (pSqlObject.ReaderHasColumn(pSqlReader, Schema.RuleRoleScope.COL_RULE_ID))
                //    {
                //        index = pSqlReader.GetOrdinal(Schema.RuleRoleScope.COL_RULE_ID);
                //        if (!pSqlReader.IsDBNull(index))
                //            entUserAdminRole.RuleId = pSqlReader.GetString(index);
                //    }

                //    //Admin Role Type
                //    index = pSqlReader.GetOrdinal(Schema.AdminRole.COL_ROLE_TYPE);
                //    if (!pSqlReader.IsDBNull(index))
                //        entUserAdminRole.AdminRoleType = (RoleType)Enum.Parse(typeof(RoleType), pSqlReader.GetString(index));


                //    //Role Is Active
                //    index = pSqlReader.GetOrdinal(Schema.AdminRole.COL_IS_ACTIVE);
                //    if (!pSqlReader.IsDBNull(index))
                //        entUserAdminRole.IsRoleActive = pSqlReader.GetBoolean(index);

                //    _entLearner.UserAdminRole.Add(entUserAdminRole);
                //}

                //pSqlReader.NextResult();

                //while (pSqlReader.Read())
                //{
                //    entUserCustomFieldValue = new UserCustomFieldValue();

                //    index = pSqlReader.GetOrdinal(Schema.UserCustomFieldValue.COL_CUSTOM_FIELD_ITEM_ID);
                //    if (!pSqlReader.IsDBNull(index))
                //        entUserCustomFieldValue.CustomFieldItemId = pSqlReader.GetString(index);

                //    index = pSqlReader.GetOrdinal(Schema.Learner.COL_USER_ID);
                //    if (!pSqlReader.IsDBNull(index))
                //        entUserCustomFieldValue.SystemUserGUID = pSqlReader.GetString(index);

                //    entUserCustomFieldValue.ID = entUserCustomFieldValue.CustomFieldItemId + entUserCustomFieldValue.SystemUserGUID;

                //    index = pSqlReader.GetOrdinal(Schema.UserCustomFieldValue.COL_ENTERED_VALUE);
                //    if (!pSqlReader.IsDBNull(index))
                //        entUserCustomFieldValue.EnteredValue = pSqlReader.GetString(index);

                //    index = pSqlReader.GetOrdinal(Schema.Common.COL_CREATED_BY);
                //    if (!pSqlReader.IsDBNull(index))
                //        entUserCustomFieldValue.CreatedById = pSqlReader.GetString(index);

                //    index = pSqlReader.GetOrdinal(Schema.Common.COL_CREATED_ON);
                //    if (!pSqlReader.IsDBNull(index))
                //        entUserCustomFieldValue.DateCreated = pSqlReader.GetDateTime(index);

                //    index = pSqlReader.GetOrdinal(Schema.Common.COL_MODIFIED_BY);
                //    if (!pSqlReader.IsDBNull(index))
                //        entUserCustomFieldValue.LastModifiedById = pSqlReader.GetString(index);

                //    index = pSqlReader.GetOrdinal(Schema.Common.COL_MODIFIED_ON);
                //    if (!pSqlReader.IsDBNull(index))
                //        entUserCustomFieldValue.LastModifiedDate = pSqlReader.GetDateTime(index);

                //    index = pSqlReader.GetOrdinal(Schema.CustomField.COL_CUSTOM_FIELD_ID);
                //    if (!pSqlReader.IsDBNull(index))
                //        entUserCustomFieldValue.CustomFieldId = pSqlReader.GetString(index);

                //    _entLearner.UserCustomFieldValue.Add(entUserCustomFieldValue);
                //}
            }
            return(_entLearner);
        }
        private void SaveSuspendData(XmlDocument requestXml)
        {
            string strContentModuleId = string.Empty;
            string strAttempId        = string.Empty;
            string strSystemUserGUID  = string.Empty;
            string strClientId        = string.Empty;

            if (LMSSession.IsInSession(ContentKeys.SESSION_ACTIVITYID))
            {
                strContentModuleId = Convert.ToString(LMSSession.GetValue(ContentKeys.SESSION_ACTIVITYID));
            }
            if (LMSSession.IsInSession(ContentKeys.SESSION_ATTEMPT_ID))
            {
                strAttempId = Convert.ToString(LMSSession.GetValue(ContentKeys.SESSION_ATTEMPT_ID));
            }
            if (LMSSession.IsInSession(ContentKeys.SESSION_LEARNER_ID))
            {
                strSystemUserGUID = Convert.ToString(LMSSession.GetValue(ContentKeys.SESSION_LEARNER_ID));
            }
            if (LMSSession.IsInSession("CLIENT_SESSION_ID"))
            {
                strClientId = Convert.ToString(LMSSession.GetValue("CLIENT_SESSION_ID"));
            }

            if (string.IsNullOrEmpty(strClientId) && !string.IsNullOrEmpty(hdnClientId.Value))
            {
                strClientId = EncryptionManager.Decrypt(hdnClientId.Value);
            }

            if (string.IsNullOrEmpty(strClientId) && !string.IsNullOrEmpty(hdnContentModuleId.Value))
            {
                strContentModuleId = EncryptionManager.Decrypt(hdnContentModuleId.Value);
            }

            if (string.IsNullOrEmpty(strClientId) && !string.IsNullOrEmpty(hdnUserId.Value))
            {
                strSystemUserGUID = EncryptionManager.Decrypt(hdnUserId.Value);
            }


            if (string.IsNullOrEmpty(strContentModuleId) || string.IsNullOrEmpty(strSystemUserGUID) || string.IsNullOrEmpty(strClientId))
            {
                RedirectToMainPage();
            }
            else
            {
                //var activityAssignment = CoursePlayerAssignmentManager.GetAssignmentForLaunch(strClientId, strContentModuleId, strSystemUserGUID, LaunchSite.Learner);
                //if (activityAssignment.ActivityStatus != ActivityCompletionStatus.Completed)
                //{
                //List<UserAssessmentQuestionTracking> lstQTrack = BusinessManager.UserDataXMLUtil.GetSuspendData(requestXml, strContentModuleId, strAttempId, strSystemUserGUID, strClientId);

                //#region SaveTracking
                //if (lstQTrack != null && lstQTrack.Count > 0)
                //{
                //    try
                //    {
                //        UserAssessmentQuestionTrackingManager objAssessmentQTrackMgr = new UserAssessmentQuestionTrackingManager();
                //        List<UserAssessmentQuestionTracking> lstRetAssessmentQTrack = new List<UserAssessmentQuestionTracking>();

                //        lstRetAssessmentQTrack = objAssessmentQTrackMgr.Execute(lstQTrack, UserAssessmentQuestionTracking.ListMethod.BulkAdd);
                //    }
                //    catch
                //    {

                //    }
                //}
                //#endregion
                //}
            }
        }
        private void ProcessRequest(XmlDocument RequestXMLObj, string useCase)
        {
            switch (useCase)
            {
            case "SaveCurrentSco":
                try
                {
                    string strContentModuleId = string.Empty;
                    string strLearnerId       = string.Empty;
                    ////string strClientId = string.Empty;

                    if (LMSSession.IsInSession(ContentKeys.SESSION_ACTIVITYID))
                    {
                        strContentModuleId = Convert.ToString(LMSSession.GetValue(ContentKeys.SESSION_ACTIVITYID));
                    }

                    if (LMSSession.IsInSession(ContentKeys.SESSION_LEARNER_ID))
                    {
                        strLearnerId = Convert.ToString(LMSSession.GetValue(ContentKeys.SESSION_LEARNER_ID));
                    }

                    ////if (LMSSession.IsInSession(Client.CLIENT_SESSION_ID))
                    ////    strClientId = Convert.ToString(LMSSession.GetValue(Client.CLIENT_SESSION_ID));

                    ////if (string.IsNullOrEmpty(strClientId) && !string.IsNullOrEmpty(hdnClientId.Value))
                    ////{
                    ////    strClientId = EncryptionManager.Decrypt(hdnClientId.Value);
                    ////}

                    if (!string.IsNullOrEmpty(hdnContentModuleId.Value))
                    {
                        strContentModuleId = EncryptionManager.Decrypt(hdnContentModuleId.Value);
                    }

                    if (!String.IsNullOrEmpty(strContentModuleId))
                    {
                        bool flag = false;
                        if (hdnContentModuleIdIsA.Value == String.Empty)
                        {
                            ContentModuleManager _CMManager       = new ContentModuleManager();
                            ContentModule        entContentModule = new ContentModule();
                            entContentModule.ID = strContentModuleId;
                            ////entContentModule.ClientId = strClientId;
                            entContentModule            = _CMManager.Execute(entContentModule, ContentModule.Method.GetByIDCoursePlayer);
                            flag                        = entContentModule.IsAssessment;
                            hdnContentModuleIdIsA.Value = entContentModule.IsAssessment.ToString();
                        }
                        else
                        {
                            flag = Convert.ToBoolean(hdnContentModuleIdIsA.Value);
                        }

                        if (flag)
                        {
                            SaveSuspendData(RequestXMLObj);
                        }
                    }
                    else
                    {
                        RedirectToMainPage();
                    }
                }
                catch (Exception ex)
                {
                }

                SaveCurrentSco(RequestXMLObj);
                ////string xmlFromPost = Request["TARecords"];

                break;
            }
        }