Exemplo n.º 1
0
        public IActionResult Detail([Required] int pId)
        {
            if (ModelState.IsValid)
            {
                ExaminationPaper paper = _context.ExaminationPapers.Find(pId);
                if (paper == null)
                {
                    return(Json(new
                    {
                        isOk = false,
                        title = "错误提示",
                        message = "请求的试卷不存在!或者已经被删除了!"
                    }));
                }
                else
                {
                    vStatisticJudgeMap judge =
                        _context.VStatisticJudgeMaps.FirstOrDefault(j => j.PaperId == paper.PaperId);
                    vStatisticMultipleMap multiple =
                        _context.VStatisticMultipleMaps.FirstOrDefault(m => m.PaperId == paper.PaperId);
                    vStatisticSingleMap single =
                        _context.VStatisticSingleMaps.FirstOrDefault(m => m.PaperId == paper.PaperId);

                    return(Json(new
                    {
                        isOk = true,
                        title = "提示",
                        message = "加载成功",
                        judge = judge,
                        multiple = multiple,
                        single = single,
                        review = paper.Review
                    }));
                }
            }
            else
            {
                return(Json(new
                {
                    isOk = false,
                    title = "错误提示",
                    message = "参数错误"
                }));
            }
        }
Exemplo n.º 2
0
        #pragma warning disable 1998
        public async override global::System.Threading.Tasks.Task ExecuteAsync()
        {
#line 3 "F:\四川师范大学实验室安全考试项目\yun\lab\project\LabExam\LabExam\Views\Student\Result.cshtml"

            ViewData["Title"] = "实验室安全教育在线-考试结果";
            Layout            = null;

#line default
#line hidden
            BeginContext(155, 35, true);
            WriteLiteral("<!DOCTYPE html>\r\n<html lang=\"zh\">\r\n");
            EndContext();
            BeginContext(190, 451, false);
            __tagHelperExecutionContext = __tagHelperScopeManager.Begin("head", global::Microsoft.AspNetCore.Razor.TagHelpers.TagMode.StartTagAndEndTag, "321e1556ad7b4e6b987c9ac7271ee94a", async() => {
                BeginContext(196, 65, true);
                WriteLiteral("\r\n    <meta name=\"viewport\" content=\"width=device-width\" />\r\n    ");
                EndContext();
                BeginContext(261, 75, false);
                __tagHelperExecutionContext = __tagHelperScopeManager.Begin("link", global::Microsoft.AspNetCore.Razor.TagHelpers.TagMode.SelfClosing, "cab74bbd518b49c0b879febae7bd27c6", async() => {
                }
                                                                            );
                __Microsoft_AspNetCore_Mvc_Razor_TagHelpers_UrlResolutionTagHelper = CreateTagHelper <global::Microsoft.AspNetCore.Mvc.Razor.TagHelpers.UrlResolutionTagHelper>();
                __tagHelperExecutionContext.Add(__Microsoft_AspNetCore_Mvc_Razor_TagHelpers_UrlResolutionTagHelper);
                __tagHelperExecutionContext.AddHtmlAttribute(__tagHelperAttribute_0);
                __tagHelperExecutionContext.AddHtmlAttribute(__tagHelperAttribute_1);
                await __tagHelperRunner.RunAsync(__tagHelperExecutionContext);
                if (!__tagHelperExecutionContext.Output.IsContentModified)
                {
                    await __tagHelperExecutionContext.SetOutputContentAsync();
                }
                Write(__tagHelperExecutionContext.Output);
                __tagHelperExecutionContext = __tagHelperScopeManager.End();
                EndContext();
                BeginContext(336, 6, true);
                WriteLiteral("\r\n    ");
                EndContext();
                BeginContext(342, 55, false);
                __tagHelperExecutionContext = __tagHelperScopeManager.Begin("script", global::Microsoft.AspNetCore.Razor.TagHelpers.TagMode.StartTagAndEndTag, "f8981a7eee5e4f5ebdadbd025235fd47", async() => {
                }
                                                                            );
                __Microsoft_AspNetCore_Mvc_Razor_TagHelpers_UrlResolutionTagHelper = CreateTagHelper <global::Microsoft.AspNetCore.Mvc.Razor.TagHelpers.UrlResolutionTagHelper>();
                __tagHelperExecutionContext.Add(__Microsoft_AspNetCore_Mvc_Razor_TagHelpers_UrlResolutionTagHelper);
                __tagHelperExecutionContext.AddHtmlAttribute(__tagHelperAttribute_2);
                await __tagHelperRunner.RunAsync(__tagHelperExecutionContext);
                if (!__tagHelperExecutionContext.Output.IsContentModified)
                {
                    await __tagHelperExecutionContext.SetOutputContentAsync();
                }
                Write(__tagHelperExecutionContext.Output);
                __tagHelperExecutionContext = __tagHelperScopeManager.End();
                EndContext();
                BeginContext(397, 6, true);
                WriteLiteral("\r\n    ");
                EndContext();
                BeginContext(403, 64, false);
                __tagHelperExecutionContext = __tagHelperScopeManager.Begin("script", global::Microsoft.AspNetCore.Razor.TagHelpers.TagMode.StartTagAndEndTag, "647ec9c3f4d2451e893744196d83c406", async() => {
                }
                                                                            );
                __Microsoft_AspNetCore_Mvc_Razor_TagHelpers_UrlResolutionTagHelper = CreateTagHelper <global::Microsoft.AspNetCore.Mvc.Razor.TagHelpers.UrlResolutionTagHelper>();
                __tagHelperExecutionContext.Add(__Microsoft_AspNetCore_Mvc_Razor_TagHelpers_UrlResolutionTagHelper);
                __tagHelperExecutionContext.AddHtmlAttribute(__tagHelperAttribute_3);
                await __tagHelperRunner.RunAsync(__tagHelperExecutionContext);
                if (!__tagHelperExecutionContext.Output.IsContentModified)
                {
                    await __tagHelperExecutionContext.SetOutputContentAsync();
                }
                Write(__tagHelperExecutionContext.Output);
                __tagHelperExecutionContext = __tagHelperScopeManager.End();
                EndContext();
                BeginContext(467, 6, true);
                WriteLiteral("\r\n    ");
                EndContext();
                BeginContext(473, 55, false);
                __tagHelperExecutionContext = __tagHelperScopeManager.Begin("link", global::Microsoft.AspNetCore.Razor.TagHelpers.TagMode.SelfClosing, "cf0103d493c1468eb52ce808543b60e7", async() => {
                }
                                                                            );
                __Microsoft_AspNetCore_Mvc_Razor_TagHelpers_UrlResolutionTagHelper = CreateTagHelper <global::Microsoft.AspNetCore.Mvc.Razor.TagHelpers.UrlResolutionTagHelper>();
                __tagHelperExecutionContext.Add(__Microsoft_AspNetCore_Mvc_Razor_TagHelpers_UrlResolutionTagHelper);
                __tagHelperExecutionContext.AddHtmlAttribute(__tagHelperAttribute_4);
                __tagHelperExecutionContext.AddHtmlAttribute(__tagHelperAttribute_0);
                await __tagHelperRunner.RunAsync(__tagHelperExecutionContext);
                if (!__tagHelperExecutionContext.Output.IsContentModified)
                {
                    await __tagHelperExecutionContext.SetOutputContentAsync();
                }
                Write(__tagHelperExecutionContext.Output);
                __tagHelperExecutionContext = __tagHelperScopeManager.End();
                EndContext();
                BeginContext(528, 6, true);
                WriteLiteral("\r\n    ");
                EndContext();
                BeginContext(534, 59, false);
                __tagHelperExecutionContext = __tagHelperScopeManager.Begin("link", global::Microsoft.AspNetCore.Razor.TagHelpers.TagMode.SelfClosing, "3bfb8a4005b740cfa30a63d68d4c17bd", async() => {
                }
                                                                            );
                __Microsoft_AspNetCore_Mvc_Razor_TagHelpers_UrlResolutionTagHelper = CreateTagHelper <global::Microsoft.AspNetCore.Mvc.Razor.TagHelpers.UrlResolutionTagHelper>();
                __tagHelperExecutionContext.Add(__Microsoft_AspNetCore_Mvc_Razor_TagHelpers_UrlResolutionTagHelper);
                __tagHelperExecutionContext.AddHtmlAttribute(__tagHelperAttribute_5);
                __tagHelperExecutionContext.AddHtmlAttribute(__tagHelperAttribute_6);
                await __tagHelperRunner.RunAsync(__tagHelperExecutionContext);
                if (!__tagHelperExecutionContext.Output.IsContentModified)
                {
                    await __tagHelperExecutionContext.SetOutputContentAsync();
                }
                Write(__tagHelperExecutionContext.Output);
                __tagHelperExecutionContext = __tagHelperScopeManager.End();
                EndContext();
                BeginContext(593, 13, true);
                WriteLiteral("\r\n    <title>");
                EndContext();
                BeginContext(607, 17, false);
#line 16 "F:\四川师范大学实验室安全考试项目\yun\lab\project\LabExam\LabExam\Views\Student\Result.cshtml"
                Write(ViewData["Title"]);

#line default
#line hidden
                EndContext();
                BeginContext(624, 10, true);
                WriteLiteral("</title>\r\n");
                EndContext();
            }
                                                                        );
            __Microsoft_AspNetCore_Mvc_Razor_TagHelpers_HeadTagHelper = CreateTagHelper <global::Microsoft.AspNetCore.Mvc.Razor.TagHelpers.HeadTagHelper>();
            __tagHelperExecutionContext.Add(__Microsoft_AspNetCore_Mvc_Razor_TagHelpers_HeadTagHelper);
            await __tagHelperRunner.RunAsync(__tagHelperExecutionContext);

            if (!__tagHelperExecutionContext.Output.IsContentModified)
            {
                await __tagHelperExecutionContext.SetOutputContentAsync();
            }
            Write(__tagHelperExecutionContext.Output);
            __tagHelperExecutionContext = __tagHelperScopeManager.End();
            EndContext();
            BeginContext(641, 2, true);
            WriteLiteral("\r\n");
            EndContext();
            BeginContext(643, 4901, false);
            __tagHelperExecutionContext = __tagHelperScopeManager.Begin("body", global::Microsoft.AspNetCore.Razor.TagHelpers.TagMode.StartTagAndEndTag, "81706e105f1d4356a151efe48161849b", async() => {
                BeginContext(676, 144, true);
                WriteLiteral("\r\n    <div class=\"navbar-normal bc-clr-white\">\r\n        <div class=\"container\">\r\n            <div class=\"navbar-normal-brand\">\r\n                ");
                EndContext();
                BeginContext(820, 93, false);
                __tagHelperExecutionContext = __tagHelperScopeManager.Begin("img", global::Microsoft.AspNetCore.Razor.TagHelpers.TagMode.SelfClosing, "4caa576e529a483a9993bf26f53b3132", async() => {
                }
                                                                            );
                __Microsoft_AspNetCore_Mvc_Razor_TagHelpers_UrlResolutionTagHelper = CreateTagHelper <global::Microsoft.AspNetCore.Mvc.Razor.TagHelpers.UrlResolutionTagHelper>();
                __tagHelperExecutionContext.Add(__Microsoft_AspNetCore_Mvc_Razor_TagHelpers_UrlResolutionTagHelper);
                __tagHelperExecutionContext.AddHtmlAttribute(__tagHelperAttribute_7);
                __tagHelperExecutionContext.AddHtmlAttribute(__tagHelperAttribute_8);
                __tagHelperExecutionContext.AddHtmlAttribute(__tagHelperAttribute_9);
                __tagHelperExecutionContext.AddHtmlAttribute(__tagHelperAttribute_10);
                await __tagHelperRunner.RunAsync(__tagHelperExecutionContext);
                if (!__tagHelperExecutionContext.Output.IsContentModified)
                {
                    await __tagHelperExecutionContext.SetOutputContentAsync();
                }
                Write(__tagHelperExecutionContext.Output);
                __tagHelperExecutionContext = __tagHelperScopeManager.End();
                EndContext();
                BeginContext(913, 278, true);
                WriteLiteral(@"
                <div class=""navbar-normal-brand-title"">
                    SICNU  实验室安全考试 End
                </div>
            </div>
            <div id=""wang"" class=""navbar-normal-navlist"">
                <nav class=""navbar-normal-list-right"">
                    ");
                EndContext();
                BeginContext(1191, 255, false);
                __tagHelperExecutionContext = __tagHelperScopeManager.Begin("a", global::Microsoft.AspNetCore.Razor.TagHelpers.TagMode.StartTagAndEndTag, "d4fc0b41ccd347c78396c57c131e91c4", async() => {
                    BeginContext(1288, 154, true);
                    WriteLiteral("\r\n                        <span class=\"glyphicon glyphicon glyphicon-share\" aria-hidden=\"true\"></span>\r\n                        返回首页\r\n                    ");
                    EndContext();
                }
                                                                            );
                __Microsoft_AspNetCore_Mvc_TagHelpers_AnchorTagHelper = CreateTagHelper <global::Microsoft.AspNetCore.Mvc.TagHelpers.AnchorTagHelper>();
                __tagHelperExecutionContext.Add(__Microsoft_AspNetCore_Mvc_TagHelpers_AnchorTagHelper);
                __Microsoft_AspNetCore_Mvc_TagHelpers_AnchorTagHelper.Controller = (string)__tagHelperAttribute_11.Value;
                __tagHelperExecutionContext.AddTagHelperAttribute(__tagHelperAttribute_11);
                __Microsoft_AspNetCore_Mvc_TagHelpers_AnchorTagHelper.Action = (string)__tagHelperAttribute_12.Value;
                __tagHelperExecutionContext.AddTagHelperAttribute(__tagHelperAttribute_12);
                __tagHelperExecutionContext.AddHtmlAttribute(__tagHelperAttribute_13);
                __tagHelperExecutionContext.AddHtmlAttribute(__tagHelperAttribute_14);
                await __tagHelperRunner.RunAsync(__tagHelperExecutionContext);
                if (!__tagHelperExecutionContext.Output.IsContentModified)
                {
                    await __tagHelperExecutionContext.SetOutputContentAsync();
                }
                Write(__tagHelperExecutionContext.Output);
                __tagHelperExecutionContext = __tagHelperScopeManager.End();
                EndContext();
                BeginContext(1446, 429, true);
                WriteLiteral(@"
                </nav>
            </div>
        </div>
    </div>
    <div class=""container margin-top-10px"">
        <div class=""row border-thumali bc-clr-white"">
            <div class=""col-md-6 col-md-offset-3 padding-15"">
                <h4 class=""title-Splitter text-info"">
                    <span class=""glyphicon glyphicon-ok-circle""></span>
                    <span class="" font-size-18 font-weight-600"">");
                EndContext();
                BeginContext(1877, 12, false);
#line 42 "F:\四川师范大学实验室安全考试项目\yun\lab\project\LabExam\LabExam\Views\Student\Result.cshtml"
                Write(ViewBag.Name);

#line default
#line hidden
                EndContext();
                BeginContext(1890, 549, true);
                WriteLiteral(@"的考试结果</span>
                </h4>
                <div class=""lab-exam-result"">
                    <table class="" table table-hover"">
                        <thead>
                        <tr>
                            <th>题目类型</th>
                            <th>题目数量</th>
                            <th>正确数量</th>
                            <th>每题分数</th>
                            <th>总得分</th>
                        </tr>
                        </thead>
                        <tbody>
                            <tr>
");
                EndContext();
#line 57 "F:\四川师范大学实验室安全考试项目\yun\lab\project\LabExam\LabExam\Views\Student\Result.cshtml"

                vStatisticJudgeMap judge       = ((vStatisticJudgeMap)ViewData["judge"]);
                vStatisticMultipleMap multiple = ((vStatisticMultipleMap)ViewData["multiple"]);
                vStatisticSingleMap single     = ((vStatisticSingleMap)ViewData["single"]);


#line default
#line hidden
                BeginContext(2842, 82, true);
                WriteLiteral("                                <td>单选题</td>\r\n                                <td>");
                EndContext();
                BeginContext(2926, 14, false);
#line 63 "F:\四川师范大学实验室安全考试项目\yun\lab\project\LabExam\LabExam\Views\Student\Result.cshtml"
                Write(judge.AllCount);

#line default
#line hidden
                EndContext();
                BeginContext(2941, 43, true);
                WriteLiteral("</td>\r\n                                <td>");
                EndContext();
                BeginContext(2986, 16, false);
#line 64 "F:\四川师范大学实验室安全考试项目\yun\lab\project\LabExam\LabExam\Views\Student\Result.cshtml"
                Write(judge.RightCount);

#line default
#line hidden
                EndContext();
                BeginContext(3003, 43, true);
                WriteLiteral("</td>\r\n                                <td>");
                EndContext();
                BeginContext(3047, 11, false);
#line 65 "F:\四川师范大学实验室安全考试项目\yun\lab\project\LabExam\LabExam\Views\Student\Result.cshtml"
                Write(judge.Score);

#line default
#line hidden
                EndContext();
                BeginContext(3058, 43, true);
                WriteLiteral("</td>\r\n                                <td>");
                EndContext();
                BeginContext(3102, 16, false);
#line 66 "F:\四川师范大学实验室安全考试项目\yun\lab\project\LabExam\LabExam\Views\Student\Result.cshtml"
                Write(judge.TotalScore);

#line default
#line hidden
                EndContext();
                BeginContext(3118, 160, true);
                WriteLiteral(" 分</td>\r\n                            </tr>\r\n                            <tr>\r\n                                <td>多选题</td>\r\n                                <td>");
                EndContext();
                BeginContext(3279, 17, false);
#line 70 "F:\四川师范大学实验室安全考试项目\yun\lab\project\LabExam\LabExam\Views\Student\Result.cshtml"
                Write(multiple.AllCount);

#line default
#line hidden
                EndContext();
                BeginContext(3296, 43, true);
                WriteLiteral("</td>\r\n                                <td>");
                EndContext();
                BeginContext(3340, 19, false);
#line 71 "F:\四川师范大学实验室安全考试项目\yun\lab\project\LabExam\LabExam\Views\Student\Result.cshtml"
                Write(multiple.RightCount);

#line default
#line hidden
                EndContext();
                BeginContext(3359, 43, true);
                WriteLiteral("</td>\r\n                                <td>");
                EndContext();
                BeginContext(3403, 14, false);
#line 72 "F:\四川师范大学实验室安全考试项目\yun\lab\project\LabExam\LabExam\Views\Student\Result.cshtml"
                Write(multiple.Score);

#line default
#line hidden
                EndContext();
                BeginContext(3417, 43, true);
                WriteLiteral("</td>\r\n                                <td>");
                EndContext();
                BeginContext(3461, 19, false);
#line 73 "F:\四川师范大学实验室安全考试项目\yun\lab\project\LabExam\LabExam\Views\Student\Result.cshtml"
                Write(multiple.TotalScore);

#line default
#line hidden
                EndContext();
                BeginContext(3480, 160, true);
                WriteLiteral(" 分</td>\r\n                            </tr>\r\n                            <tr>\r\n                                <td>判断题</td>\r\n                                <td>");
                EndContext();
                BeginContext(3641, 15, false);
#line 77 "F:\四川师范大学实验室安全考试项目\yun\lab\project\LabExam\LabExam\Views\Student\Result.cshtml"
                Write(single.AllCount);

#line default
#line hidden
                EndContext();
                BeginContext(3656, 43, true);
                WriteLiteral("</td>\r\n                                <td>");
                EndContext();
                BeginContext(3700, 17, false);
#line 78 "F:\四川师范大学实验室安全考试项目\yun\lab\project\LabExam\LabExam\Views\Student\Result.cshtml"
                Write(single.RightCount);

#line default
#line hidden
                EndContext();
                BeginContext(3717, 43, true);
                WriteLiteral("</td>\r\n                                <td>");
                EndContext();
                BeginContext(3761, 12, false);
#line 79 "F:\四川师范大学实验室安全考试项目\yun\lab\project\LabExam\LabExam\Views\Student\Result.cshtml"
                Write(single.Score);

#line default
#line hidden
                EndContext();
                BeginContext(3773, 43, true);
                WriteLiteral("</td>\r\n                                <td>");
                EndContext();
                BeginContext(3817, 17, false);
#line 80 "F:\四川师范大学实验室安全考试项目\yun\lab\project\LabExam\LabExam\Views\Student\Result.cshtml"
                Write(single.TotalScore);

#line default
#line hidden
                EndContext();
                BeginContext(3834, 633, true);
                WriteLiteral(@" 分</td>
                            </tr>
                            <tr>
                                <td>简答题</td>
                                <td>1</td>
                                <td>无正确判断</td>
                                <td>0</td>
                                <td>0 分</td>
                            </tr>

                        </tbody>
                    </table>
                    <div>
                        <button class=""btn btn-sm btn-primary text-center"" style="" width:100%;"">


                            <span class="" font-weight-500 "">
                                总分:");
                EndContext();
                BeginContext(4469, 16, false);
#line 97 "F:\四川师范大学实验室安全考试项目\yun\lab\project\LabExam\LabExam\Views\Student\Result.cshtml"
                Write(Model.TotleScore);

#line default
#line hidden
                EndContext();
                BeginContext(4486, 253, true);
                WriteLiteral("分\r\n                            </span>\r\n                            <span class=\"font-weight-500 \">\r\n                                得分:\r\n                            </span>\r\n                            <span class=\" \">\r\n                                ");
                EndContext();
                BeginContext(4741, 11, false);
#line 103 "F:\四川师范大学实验室安全考试项目\yun\lab\project\LabExam\LabExam\Views\Student\Result.cshtml"
                Write(Model.Score);

#line default
#line hidden
                EndContext();
                BeginContext(4753, 40, true);
                WriteLiteral("分\r\n                            </span>\r\n");
                EndContext();
#line 105 "F:\四川师范大学实验室安全考试项目\yun\lab\project\LabExam\LabExam\Views\Student\Result.cshtml"
                if (Model.PassScore <= Model.Score)
                {
#line default
#line hidden
                    BeginContext(4890, 55, true);
                    WriteLiteral("                                <span>恭喜你通过考试!</span>\r\n");
                    EndContext();
#line 108 "F:\四川师范大学实验室安全考试项目\yun\lab\project\LabExam\LabExam\Views\Student\Result.cshtml"
                }
                else
                {
#line default
#line hidden
                    BeginContext(5041, 55, true);
                    WriteLiteral("                                <span>此次考核不合格!</span>\r\n");
                    EndContext();
#line 112 "F:\四川师范大学实验室安全考试项目\yun\lab\project\LabExam\LabExam\Views\Student\Result.cshtml"
                }

#line default
#line hidden
                BeginContext(5127, 410, true);
                WriteLiteral(@"                        </button>
                    </div>
                </div>
            </div>
        </div>
    </div>
    <div class=""container-fluid bc-clr-grey-little margin-top-15px layout-position-bottom"">
        <div class=""text-center font-size-16 padding-bottom-10px"">
            <small>© All Right Reserved . 四川师范大学计算机科学学院 版权所有 版本号1.0.0.2018.9</small>
        </div>
    </div>
");
                EndContext();
            }
                                                                        );
            __Microsoft_AspNetCore_Mvc_Razor_TagHelpers_BodyTagHelper = CreateTagHelper <global::Microsoft.AspNetCore.Mvc.Razor.TagHelpers.BodyTagHelper>();
            __tagHelperExecutionContext.Add(__Microsoft_AspNetCore_Mvc_Razor_TagHelpers_BodyTagHelper);
            __tagHelperExecutionContext.AddHtmlAttribute(__tagHelperAttribute_15);
            await __tagHelperRunner.RunAsync(__tagHelperExecutionContext);

            if (!__tagHelperExecutionContext.Output.IsContentModified)
            {
                await __tagHelperExecutionContext.SetOutputContentAsync();
            }
            Write(__tagHelperExecutionContext.Output);
            __tagHelperExecutionContext = __tagHelperScopeManager.End();
            EndContext();
            BeginContext(5544, 11, true);
            WriteLiteral("\r\n</html>\r\n");
            EndContext();
        }