Exemplo n.º 1
0
 public static Learner ValidateLearnerLogin(Learner objLearner)
 {
     return(LearnerLoginDAL.ValidateLeanerLogin(objLearner));
 }
Exemplo n.º 2
0
 public static List <Course> GetOtherCurriculumModule(Learner learner)
 {
     return(CourseDAL.GetOtherCurriculumModule(learner));
 }
Exemplo n.º 3
0
        /// <summary>
        /// Launches activity
        /// </summary>
        /// <param name="activityAssignment"></param>
        private void LaunchActivity(Course activityAssignment, ContentModuleSession session, Learner currentUser) //, ContentModuleSession session
        {
            SessionManager.PopulateSessionVariables(currentUser, session, activityAssignment);

            LMSSession.RemoveSessionItem(ContentKeys.SESSION_ATTEMPT_ID);
            LMSSession.RemoveSessionItem(ContentKeys.SESSION_TOTAL_NO_PAGES);


            string sessionId = session.SystemUserGuid + "--" + session.ContentModuleId;
            string sLaunchPlayer;

            sLaunchPlayer = "HTMLGetSCORM.htm?sessionId=" + sessionId + "&contentmoduleid=" + session.ContentModuleId + "&learnerid=" + session.SystemUserGuid;// +"&LangId=" + langId;

            Response.Redirect(sLaunchPlayer);
        }
Exemplo n.º 4
0
 public static List <CurriculumGeneral> GetUserCurriculum(Learner objLearner)
 {
     return(CurriculumGeneralDAL.GetUserCurriculum(objLearner));
 }
Exemplo n.º 5
0
        //public ICoursePlayerAssignmentManager CoursePlayerAssignmentManager { get; set; }
        protected void Page_Load(object sender, EventArgs e)
        {
            // string aid = Request.Params["AID"];

            //if (Request.Params["AID"] == null || Request.Params["client"] == null ||
            //    Request.Params["LID"] == null || Request.Params["Preview"] == null)
            if (Request.Params["AID"] == null || Request.Params["LID"] == null)
            {
                Response.Write("Course Preview not available. Please Contact Administrator.");
                Response.End();
            }

            //Response.Write("<BR>AID : " + Request.Params["AID"]);
            //Response.Write("<BR>LID : " + Request.Params["LID"]);
            //Response.End();

            //string activityId = CommonManager.DecodeAndDecrypt(Request.Params["AID"]);
            //string clientId = CommonManager.DecodeAndDecrypt(Request.Params["client"]);

            string activityId = Request.Params["AID"];

            string learnerId = Request.Params["LID"];
            string langId    = Request.Params["Lang"];

            if (string.IsNullOrEmpty(langId))
            {
                langId = "en-US";
            }

            LMSSession.AddSessionItem(CommonManager.SESSION_MYCULTURE, langId);

            bool isReview = CheckReview();

            bool   isForAdminPreview = false;
            bool   isSsoLogin        = CheckSso();
            bool   isSameWindow      = CheckSameWindow();
            string returnUrl         = CheckReturnUrl(isForAdminPreview);
            int?   gridPageSize      = CheckGridPageSize();

            var session = new ContentModuleSession
            {
                ContentModuleId = activityId,
                Expiration      = DateTime.UtcNow.AddDays(2),
                IsReview        = isReview,
                SystemUserGuid  = learnerId,
                LaunchSite      = isForAdminPreview ? LaunchSite.Admin : LaunchSite.Learner,
                SsoLogin        = isSsoLogin,
                SameWindow      = isSameWindow,
                ReturnUrl       = returnUrl,
                GridPageSize    = gridPageSize
            };

            Course oCourse = new Course();

            oCourse.ActivityId = activityId;
            oCourse.LearnerId  = learnerId;
            var assignment = ContentModuleBLL.GetUserContentModuleTracking(oCourse);

            if (Convert.ToString(assignment.RetMessage) != "success")
            {
                Response.Write("Error Occured: " + Convert.ToString(assignment.RetMessage));
            }

            // checks if activity already exists.
            if (assignment.ContentTrackId != null)
            {
                Learner oLearner = new Learner();
                oLearner.ID = learnerId;
                LaunchActivity(assignment, session, oLearner);
            }
        }