Script PHP to distributes works for reviewers
Budget: $10 – $30 USD
I need a script in PHP 5.6 (only script), which distributes works for reviewers according to some rules:
- Number of reviewers per works (minimum);
- Number of reviewers per works (desirable);
- Number of analyzes per reviewer (maximum);
- The Reviewer cannot be in the authors array;
- The thematic area of the work destined to the evaluator must be in the preference list;
Example array works:
Array
(
[0] => Array
(
[work_id] => 2004
[thematicarea_id] => 12
[authors] => Array
(
[0] => 1 //author id
[1] => 30 //author id
[2] => 49 //author id
)
)
[1] => Array
(
[work_id] => 2009
[thematicarea_id] => 9
[authors] => Array
(
[0] => 90 //author id
[1] => 57 //author id
[2] => 19 //author id
[3] => 73 //author id
[4] => 65 //author id
)
)
)
Example array reviewer:
Array
(
[0] => Array
(
[reviewer_userid] => 3
[thematicarea_preference] => 1,5,12
)
[1] => Array
(
[reviewer_userid] => 4
[thematicarea_preference] => 38,9,41
)
[2] => Array
(
[reviewer_userid] => 1
[thematicarea_preference] => 93,74,12
)
)
- Number of reviewers per works (minimum);
- Number of reviewers per works (desirable);
- Number of analyzes per reviewer (maximum);
- The Reviewer cannot be in the authors array;
- The thematic area of the work destined to the evaluator must be in the preference list;
Example array works:
Array
(
[0] => Array
(
[work_id] => 2004
[thematicarea_id] => 12
[authors] => Array
(
[0] => 1 //author id
[1] => 30 //author id
[2] => 49 //author id
)
)
[1] => Array
(
[work_id] => 2009
[thematicarea_id] => 9
[authors] => Array
(
[0] => 90 //author id
[1] => 57 //author id
[2] => 19 //author id
[3] => 73 //author id
[4] => 65 //author id
)
)
)
Example array reviewer:
Array
(
[0] => Array
(
[reviewer_userid] => 3
[thematicarea_preference] => 1,5,12
)
[1] => Array
(
[reviewer_userid] => 4
[thematicarea_preference] => 38,9,41
)
[2] => Array
(
[reviewer_userid] => 1
[thematicarea_preference] => 93,74,12
)
)
Related categories:
PHP