forked from science-ation/science-ation
- When checking the project status, count the words and test that against the
min/max number of words. (fix 335).
This commit is contained in:
parent
a7da608982
commit
4587fd3c86
@ -138,8 +138,11 @@ function projectStatus($reg_id="")
|
||||
{
|
||||
foreach ($required_fields AS $req)
|
||||
{
|
||||
if(!$r->$req)
|
||||
{
|
||||
if($req == 'summary') {
|
||||
$words = count(preg_split('/[ .,]+/', $r->$req));
|
||||
if($words < $config['participant_project_summary_wordmin']) return 'incomplete';
|
||||
if($words > $config['participant_project_summary_wordmax']) return 'incomplete';
|
||||
} else if(!$r->$req) {
|
||||
return "incomplete";
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user