예제 #1
0
파일: home.php 프로젝트: kohler/peteramati
            if ($info->set_commit(null)) {
                $which_grader = mt_rand(0, count($cur_graders) - 1);
                $info->change_grader($cur_graders[$which_grader]->contactId);
                array_splice($cur_graders, $which_grader, 1);
                if (count($cur_graders) == 0) {
                    $cur_graders = $graders;
                }
            } else {
                error_log("cannot set_commit for {$user->email}");
            }
        }
    }
    redirectSelf();
}
if ($Me->isPC && check_post() && $Qreq->setgrader) {
    set_grader($Qreq);
}
function runmany($qreq)
{
    global $Conf, $Me;
    if (!($pset = $Conf->pset_by_key($qreq->pset)) || $pset->disabled) {
        return $Conf->errorMsg("No such pset");
    } else {
        if ($pset->gitless) {
            return $Conf->errorMsg("Pset has no repository");
        }
    }
    $users = array();
    foreach ($qreq as $k => $v) {
        if (substr($k, 0, 4) == "s61_" && $v && ($uname = urldecode(substr($k, 4))) && ($user = ContactView::prepare_user($uname, $pset))) {
            $users[] = $Me->user_linkpart($user);
예제 #2
0
파일: home.php 프로젝트: benesch/peteramati
            if ($info->set_commit(null)) {
                $which_grader = mt_rand(0, count($cur_graders) - 1);
                $info->change_grader($cur_graders[$which_grader]->contactId);
                array_splice($cur_graders, $which_grader, 1);
                if (count($cur_graders) == 0) {
                    $cur_graders = $graders;
                }
            } else {
                error_log("cannot set_commit for {$user->email}");
            }
        }
    }
    redirectSelf();
}
if ($Me->isPC && check_post() && @$_POST["setgrader"]) {
    set_grader();
}
function runmany()
{
    global $Conf, $Me;
    if (!($pset = Pset::find(@$_REQUEST["pset"])) || $pset->disabled) {
        return $Conf->errorMsg("No such pset");
    } else {
        if ($pset->gitless) {
            return $Conf->errorMsg("Pset has no repository");
        }
    }
    $users = array();
    foreach ($_POST as $k => $v) {
        if (substr($k, 0, 4) == "s61_" && $v && ($uname = substr($k, 4)) && ($user = ContactView::prepare_user($uname, $pset))) {
            $users[] = $Me->user_linkpart($user);