Ver código fonte

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

copyvios-ng
Ben Kurtovic 8 anos atrás
pai
commit
83f5588354
2 arquivos alterados com 5 adições e 5 exclusões
  1. +2
    -2
      copyvios/checker.py
  2. +3
    -3
      templates/index.mako

+ 2
- 2
copyvios/checker.py Ver arquivo

@@ -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 Ver arquivo

@@ -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>


Carregando…
Cancelar
Salvar