protected new void Page_Init(object sender, EventArgs e) { base.Page_Init(sender, e); if (Tile == null) return; _assessmentID = (Int32)Tile.TileParms.GetParm("assessmentID"); _assessment = (Base.Classes.Assessment)Tile.TileParms.GetParm("assessment"); }
protected void Page_Load(object sender, EventArgs e) { GetSessionDetails(); _assessment = Base.Classes.Assessment.GetAssessmentByID(DataIntegrity.ConvertToInt(TestID)); if (!Page.IsPostBack) { GetStudentDetails(); PopulateStudentDetails(); Page.Title = _assessment.TestName; } }
protected void Page_Load(object sender, EventArgs e) { sessionObject = (SessionObject)Session["SessionObject"]; if (Request.QueryString["xID"] == null) { SessionObject.RedirectMessage = "No item type provided in URL."; Response.Redirect("~/PortalSelection.aspx", true); } else { _planID = DataIntegrity.ConvertToInt(Request.QueryString["xID"]); var key = "InstructionalPlan_" + _planID; if (!RecordExistsInCache(key)) return; _selectedPlan = ((Base.Classes.InstructionalPlan)Base.Classes.Cache.Get(key)); if (Request.QueryString["assessmentID"] != null) { _selectedAssessment = Base.Classes.Assessment.GetAssessmentByID(DataIntegrity.ConvertToInt(Request.QueryString["assessmentID"])); } if (Request.QueryString["resourceID"] != null) { _selectedResource = Base.Classes.Resource.GetDummyResourceByID(DataIntegrity.ConvertToInt(Request.QueryString["resourceID"])); } if (Request.QueryString["lessonplanid"] != null) { _selectedLessonPlan = Base.Classes.LessonPlan.GetPlanByID(DataIntegrity.ConvertToInt(Request.QueryString["lessonplanid"])); } if (Request.QueryString["standardid"] != null) { _selectedStandard = Base.Classes.Standards.GetStandardByID(DataIntegrity.ConvertToInt(Request.QueryString["standardid"])); } InstructionalPlanScheduler.DataSource = _selectedPlan.CalendarEvents; InstructionalPlanScheduler.DataBind(); if (Request.QueryString["view"] != null) //If a day is passed in query string, flip to day view and that date { switch (Request.QueryString["view"].ToString()) { case "Day": InstructionalPlanScheduler.SelectedView = SchedulerViewType.DayView; break; case "Week": InstructionalPlanScheduler.SelectedView = SchedulerViewType.WeekView; break; case "Month": default: InstructionalPlanScheduler.SelectedView = SchedulerViewType.MonthView; break; } } if(Request.QueryString["day"] != null) //If a day is passed in query string, flip to day view and that date { InstructionalPlanScheduler.SelectedView = SchedulerViewType.DayView; InstructionalPlanScheduler.SelectedDate = DataIntegrity.ConvertToDate(Request.QueryString["day"]); } } }
private void LoadAssessment() { if (Request.QueryString["xID"] == null || (_assessmentID = Cryptography.GetDecryptedID(SessionObject.LoggedInUser.CipherKey)) <= 0) { SessionObject.RedirectMessage = "No assessment ID provided in URL."; Response.Redirect("~/PortalSelection.aspx", true); } else { _assessment = Base.Classes.Assessment.GetAssessmentAndQuestionsByID(_assessmentID); if (_assessment == null) { SessionObject.RedirectMessage = "Could not find the assessment."; Response.Redirect("~/PortalSelection.aspx", true); } } }
private void LoadAssessment() { if (Request.QueryString["xID"] == null || (_assessmentID = Cryptography.GetDecryptedID(SessionObject.LoggedInUser.CipherKey)) <= 0) { SessionObject.RedirectMessage = "No assessment ID provided in URL."; Response.Redirect("~/PortalSelection.aspx", true); } else { cacheKey = "Assessment_" + Request.QueryString["xID"]; /*if (Base.Classes.Cache.Get(cacheKey) == null) {*/ _assessment = Base.Classes.Assessment.GetAssessmentAndQuestionsByID(_assessmentID); if (_assessment == null) //Base.Classes.Cache.Insert(cacheKey, _assessment); //else { SessionObject.RedirectMessage = "Could not find the assessment."; Response.Redirect("~/PortalSelection.aspx", true); } /*} else _assessment = (Base.Classes.Assessment)Cache[cacheKey]; */ } }
protected void Page_Load(object sender, EventArgs e) { if (Tile == null) return; String controlId = GetControlThatCausedPostBack(Parent.Page); // Simulate IsPostBack. _isPostBack = (controlId != null); // Initial load. dParms = DistrictParms.LoadDistrictParms(); _selectedAssessment = Base.Classes.Assessment.GetAssessmentAndQuestionsByID(_assessmentId); BuildUi(); hiddenAssessmentID.Value = _assessmentId.ToString(); hiddenUploadPath.Value = AppSettings.UploadFolderPhysicalPath + "\\"; // Path to upload directory. _uploadPath = AppSettings.UploadFolderPhysicalPath + "\\"; foreach (RepeaterItem ritem in rptAssessment.Items) { //PBI: 2937 if (UserHasPermission(Permission.Icon_Delete_Document)) ((RadButton)ritem.FindControl("btnDeleteAssessment")).Click += new EventHandler(btnDeleteAssessment_Click); else { ((RadButton)ritem.FindControl("btnDeleteAssessment")).Visible = false; } if(!UserHasPermission(Permission.Icon_Upload_Document)) { ((RadButton)ritem.FindControl("btnUploadAssessment")).Visible = false; } } foreach (RepeaterItem ritem in rptAnswerKey.Items) { // PBI: 2937 if (!UserHasPermission(Permission.Icon_Delete_Document)) { ((RadButton)ritem.FindControl("btnDeleteAnswerKey")).Visible = false; } else ((RadButton)ritem.FindControl("btnDeleteAnswerKey")).Click += new EventHandler(btnDeleteAnswerKey_Click); if (!UserHasPermission(Permission.Icon_Upload_Document)) { ((RadButton)ritem.FindControl("btnUploadAnswerKey")).Visible = false; } } foreach (RepeaterItem ritem in rptReview.Items) { // PBI: 2937 if (!UserHasPermission(Permission.Icon_Delete_Document)) { ((RadButton)ritem.FindControl("btnDeleteReview")).Visible = false; } else ((RadButton)ritem.FindControl("btnDeleteReview")).Click += new EventHandler(btnDeleteReview_Click); if (!UserHasPermission(Permission.Icon_Upload_Document)) { ((RadButton)ritem.FindControl("btnUploadReview")).Visible = false; } } }