以下のファイルに、「一つだけ選択可能」のオプションの設定が入っている。 --------------------------------------------------------------------- mcontest/cdata/${gid}/config.inc.php --------------------------------------------------------------------- 項目は、$cfg["onlyone"]=1; である。 この設定は、以下のファイルで「$cfg_mcontest」として読み込まれる。 mcontest/cn/include/CServerMcc.class.php $cfg_mcontestは、mcontest/cn/include/tpl.mcontest.inc.php ファイル内で HTMLに書き込まれる。具体的には以下の部分である。 ---------------------------------------------------------------------
--------------------------------------------------------------------- この「data-xxxx」の情報を以下のファイルで読む。 mcontest/components/sdvote/js/CPoll_sdvote.js --------------------------------------------------------------------- (function(){ if(b_sel){return;} const el_ytv=document.querySelector(".ytv"); if(!el_ytv){return;} const onlyone=parseInt(el_ytv.getAttribute("data-onlyone")); if(onlyone!==1){return;} --------------------------------------------------------------------- このファイルで、クライエント側の「一つだけ選択可能」をインプリメントする。