/// <summary>
        /// private method to support both Add and Edit content module tracking transactions.
        /// </summary>
        /// <param name="pEntContModTracking"></param>
        /// <param name="pUpdateMode"></param>
        /// <returns>ContentModuleTracking object</returns>
        private ContentModuleTrackingUpdateResult Update(ContentModuleTracking pEntContModTracking, string pStrUpdateMode)
        {
            _sqlObject         = new SQLObject();
            sqlcmd             = new SqlCommand();
            sqlcmd.CommandType = CommandType.StoredProcedure;
            sqlcmd.CommandText = Schema.ContentModuleTracking.PROC_UPDATE_CONTENT_MODULE_TRACKING;
            _strConnString     = _sqlObject.GetClientDBConnString(pEntContModTracking.ClientId);
            //if (pStrUpdateMode == Schema.Common.VAL_INSERT_MODE)
            //{
            //    sqlpara = new SqlParameter(Schema.Common.PARA_UPDATE_MODE, Schema.Common.VAL_INSERT_MODE);
            //}
            //else
            //    sqlpara = new SqlParameter(Schema.Common.PARA_UPDATE_MODE, Schema.Common.VAL_UPDATE_MODE);
            //sqlcmd.Parameters.Add(sqlpara);

            if (string.IsNullOrEmpty(pEntContModTracking.ID))
            {
                pEntContModTracking.ID = pEntContModTracking.LearnerId + IDGenerator.GetUniqueKey(16);
            }

            sqlpara = new SqlParameter(Schema.Common.PARA_CONTENTTRACKID, pEntContModTracking.ID);
            sqlcmd.Parameters.Add(sqlpara);

            sqlpara = new SqlParameter(Schema.ContentModule.PARA_CONTENT_MODULE_ID, pEntContModTracking.ContentModuleId);
            sqlcmd.Parameters.Add(sqlpara);

            //sqlpara = new SqlParameter(Schema.Common.PARA_IS_BULK_MARK_COMPLETED, pEntContModTracking.IsBulkMarkCompleted);
            //sqlcmd.Parameters.Add(sqlpara);

            sqlpara = new SqlParameter(Schema.Learner.PARA_LEARNERID, pEntContModTracking.UserID);
            sqlcmd.Parameters.Add(sqlpara);

            //if (!string.IsNullOrEmpty(pEntContModTracking.SessionId))
            //{
            //    sqlcmd.Parameters.Add(new SqlParameter(Schema.Learner.PARA_SESSION_ID, pEntContModTracking.SessionId));
            //}

            //sqlcmd.Parameters.Add(new SqlParameter(Schema.ContentModuleTracking.PARA_EXTEND_EXPIRATION_MINUTES, pEntContModTracking.ExtendExpirationMinutes));
            //sqlcmd.Parameters.Add(new SqlParameter(Schema.ContentModuleTracking.PARA_CHECK_EXPIRED_SESSION, pEntContModTracking.CheckExpiredSession));

            if (DateTime.MinValue.CompareTo(pEntContModTracking.DateOfStart) < 0)
            {
                sqlpara = new SqlParameter(Schema.ContentModuleTracking.PARA_DATE_OF_START, pEntContModTracking.DateOfStart);
            }
            else
            {
                sqlpara = new SqlParameter(Schema.ContentModuleTracking.PARA_DATE_OF_START, null);
            }
            sqlcmd.Parameters.Add(sqlpara);

            if (pEntContModTracking.DateOfCompletion != null)
            {
                sqlpara = new SqlParameter(Schema.ContentModuleTracking.PARA_DATE_OF_COMPLETION, pEntContModTracking.DateOfCompletion);
            }
            else
            {
                sqlpara = new SqlParameter(Schema.ContentModuleTracking.PARA_DATE_OF_COMPLETION, null);
            }
            sqlcmd.Parameters.Add(sqlpara);

            sqlpara = new SqlParameter(Schema.ContentModuleTracking.PARA_TOTAL_NO_OF_PAGES, pEntContModTracking.TotalNoOfPages);
            sqlcmd.Parameters.Add(sqlpara);

            sqlpara = new SqlParameter(Schema.ContentModuleTracking.PARA_NO_OF_PAGES_COMPLETED, pEntContModTracking.NoOfPagesCompleted);
            sqlcmd.Parameters.Add(sqlpara);

            sqlpara = new SqlParameter(Schema.ContentModuleTracking.PARA_COMPLETION_STATUS, pEntContModTracking.CompletionStatus.ToString());
            sqlcmd.Parameters.Add(sqlpara);

            if (!string.IsNullOrEmpty(pEntContModTracking.Score))
            {
                sqlpara = new SqlParameter(Schema.ContentModuleTracking.PARA_SCORE, pEntContModTracking.Score);
            }
            else
            {
                sqlpara = new SqlParameter(Schema.ContentModuleTracking.PARA_SCORE, null);
            }
            sqlcmd.Parameters.Add(sqlpara);

            if (!string.IsNullOrEmpty(pEntContModTracking.UserDataXML))
            {
                sqlpara = new SqlParameter(Schema.ContentModuleTracking.PARA_USER_DATA_XML, pEntContModTracking.UserDataXML);
            }
            else
            {
                sqlpara = new SqlParameter(Schema.ContentModuleTracking.PARA_USER_DATA_XML, null);
            }
            sqlcmd.Parameters.Add(sqlpara);

            //if (!string.IsNullOrEmpty(pEntContModTracking.Score))
            //    sqlpara = new SqlParameter(Schema.ContentModuleTracking.PARA_SCORE, pEntContModTracking.Score);
            //else
            //    sqlpara = new SqlParameter(Schema.ContentModuleTracking.PARA_SCORE, null);
            //sqlcmd.Parameters.Add(sqlpara);

            //if (!string.IsNullOrEmpty(pEntContModTracking.MarkedCompletedById))
            //    sqlpara = new SqlParameter(Schema.ContentModuleTracking.PARA_MARKED_COMPLETED_BY_ID, pEntContModTracking.MarkedCompletedById);
            //else
            //    sqlpara = new SqlParameter(Schema.ContentModuleTracking.PARA_MARKED_COMPLETED_BY_ID, null);
            //sqlcmd.Parameters.Add(sqlpara);

            //if (!string.IsNullOrEmpty(pEntContModTracking.ScannedCertificationFileName))
            //    sqlpara = new SqlParameter(Schema.ContentModuleTracking.PARA_SCANNED_CERTIFICATION_FILE_NAME, pEntContModTracking.ScannedCertificationFileName);
            //else
            //    sqlpara = new SqlParameter(Schema.ContentModuleTracking.PARA_SCANNED_CERTIFICATION_FILE_NAME, null);
            //sqlcmd.Parameters.Add(sqlpara);

            //sqlcmd.Parameters.AddWithValue(Schema.ContentModuleTracking.PARA_ACTIVITY_NAME, null);
            //sqlcmd.Parameters.AddWithValue(Schema.ContentModuleTracking.PARA_USER_FIRST_LAST_NAME, null);
            //sqlcmd.Parameters.AddWithValue(Schema.ContentModuleTracking.PARA_REVIEWER_COMMENTS, pEntContModTracking.ReviewComments);
            //sqlcmd.Parameters.AddWithValue(Schema.ContentModuleTracking.PARA_REGION_VIEW_INFO, pEntContModTracking.RegionViewInfo);
            //sqlcmd.Parameters.AddWithValue(Schema.ContentModuleTracking.PARA_IS_FOR_ADMIN_PREVIEW, pEntContModTracking.IsForAdminPreview);

            ContentModuleTrackingUpdateResult result = null;

            using (SqlConnection conn = new SqlConnection(_strConnString))
            {
                conn.Open();

                sqlcmd.Connection = conn;

                using (var reader = sqlcmd.ExecuteReader())
                {
                    if (reader.HasRows)
                    {
                        reader.Read();

                        result = new ContentModuleTrackingUpdateResult();

                        //reader.SetValueForColumn<string>("PreviousCompletionStatus", s => result.PreviousCompletionStatus = s);
                        //reader.SetValueForColumn<string>("CurrentCompletionStatus", s => result.CurrentCompletionStatus = s);
                        //reader.SetValueForColumn<string>("LearnerId", s => result.LearnerId = s);
                    }
                }
            }

            return(result);
        }
예제 #2
0
        /// <summary>
        /// Update
        /// </summary>
        /// <param name="pEntCourseConfiguration"></param>
        /// <param name="pUpdateMode"></param>
        /// <returns></returns>
        private CourseConfiguration Update(CourseConfiguration pEntCourseConfiguration, string pUpdateMode)
        {
            int iRows = 0;

            _sqlObject          = new SQLObject();
            _sqlcmd             = new SqlCommand();
            _sqlcmd.CommandText = Schema.CourseConfiguration.PROC_UPDATE_COURSE_CONFIGURATION;
            try
            {
                _strConnString = _sqlObject.GetClientDBConnString(pEntCourseConfiguration.ClientId);

                if (pUpdateMode == Schema.Common.VAL_INSERT_MODE)
                {
                    _sqlpara = new SqlParameter(Schema.Common.PARA_UPDATE_MODE, Schema.Common.VAL_INSERT_MODE);
                    pEntCourseConfiguration.ID = IDGenerator.GetStringGUID();
                }
                else
                {
                    _sqlpara = new SqlParameter(Schema.Common.PARA_UPDATE_MODE, Schema.Common.VAL_UPDATE_MODE);
                }

                _sqlcmd.Parameters.Add(_sqlpara);

                // Allowresize Parameter
                _sqlpara = new SqlParameter(Schema.CourseConfiguration.PARA_ALLOW_RESIZE, pEntCourseConfiguration.AllowResize);
                _sqlcmd.Parameters.Add(_sqlpara);

                // AllowResize paramater
                _sqlpara = new SqlParameter(Schema.CourseConfiguration.PARA_ALLOW_SCROLL, pEntCourseConfiguration.AllowScroll);
                _sqlcmd.Parameters.Add(_sqlpara);

                // Avpath paramater
                if (!string.IsNullOrEmpty(pEntCourseConfiguration.AVPath))
                {
                    _sqlpara = new SqlParameter(Schema.CourseConfiguration.PARA_AV_PATH, pEntCourseConfiguration.AVPath);
                }
                else
                {
                    _sqlpara = new SqlParameter(Schema.CourseConfiguration.PARA_AV_PATH, System.DBNull.Value);
                }
                _sqlcmd.Parameters.Add(_sqlpara);

                // ClientID paramater
                if (!string.IsNullOrEmpty(pEntCourseConfiguration.ClientId))
                {
                    _sqlpara = new SqlParameter(Schema.CourseConfiguration.PARA_CLIENT_ID, pEntCourseConfiguration.ClientId);
                }
                else
                {
                    _sqlpara = new SqlParameter(Schema.CourseConfiguration.PARA_CLIENT_ID, System.DBNull.Value);
                }
                _sqlcmd.Parameters.Add(_sqlpara);

                // Course launch New Window paramater
                _sqlpara = new SqlParameter(Schema.CourseConfiguration.PARA_COURSE_LAUNCH_NEW_WINDOW, pEntCourseConfiguration.CourseLaunchNewWindow);
                _sqlcmd.Parameters.Add(_sqlpara);

                // Course Launch Same Window paramater
                _sqlpara = new SqlParameter(Schema.CourseConfiguration.PARA_COURSE_LAUNCH_SAME_WINDOW, pEntCourseConfiguration.CourseLaunchSameWindow);
                _sqlcmd.Parameters.Add(_sqlpara);

                // Course Window Height paramater
                if (pEntCourseConfiguration.CourseWindowHeight != 0)
                {
                    _sqlpara = new SqlParameter(Schema.CourseConfiguration.PARA_COURSE_WINDOW_HEIGHT, pEntCourseConfiguration.CourseWindowHeight);
                }
                else
                {
                    _sqlpara = new SqlParameter(Schema.CourseConfiguration.PARA_COURSE_WINDOW_HEIGHT, System.DBNull.Value);
                }
                _sqlcmd.Parameters.Add(_sqlpara);

                // Course Window Width paramater
                if (pEntCourseConfiguration.CourseWindowWidth != 0)
                {
                    _sqlpara = new SqlParameter(Schema.CourseConfiguration.PARA_COURSE_WINDOW_WIDTH, pEntCourseConfiguration.CourseWindowWidth);
                }
                else
                {
                    _sqlpara = new SqlParameter(Schema.CourseConfiguration.PARA_COURSE_WINDOW_WIDTH, System.DBNull.Value);
                }
                _sqlcmd.Parameters.Add(_sqlpara);

                // Is Course Session No Expiry paramater
                _sqlpara = new SqlParameter(Schema.CourseConfiguration.PARA_IS_COURSE_SESSION_NO_EXPIRY, pEntCourseConfiguration.IsCourseSessionNoExpiry);
                _sqlcmd.Parameters.Add(_sqlpara);

                // Mastery Score paramater
                if (pEntCourseConfiguration.MasteryScore != 0)
                {
                    _sqlpara = new SqlParameter(Schema.CourseConfiguration.PARA_MASTERY_SCORE, pEntCourseConfiguration.MasteryScore);
                }
                else
                {
                    _sqlpara = new SqlParameter(Schema.CourseConfiguration.PARA_MASTERY_SCORE, System.DBNull.Value);
                }
                _sqlcmd.Parameters.Add(_sqlpara);

                // Max File upload Size paramater
                if (pEntCourseConfiguration.MaxFileUploadSizeMB != 0)
                {
                    _sqlpara = new SqlParameter(Schema.CourseConfiguration.PARA_MAX_FILE_UPLOAD_SIZE_MB, pEntCourseConfiguration.MaxFileUploadSizeMB);
                }
                else
                {
                    _sqlpara = new SqlParameter(Schema.CourseConfiguration.PARA_MAX_FILE_UPLOAD_SIZE_MB, System.DBNull.Value);
                }
                _sqlcmd.Parameters.Add(_sqlpara);

                // Course Question Response Tracking paramater
                _sqlpara = new SqlParameter(Schema.CourseConfiguration.PARA_QUESTION_RESPONSE_TRACKING, pEntCourseConfiguration.QuestionResponseTracking);
                _sqlcmd.Parameters.Add(_sqlpara);

                // Course Launch Same Window paramater
                _sqlpara = new SqlParameter(Schema.CourseConfiguration.PARA_SCORE_TRACKING, pEntCourseConfiguration.ScoreTracking);
                _sqlcmd.Parameters.Add(_sqlpara);

                // Last Modified by ID paramater
                if (!string.IsNullOrEmpty(pEntCourseConfiguration.LastModifiedById))
                {
                    _sqlpara = new SqlParameter(Schema.Common.PARA_MODIFIED_BY, pEntCourseConfiguration.LastModifiedById);
                }
                else
                {
                    _sqlpara = new SqlParameter(Schema.Common.PARA_MODIFIED_BY, System.DBNull.Value);
                }
                _sqlcmd.Parameters.Add(_sqlpara);

                // Course Configuration ID paramater
                if (!string.IsNullOrEmpty(pEntCourseConfiguration.ID))
                {
                    _sqlpara = new SqlParameter(Schema.CourseConfiguration.PARA_COURSE_CONFIGURATION_ID, pEntCourseConfiguration.ID);
                }
                else
                {
                    _sqlpara = new SqlParameter(Schema.CourseConfiguration.PARA_COURSE_CONFIGURATION_ID, System.DBNull.Value);
                }
                _sqlcmd.Parameters.Add(_sqlpara);

                //-aw 6/15/2011 Added course protocol
                _sqlpara = new SqlParameter(Schema.CourseConfiguration.PARA_PROTOCOL, pEntCourseConfiguration.Protocol);
                _sqlcmd.Parameters.Add(_sqlpara);

                iRows = _sqlObject.ExecuteNonQuery(_sqlcmd, _strConnString);
            }
            catch (Exception expCommon)
            {
                //expCommon = new CustomException(_strMessageId, CustomException.WhoCallsMe(), ExceptionSeverityLevel.Critical, expCommon, true);
                throw expCommon;
            }
            return(pEntCourseConfiguration);
        }
        /// <summary>
        ///  To Fill Content module tracking object properties valus from reader data
        /// </summary>
        /// <param name="pReader"></param>
        /// <returns>ContentModuleTracking object</returns>
        private ContentModuleTracking FillObject(SqlDataReader pReader, SQLObject pSqlObject)
        {
            ContentModuleTracking entContModuleTracking = new ContentModuleTracking();
            int iIndex;

            if (pReader.HasRows)
            {
                while (pReader.Read())
                {
                    iIndex = pReader.GetOrdinal(Schema.Common.COL_ATTEMPT_ID);
                    if (!pReader.IsDBNull(iIndex))
                    {
                        entContModuleTracking.ID = pReader.GetString(iIndex);
                    }

                    iIndex = pReader.GetOrdinal(Schema.ContentModule.COL_CONTENT_MODULE_ID);
                    if (!pReader.IsDBNull(iIndex))
                    {
                        entContModuleTracking.ContentModuleId = pReader.GetString(iIndex);
                    }

                    iIndex = pReader.GetOrdinal(Schema.Learner.COL_USER_ID);
                    if (!pReader.IsDBNull(iIndex))
                    {
                        entContModuleTracking.UserID = pReader.GetString(iIndex);
                    }

                    iIndex = pReader.GetOrdinal(Schema.ContentModuleTracking.COL_DATE_OF_START);
                    if (!pReader.IsDBNull(iIndex))
                    {
                        entContModuleTracking.DateOfStart = pReader.GetDateTime(iIndex);
                    }

                    iIndex = pReader.GetOrdinal(Schema.ContentModuleTracking.COL_DATE_OF_COMPLETION);
                    if (!pReader.IsDBNull(iIndex))
                    {
                        entContModuleTracking.DateOfCompletion = pReader.GetDateTime(iIndex);
                    }

                    iIndex = pReader.GetOrdinal(Schema.ContentModuleTracking.COL_TOTAL_NO_OF_PAGES);
                    if (!pReader.IsDBNull(iIndex))
                    {
                        entContModuleTracking.TotalNoOfPages = pReader.GetInt32(iIndex);
                    }

                    iIndex = pReader.GetOrdinal(Schema.ContentModuleTracking.COL_NO_OF_PAGES_COMPLETED);
                    if (!pReader.IsDBNull(iIndex))
                    {
                        entContModuleTracking.NoOfPagesCompleted = pReader.GetInt32(iIndex);
                    }

                    iIndex = pReader.GetOrdinal(Schema.ContentModuleTracking.COL_COMPLETION_STATUS);
                    if (!pReader.IsDBNull(iIndex))
                    {
                        entContModuleTracking.CompletionStatus = (ActivityCompletionStatus)Enum.Parse(typeof(ActivityCompletionStatus), pReader.GetString(iIndex));
                    }

                    iIndex = pReader.GetOrdinal(Schema.ContentModuleTracking.COL_USER_DATA_XML);
                    if (!pReader.IsDBNull(iIndex))
                    {
                        entContModuleTracking.UserDataXML = pReader.GetString(iIndex);
                    }

                    iIndex = pReader.GetOrdinal(Schema.ContentModuleTracking.COL_SCORE);
                    if (!pReader.IsDBNull(iIndex))
                    {
                        entContModuleTracking.Score = pReader.GetString(iIndex);
                    }

                    iIndex = pReader.GetOrdinal(Schema.ContentModuleTracking.COL_MARKED_COMPLETED_BY_ID);
                    if (!pReader.IsDBNull(iIndex))
                    {
                        entContModuleTracking.MarkedCompletedById = pReader.GetString(iIndex);
                    }

                    iIndex = pReader.GetOrdinal(Schema.ContentModuleTracking.COL_SCANNED_CERTIFICATION_FILE_NAME);
                    if (!pReader.IsDBNull(iIndex))
                    {
                        entContModuleTracking.ScannedCertificationFileName = pReader.GetString(iIndex);
                    }

                    if (pSqlObject.ReaderHasColumn(pReader, Schema.ContentModuleTracking.COL_ACTIVITY_NAME))
                    {
                        iIndex = pReader.GetOrdinal(Schema.ContentModuleTracking.COL_ACTIVITY_NAME);
                        if (!pReader.IsDBNull(iIndex))
                        {
                            entContModuleTracking.ActivityName = pReader.GetString(iIndex);
                        }
                    }
                    if (pSqlObject.ReaderHasColumn(pReader, Schema.ContentModuleTracking.COL_USER_FIRST_LAST_NAME))
                    {
                        iIndex = pReader.GetOrdinal(Schema.ContentModuleTracking.COL_USER_FIRST_LAST_NAME);
                        if (!pReader.IsDBNull(iIndex))
                        {
                            entContModuleTracking.UserFirstLastName = pReader.GetString(iIndex);
                        }
                    }
                    if (pSqlObject.ReaderHasColumn(pReader, Schema.ContentModuleTracking.COL_REVIEWER_COMMENTS))
                    {
                        iIndex = pReader.GetOrdinal(Schema.ContentModuleTracking.COL_REVIEWER_COMMENTS);
                        if (!pReader.IsDBNull(iIndex))
                        {
                            entContModuleTracking.ReviewComments = pReader.GetString(iIndex);
                        }
                    }
                    if (pSqlObject.ReaderHasColumn(pReader, Schema.ContentModuleTracking.COL_REGION_VIEW_INFO))
                    {
                        iIndex = pReader.GetOrdinal(Schema.ContentModuleTracking.COL_REGION_VIEW_INFO);
                        if (!pReader.IsDBNull(iIndex))
                        {
                            entContModuleTracking.RegionViewInfo = pReader.GetString(iIndex);
                        }
                    }
                    if (pSqlObject.ReaderHasColumn(pReader, Schema.ContentModuleTracking.COL_IS_FOR_ADMIN_PREVIEW))
                    {
                        iIndex = pReader.GetOrdinal(Schema.ContentModuleTracking.COL_IS_FOR_ADMIN_PREVIEW);
                        if (!pReader.IsDBNull(iIndex))
                        {
                            entContModuleTracking.IsForAdminPreview = pReader.GetBoolean(iIndex);
                        }
                    }

                    if (pSqlObject.ReaderHasColumn(pReader, Schema.ContentModuleTracking.COL_VENDORCODE))
                    {
                        iIndex = pReader.GetOrdinal(Schema.ContentModuleTracking.COL_VENDORCODE);
                        if (!pReader.IsDBNull(iIndex))
                        {
                            entContModuleTracking.VendorCode = pReader.GetString(iIndex);
                        }
                    }
                }
            }
            return(entContModuleTracking);
        }
예제 #4
0
        /// <summary>
        /// Fill Object
        /// </summary>
        /// <param name="pSqlreader"></param>
        /// <param name="pSqlObject"></param>
        /// <returns></returns>
        private CourseConfiguration FillObject(SqlDataReader pSqlreader, SQLObject pSqlObject)
        {
            _entCourseConfiguration = new CourseConfiguration();
            int iIndex;

            if (pSqlreader.HasRows)
            {
                iIndex = pSqlreader.GetOrdinal(Schema.CourseConfiguration.COL_ALLOW_RESIZE);
                if (!pSqlreader.IsDBNull(iIndex))
                {
                    _entCourseConfiguration.AllowResize = pSqlreader.GetBoolean(iIndex);
                }

                iIndex = pSqlreader.GetOrdinal(Schema.CourseConfiguration.COL_ALLOW_SCROLL);
                if (!pSqlreader.IsDBNull(iIndex))
                {
                    _entCourseConfiguration.AllowScroll = pSqlreader.GetBoolean(iIndex);
                }

                iIndex = pSqlreader.GetOrdinal(Schema.CourseConfiguration.COL_AV_PATH);
                if (!pSqlreader.IsDBNull(iIndex))
                {
                    _entCourseConfiguration.AVPath = pSqlreader.GetString(iIndex);
                }

                iIndex = pSqlreader.GetOrdinal(Schema.CourseConfiguration.COL_CLIENT_ID);
                if (!pSqlreader.IsDBNull(iIndex))
                {
                    _entCourseConfiguration.ClientId = pSqlreader.GetString(iIndex);
                }

                iIndex = pSqlreader.GetOrdinal(Schema.CourseConfiguration.COL_COURSE_CONFIGURATION_ID);
                if (!pSqlreader.IsDBNull(iIndex))
                {
                    _entCourseConfiguration.ID = pSqlreader.GetString(iIndex);
                }

                iIndex = pSqlreader.GetOrdinal(Schema.CourseConfiguration.COL_COURSE_LAUNCH_NEW_WINDOW);
                if (!pSqlreader.IsDBNull(iIndex))
                {
                    _entCourseConfiguration.CourseLaunchNewWindow = pSqlreader.GetBoolean(iIndex);
                }

                iIndex = pSqlreader.GetOrdinal(Schema.CourseConfiguration.COL_COURSE_LAUNCH_SAME_WINDOW);
                if (!pSqlreader.IsDBNull(iIndex))
                {
                    _entCourseConfiguration.CourseLaunchSameWindow = pSqlreader.GetBoolean(iIndex);
                }

                iIndex = pSqlreader.GetOrdinal(Schema.CourseConfiguration.COL_COURSE_WINDOW_HEIGHT);
                if (!pSqlreader.IsDBNull(iIndex))
                {
                    _entCourseConfiguration.CourseWindowHeight = pSqlreader.GetInt32(iIndex);
                }

                iIndex = pSqlreader.GetOrdinal(Schema.CourseConfiguration.COL_COURSE_WINDOW_WIDTH);
                if (!pSqlreader.IsDBNull(iIndex))
                {
                    _entCourseConfiguration.CourseWindowWidth = pSqlreader.GetInt32(iIndex);
                }

                iIndex = pSqlreader.GetOrdinal(Schema.CourseConfiguration.COL_IS_COURSE_SESSION_NO_EXPIRY);
                if (!pSqlreader.IsDBNull(iIndex))
                {
                    _entCourseConfiguration.IsCourseSessionNoExpiry = pSqlreader.GetBoolean(iIndex);
                }

                iIndex = pSqlreader.GetOrdinal(Schema.CourseConfiguration.COL_MASTERY_SCORE);
                if (!pSqlreader.IsDBNull(iIndex))
                {
                    _entCourseConfiguration.MasteryScore = pSqlreader.GetInt32(iIndex);
                }

                iIndex = pSqlreader.GetOrdinal(Schema.CourseConfiguration.COL_MAX_FILE_UPLOAD_SIZE_MB);
                if (!pSqlreader.IsDBNull(iIndex))
                {
                    _entCourseConfiguration.MaxFileUploadSizeMB = pSqlreader.GetInt32(iIndex);
                }

                iIndex = pSqlreader.GetOrdinal(Schema.CourseConfiguration.COL_QUESTION_RESPONSE_TRACKING);
                if (!pSqlreader.IsDBNull(iIndex))
                {
                    _entCourseConfiguration.QuestionResponseTracking = pSqlreader.GetBoolean(iIndex);
                }

                iIndex = pSqlreader.GetOrdinal(Schema.CourseConfiguration.COL_SCORE_TRACKING);
                if (!pSqlreader.IsDBNull(iIndex))
                {
                    _entCourseConfiguration.ScoreTracking = pSqlreader.GetBoolean(iIndex);
                }

                iIndex = pSqlreader.GetOrdinal(Schema.Common.COL_CREATED_BY);
                if (!pSqlreader.IsDBNull(iIndex))
                {
                    _entCourseConfiguration.CreatedById = pSqlreader.GetString(iIndex);
                }

                iIndex = pSqlreader.GetOrdinal(Schema.Common.COL_CREATED_ON);
                if (!pSqlreader.IsDBNull(iIndex))
                {
                    _entCourseConfiguration.DateCreated = pSqlreader.GetDateTime(iIndex);
                }

                iIndex = pSqlreader.GetOrdinal(Schema.Common.COL_MODIFIED_BY);
                if (!pSqlreader.IsDBNull(iIndex))
                {
                    _entCourseConfiguration.LastModifiedById = pSqlreader.GetString(iIndex);
                }

                iIndex = pSqlreader.GetOrdinal(Schema.Common.COL_MODIFIED_ON);
                if (!pSqlreader.IsDBNull(iIndex))
                {
                    _entCourseConfiguration.LastModifiedDate = pSqlreader.GetDateTime(iIndex);
                }

                if (pSqlObject.ReaderHasColumn(pSqlreader, Schema.AVPathSetting.COL_IS_SAME_FOR_ALL))
                {
                    iIndex = pSqlreader.GetOrdinal(Schema.AVPathSetting.COL_IS_SAME_FOR_ALL);
                    if (!pSqlreader.IsDBNull(iIndex))
                    {
                        _entCourseConfiguration.IsSameAVPathForAll = pSqlreader.GetBoolean(iIndex);
                    }
                }

                //-aw 6/15/2011 Added course protocol
                iIndex = pSqlreader.GetOrdinal(Schema.CourseConfiguration.COL_PROTOCOL);
                if (!pSqlreader.IsDBNull(iIndex))
                {
                    _entCourseConfiguration.Protocol = pSqlreader.GetString(iIndex);
                }
            }
            return(_entCourseConfiguration);
        }