%@ page contentType="text/html;charset=UTF-8" pageEncoding="UTF-8" language="java" %> <%@ page import="java.util.List" %> <%@ page import="java.util.Map" %> <%@ page import="java.util.HashMap" %> <%@ page import="com.pandoli365.bibimbap.data.JamData" %> <%@ page import="com.pandoli365.bibimbap.data.JamCriterionData" %> <%@ page import="com.pandoli365.bibimbap.data.JamScoreData" %> <%@ page import="org.springframework.web.util.HtmlUtils" %> <% String ctx = request.getContextPath(); JamData jam = (JamData) request.getAttribute("jam"); Long jamId = (Long) request.getAttribute("jamId"); Long gameId = (Long) request.getAttribute("gameId"); List criteria = (List) request.getAttribute("criteria"); List mine = (List) request.getAttribute("mine"); Object rawCsrf = request.getAttribute("csrfToken"); String csrfToken = rawCsrf == null ? "" : String.valueOf(rawCsrf); String csrfTokenHtml = HtmlUtils.htmlEscape(csrfToken); // JS 문자열 컨텍스트용: 따옴표/역슬래시/스크립트 종료 시퀀스 차단 (jam-detail.jsp 동형) String csrfTokenJs = csrfToken .replace("\\", "\\\\") .replace("'", "\\'") .replace("\"", "\\\"") .replace("<", "\\u003C") .replace(">", "\\u003E") .replace("\r", "") .replace("\n", ""); // prefill: criterionKey -> score Map mineByKey = new HashMap(); if (mine != null) { for (JamScoreData s : mine) { if (s == null || s.getCriterionKey() == null) { continue; } mineByKey.put(s.getCriterionKey(), s.getScore()); } } %> <%= jam == null ? "심사 채점" : HtmlUtils.htmlEscape(jam.getTitle() == null ? "" : jam.getTitle()) %> 심사 채점 | bibimbap ← 게임잼 목록 <%= jam == null ? "" : HtmlUtils.htmlEscape(jam.getTitle() == null ? "" : jam.getTitle()) %> 심사 채점 <% if (criteria == null || criteria.isEmpty()) { %> 채점 항목이 없습니다. <% } else { %> <% for (JamCriterionData c : criteria) { if (c == null || c.getCriterionKey() == null) { continue; } String key = c.getCriterionKey(); String keyHtml = HtmlUtils.htmlEscape(key); String nameHtml = HtmlUtils.htmlEscape(c.getDisplayName() == null ? key : c.getDisplayName()); String weightStr = c.getWeight() == null ? "" : c.getWeight().toPlainString(); Integer prefill = mineByKey.get(key); %> <%= nameHtml %><%= weightStr.isEmpty() ? "" : "가중치 " + HtmlUtils.htmlEscape(weightStr) + "" %> >미선택 <% for (int v = 1; v <= 5; v++) { %> ><%= v %> <% } %> <% } %> 채점 저장 <% } %>
채점 항목이 없습니다.