Exemple #1
0
        public static IList <UserResultForPage> GetStatisticForThemeForUser(int userId, int themeId)
        {
            var pages = StudentRecordFinder.GetPagesForTheme(themeId);

            var result = new List <UserResultForPage>();

            foreach (var p in pages)
            {
                if (p.PageTypeRef == (int?)FX_PAGETYPE.Practice)
                {
                    var ur = new UserResultForPage(userId, p, null);
                    ur.Calc();
                    result.Add(ur);
                }
            }

            return(result);
        }
Exemple #2
0
        public void ReCompileButtonClick(object sender, EventArgs e)
        {
            IList <TblUsers> users = GetUsersForReCompilation();

            if (ThemeDropDownList.SelectedItem != null)
            {
                var pages = StudentRecordFinder.GetPagesForTheme(int.Parse(ThemeDropDownList.SelectedItem.Value));

                var answersForReCompilation = new List <TblUserAnswers>();

                foreach (var page in pages)
                {
                    AddAnswersFromPageToReCompilationList(page, users, answersForReCompilation);
                }

                ReCompile(answersForReCompilation);

                Description.Value = "ReCompilation is started";
            }
            else
            {
                Description.Value = "Theme not selected !!!";
            }
        }