瀏覽代碼

Disable turnitin by default for now, until we confirm it works as expected.

copyvios-ng
Ben Kurtovic 8 年之前
父節點
當前提交
83f5588354
共有 2 個文件被更改,包括 5 次插入5 次删除
  1. +2
    -2
      copyvios/checker.py
  2. +3
    -3
      templates/index.mako

+ 2
- 2
copyvios/checker.py 查看文件

@@ -64,8 +64,8 @@ def _get_results(query, follow=True):
conn = get_db()
use_engine = 0 if query.use_engine in ("0", "false") else 1
use_links = 0 if query.use_links in ("0", "false") else 1
use_turnitin = 0 if query.turnitin in ("0", "false") else 1
if not use_engine and not use_links:
use_turnitin = 1 if query.turnitin in ("1", "true") else 0
if not use_engine and not use_links and not use_turnitin:
query.error = "no search method"
return



+ 3
- 3
templates/index.mako 查看文件

@@ -108,13 +108,13 @@
<td id="cv-inner-col2"><label for="action-search">Copyvio&nbsp;search:</label></td>
<td id="cv-inner-col3">
<input class="cv-search" type="hidden" name="use_engine" value="0" />
<input id="cv-cb-engine" class="cv-search" type="checkbox" name="use_engine" value="1" ${'checked="checked"' if (query.use_engine != "0") else ""} />
<input id="cv-cb-engine" class="cv-search" type="checkbox" name="use_engine" value="1" ${'checked="checked"' if query.use_engine not in ("0", "false") else ""} />
<label for="cv-cb-engine">Use&nbsp;search&nbsp;engine</label>
<input class="cv-search" type="hidden" name="use_links" value="0" />
<input id="cv-cb-links" class="cv-search" type="checkbox" name="use_links" value="1" ${'checked="checked"' if (query.use_links != "0") else ""} />
<input id="cv-cb-links" class="cv-search" type="checkbox" name="use_links" value="1" ${'checked="checked"' if query.use_links not in ("0", "false") else ""} />
<label for="cv-cb-links">Use&nbsp;links&nbsp;in&nbsp;page</label>
<input class="cv-search" type="hidden" name="use_links" value="0" />
<span style="white-space:nowrap"><input id="cv-cb-turnitin" class="cv-search" type="checkbox" name="turnitin" value="1" ${'checked="checked"' if (query.turnitin != "0") else ""}/>
<span style="white-space:nowrap"><input id="cv-cb-turnitin" class="cv-search" type="checkbox" name="turnitin" value="1" ${'checked="checked"' if query.turnitin in ("1", "true") else ""}/>
<label for="cv-cb-turnitin">Use&nbsp;Turnitin&nbsp;database</label></span>
</td>
</tr>


Loading…
取消
儲存