protected void Page_Load(object sender, EventArgs e) { var gradeList = new List<string>(); var subjectList = new List<string>(); SessionObject = (SessionObject)Session["SessionObject"]; _itemBankTbl = ItemBankMasterList.GetItemBanksForUser(SessionObject.LoggedInUser, ThinkgatePermission.PermissionLevelValues.ItemBankEdit, "Search"); if (LoadRubric() == false) return; _standardCourseList = CourseMasterList.GetStandardCoursesForUser(SessionObject.LoggedInUser); _gradeList = _standardCourseList.GetGradeList(); _subjectList = _standardCourseList.FilterByGrade(_rubric.Grade).GetSubjectList(); gradeList.Add(_rubric.Grade); subjectList.Add(_rubric.Subject); _courseList = _standardCourseList.FilterByGradesAndSubjects(gradeList, subjectList); BindPageControls(); /* Preview consists of Directions section + Content */ ContentEditor_Rubric_Preview_Directions.InnerHtml = _rubric.Directions; ContentEditor_Rubric_Preview_Contents.InnerHtml = _rubric.Content; }
protected new void Page_Init(object sender, EventArgs e) { base.Page_Init(sender, e); if (!IsPostBack) { _userID = SessionObject.LoggedInUser.Page; _standardCourseList = CourseMasterList.GetStandardCoursesForUser(SessionObject.LoggedInUser); _standardSets = Thinkgate.Base.Classes.Standards.GetStandardSets(SessionObject.GlobalInputs, _userID); _gradeList = _standardCourseList.GetGradeList(); _subjectList = _standardCourseList.GetSubjectList(); } _filterName = Request.QueryString["filterName"]; _standardsFilterDataTable = new DataTable(); foreach (DataColumn col in Thinkgate.Base.Classes.Standards.TableStructure.Columns) { DataColumn newCol = new DataColumn(col.ColumnName); _standardsFilterDataTable.Columns.Add(newCol); } _standardsSearchDataTable = new DataTable(); foreach (DataColumn col in Thinkgate.Base.Classes.Standards.TableStructure.Columns) { DataColumn newCol = new DataColumn(col.ColumnName); _standardsSearchDataTable.Columns.Add(newCol); } LoadStandardsFilterDataTable(); }
protected void Page_Load(object sender, EventArgs e) { SessionObject = (SessionObject)Session["SessionObject"]; _itemBankTbl = ItemBankMasterList.GetItemBanksForUser(SessionObject.LoggedInUser, ThinkgatePermission.PermissionLevelValues.ItemBankEdit, "Search"); LoadItemImage(); _standardCourseList = CourseMasterList.GetStandardCoursesForUser(SessionObject.LoggedInUser); _gradeList = _standardCourseList.GetGradeList(); _subjectList = _standardCourseList.FilterByGrade(_selectedAddendum.Addendum_Grade).GetSubjectList(); var gradeList = new List<string>(); var subjectList = new List<string>(); gradeList.Add(_selectedAddendum.Addendum_Grade); subjectList.Add(_selectedAddendum.Addendum_Subject); _courseList = _standardCourseList.FilterByGradesAndSubjects(gradeList, subjectList); BindPageControls(); }
protected void Page_Load(object sender, EventArgs e) { LoadItemImage(); if (hdnFlagDeleteConfirmation.Value != "") { RadToolBarItem itemToDisable = mainToolBar.FindItemByValue("DeleteItemImage"); itemToDisable.Enabled = false; } _standardCourseList = CourseMasterList.GetStandardCoursesForUser(SessionObject.LoggedInUser); _gradeList = _standardCourseList.GetGradeList(); _subjectList = _standardCourseList.FilterByGrade(SelectedImage.Grade).GetSubjectList(); var gradeList = new List<string>(); var subjectList = new List<string>(); gradeList.Add(SelectedImage.Grade); subjectList.Add(SelectedImage.Subject); _courseList = _standardCourseList.FilterByGradesAndSubjects(gradeList, subjectList); BindPageControls(); ScriptManager.RegisterStartupScript(this, typeof(string), "appClient", "var gr_preset = '" + SelectedImage.Grade + "';var sb_preset = '" + SelectedImage.Subject + "';var cr_preset = '" + SelectedImage.Course + "';", true); }
protected void Page_Load(object sender, EventArgs e) { lblTeacherMessage.Text = string.Empty; _classCourseList = CourseMasterList.GetClassCoursesForUser(SessionObject.LoggedInUser); _gradeList = _classCourseList.GetGradeList(); LoadClass(); /* Determine if user has permissions to access each section of edit page */ _permissionIdentification = UserHasPermission(Base.Enums.Permission.Section_Identification_EditClass); _permissionTeacher = UserHasPermission(Base.Enums.Permission.Section_Teacher_EditClass); _permissionRoster = UserHasPermission(Base.Enums.Permission.Section_Roster_EditClass); _permissionDeleteClass = UserHasPermission(Base.Enums.Permission.Delete_Class); bool reloadTeacherGrid = false; if (!string.IsNullOrEmpty(addTeacherList.Value)) { _selectedClass.LoadTeachers(); List<string> teacherUserNames = addTeacherList.Value.Split(',').ToList(); foreach (Base.Classes.Teacher teacher in _selectedClass.Teachers) { if (teacherUserNames.Contains(teacher.EmployeeID)) { teacherUserNames.Remove(teacher.EmployeeID); } } Thinkgate.Base.Classes.Class.AddTeachersToClass(teacherUserNames, _selectedClass.ID); addTeacherList.Value = string.Empty; reloadTeacherGrid = true; LoadClass(); } if (!string.IsNullOrEmpty(isSaveClass.Value)) { //SaveClass(); isSaveClass.Value = string.Empty; } if(!UserHasPermission(Base.Enums.Permission.Edit_Class)) { return; } /* Determine if user has permissions to access each section of edit page */ _permissionIdentification = UserHasPermission(Base.Enums.Permission.Section_Identification_EditClass); _permissionTeacher = UserHasPermission(Base.Enums.Permission.Section_Teacher_EditClass); _permissionRoster = UserHasPermission(Base.Enums.Permission.Section_Roster_EditClass); _permissionDeleteClass = UserHasPermission(Base.Enums.Permission.Delete_Class); //Determine if user should have ability to delete class or save changes to the class. saveButton.Enabled = _permissionIdentification || _permissionTeacher || _permissionRoster; deleteButton.Enabled = _permissionDeleteClass; deleteButton.Visible = _permissionDeleteClass; if (_selectedClass == null) { SessionObject.RedirectMessage = "No entity ID provided in URL."; Response.Redirect("~/PortalSelection.aspx", true); } _selectedClass.LoadTeachers(); _selectedClass.LoadStudents(); rosterGrid.DataSource = _selectedClass.Students; rosterGrid.DataBind(); // Disable Add Student button if user does not have permission to edit. if (!_permissionRoster) addStudentButton.Enabled = false; studentCountSpan.InnerHtml = _selectedClass.Students.Count.ToString() + " students"; if (!IsPostBack || reloadTeacherGrid) { teachersGrid.DataSource = _selectedClass.Teachers; teachersGrid.DataBind(); } // Disable Add Student button if user does not have permission to edit. if (!_permissionTeacher) { btnTeacherAdd.Enabled = false; btnTeacherRemove.Enabled = false; teachersGrid.MasterTableView.GetColumn("TeacherGridRemove").Visible = false; } LoadIdentificationDropdowns(); //PageTitle = _selectedClass.PrimaryTeacher + ": " + _selectedClass.Grade.GetFriendlyName() + " Grade " + _selectedClass.Subject.DisplayText + " - Period " + _selectedClass.Period; Page.Title = "Edit Class (" + _selectedClass.PrimaryTeacher + ": " + _selectedClass.Grade.GetFriendlyName() + " Grade " + _selectedClass.Subject.DisplayText + " - Period " + _selectedClass.Period + ")"; deleteButton.Attributes["classID"] = (_permissionDeleteClass) ? _selectedClass.ID.ToString() : "0"; saveButton.Attributes["classID"] = _selectedClass.ID.ToString(); }
/// <summary> /// Get the initial values from query string /// Loads the test question or bank question /// </summary> /// <param name="sender"></param> /// <param name="e"></param> protected void Page_Load(object sender, EventArgs e) { SessionObject = (SessionObject)Session["SessionObject"]; _itemBankTbl = ItemBankMasterList.GetItemBanksForUser(SessionObject.LoggedInUser, ThinkgatePermission.PermissionLevelValues.ItemBankEdit, "Search"); _imagesUrl = ConfigHelper.GetImagesUrl(); lbl_OTCUrl.Value = AppSettings.OTCUrl + DistrictParms.ClientID.ToString(CultureInfo.CurrentCulture); UpdateItem(); LoadItem(); _standardCourseList = CourseMasterList.GetStandardCoursesForUser(SessionObject.LoggedInUser); _gradeList = _standardCourseList.GetGradeList(); _subjectList = _standardCourseList.FilterByGrade(UseTq ? _itemTestQuestion.Grade : _itemBankQuestion.Grade).GetSubjectList(); var gradeList = new List<string>(); var subjectList = new List<string>(); gradeList.Add(UseTq ? _itemTestQuestion.Grade : _itemBankQuestion.Grade); subjectList.Add(UseTq ? _itemTestQuestion.Subject : _itemBankQuestion.Subject); BindPageControls(); SetItemPageValues(); ScriptManager.RegisterStartupScript(this, typeof(string), "appClient", "var appClient = '" + AppClient() + "';", true); ScriptManager.RegisterStartupScript(this, typeof (string), "debug_message", "function debug_message(message) {}", true); rtbBtnLRMI.Visible = DistrictParms.LRMITagging == "true"; }