- 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:
dave 2008-03-12 00:28:44 +00:00
parent a7da608982
commit 4587fd3c86

View File

@ -138,8 +138,11 @@ function projectStatus($reg_id="")
{ {
foreach ($required_fields AS $req) 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"; return "incomplete";
} }
} }