Ejemplo n.º 1
0
$paperTable = new PaperTable($prow, make_qreq(), "assign");
$paperTable->initialize(false, false);
confHeader();
// begin form and table
$loginUrl = hoturl_post("assign", "p={$prow->paperId}");
$paperTable->paptabBegin();
// reviewer information
$proposals = null;
if (setting("extrev_chairreq")) {
    if ($Me->allow_administer($prow)) {
        $q = "";
    } else {
        $q = " and requestedBy={$Me->contactId}";
    }
    $result = Dbl::qe_raw("select name, ReviewRequest.email, firstName as reqFirstName, lastName as reqLastName, ContactInfo.email as reqEmail, requestedBy, reason, reviewRound from ReviewRequest join ContactInfo on (ContactInfo.contactId=ReviewRequest.requestedBy) where ReviewRequest.paperId={$prow->paperId}" . $q);
    $proposals = edb_orows($result);
}
$t = reviewTable($prow, $rrows, null, null, "assign", $proposals);
$t .= reviewLinks($prow, $rrows, null, null, "assign", $allreviewslink);
if ($t !== "") {
    echo '<hr class="papcard_sep" />', $t;
}
// PC assignments
if ($Me->can_administer($prow)) {
    $result = Dbl::qe_raw("select ContactInfo.contactId,\n        PaperConflict.conflictType,\n        PaperReview.reviewType,\n        coalesce(preference, 0) as reviewerPreference,\n        expertise as reviewerExpertise,\n        coalesce(allReviews,'') as allReviews,\n        coalesce(PRR.paperId,0) as refused\n        from ContactInfo\n        left join PaperConflict on (PaperConflict.contactId=ContactInfo.contactId and PaperConflict.paperId={$prow->paperId})\n        left join PaperReview on (PaperReview.contactId=ContactInfo.contactId and PaperReview.paperId={$prow->paperId})\n        left join PaperReviewPreference on (PaperReviewPreference.contactId=ContactInfo.contactId and PaperReviewPreference.paperId={$prow->paperId})\n        left join (select PaperReview.contactId, group_concat(reviewType separator '') as allReviews from PaperReview join Paper on (Paper.paperId=PaperReview.paperId and timeWithdrawn<=0) group by PaperReview.contactId) as AllReviews on (AllReviews.contactId=ContactInfo.contactId)\n        left join PaperReviewRefused PRR on (PRR.paperId={$prow->paperId} and PRR.contactId=ContactInfo.contactId)\n        where (ContactInfo.roles&" . Contact::ROLE_PC . ")!=0\n        group by ContactInfo.contactId");
    $pcx = array();
    while ($row = edb_orow($result)) {
        $pcx[$row->contactId] = $row;
    }
    // PC conflicts row
    echo '<hr class="papcard_sep" />', Ht::form($loginUrl, array("id" => "ass")), '<div class="aahc">', "<h3 style=\"margin-top:0\">PC review assignments</h3>", '<p>';
Ejemplo n.º 2
0
    if (isset($_REQUEST["pap"])) {
        foreach ($_REQUEST["pap"] as $p) {
            if (($p = cvtint($p)) > 0 && isset($allowed_papers[$p])) {
                $papersel[] = $p;
            }
        }
    } else {
        $papersel = array_keys($allowed_papers);
    }
    if (count($papersel) == 0) {
        unset($papersel);
    }
}
if ($getaction == "nameemail" && isset($papersel) && $Me->isPC) {
    $result = $Conf->qe("select firstName first, lastName last, email, affiliation from ContactInfo where " . paperselPredicate($papersel) . " order by lastName, firstName, email");
    $people = edb_orows($result);
    downloadCSV($people, array("first", "last", "email", "affiliation"), "users", array("selection" => true));
}
function urlencode_matches($m)
{
    return urlencode($m[0]);
}
if ($getaction == "pcinfo" && isset($papersel) && $Me->privChair) {
    assert($Conf->sversion >= 73);
    $result = $Conf->qe("select firstName first, lastName last, email,\n        preferredEmail preferred_email, affiliation,\n        voicePhoneNumber phone,\n        collaborators, defaultWatch, roles, disabled, contactTags tags, data,\n        group_concat(concat(topicId,':'," . $Conf->query_topic_interest() . ")) topic_interest\n        from ContactInfo\n        left join TopicInterest on (TopicInterest.contactId=ContactInfo.contactId and TopicInterest.interest is not null)\n        where " . paperselPredicate($papersel) . "\n        group by ContactInfo.contactId order by lastName, firstName, email");
    // NB This format is expected to be parsed by profile.php's bulk upload.
    $topics = $Conf->topic_map();
    $people = array();
    $has = (object) array("topics" => array());
    while ($row = edb_orow($result)) {
        if ($row->phone) {
Ejemplo n.º 3
0
 private static function contacts_by($what)
 {
     $cb = array();
     foreach (edb_orows(Dbl::qe("select " . AssignerContacts::$query . " from ContactInfo")) as $c) {
         $cb[$c->{$what}] = $c;
     }
     return $cb;
 }
 private function get_reviews()
 {
     global $Conf;
     if ($this->rrow) {
         $rrows = array($this->rrow);
     } else {
         $result = Dbl::qe("select PaperReview.*,\n                ContactInfo.firstName, ContactInfo.lastName, ContactInfo.email\n                from PaperReview\n                join ContactInfo on (ContactInfo.contactId=PaperReview.contactId)\n                where PaperReview.paperId=" . $this->row->paperId . " order by reviewOrdinal");
         $rrows = edb_orows($result);
     }
     // save old au_seerev setting, and reset it so authors can see them.
     if (!($au_seerev = $Conf->au_seerev)) {
         $Conf->au_seerev = Conf::AUSEEREV_YES;
     }
     $text = "";
     $rf = ReviewForm::get();
     foreach ($rrows as $row) {
         if ($row->reviewSubmitted && $this->permissionContact->can_view_review($this->row, $row, false)) {
             $text .= $rf->pretty_text($this->row, $row, $this->permissionContact, $this->no_send) . "\n";
         }
     }
     $Conf->au_seerev = $au_seerev;
     if ($text === "" && $au_seerev == Conf::AUSEEREV_UNLESSINCOMPLETE && count($rrows)) {
         $text = "[Reviews are hidden since you have incomplete reviews of your own.]\n";
     }
     return $text;
 }