예제 #1
0
<?php

// src/settings/s_users.php -- HotCRP settings > users page
// HotCRP is Copyright (c) 2006-2016 Eddie Kohler and Regents of the UC
// Distributed under an MIT-like license; see LICENSE
class SettingRenderer_Users extends SettingRenderer
{
    function render($sv)
    {
        global $Me;
        if ($sv->curv("acct_addr")) {
            $sv->echo_checkbox("acct_addr", "Collect users’ addresses and phone numbers");
        }
        echo "<h3 class=\"settings g\">Program committee &amp; system administrators</h3>";
        echo "<p><a href='", hoturl("profile", "u=new&amp;role=pc"), "' class='button'>Create PC account</a> &nbsp;|&nbsp; ", "Select a user’s name to edit a profile.</p>\n";
        $pl = new ContactList($Me, false);
        echo $pl->table_html("pcadminx", hoturl("users", "t=pcadmin"));
    }
}
SettingGroup::register("users", "Accounts", 100, new SettingRenderer_Users());
SettingGroup::register_synonym("acc", "users");
예제 #2
0
            foreach (Track::$map as $type => $value) {
                if (($ttype = defval($sv->req, "{$type}_track{$i}", "")) == "+" || $ttype == "-") {
                    $ttag = trim(defval($sv->req, "{$type}tag_track{$i}", ""));
                    if ($ttag === "" || $ttag === "(tag)") {
                        $sv->set_error("{$type}_track{$i}", "Tag missing for track setting.");
                        $sv->set_error("tracks");
                    } else {
                        if ($ttype == "+" && strcasecmp($ttag, "none") == 0 || $tagger->check($ttag, Tagger::NOPRIVATE | Tagger::NOCHAIR | Tagger::NOVALUE)) {
                            $t->{$type} = $ttype . $ttag;
                        } else {
                            $sv->set_error("{$type}_track{$i}", $tagger->error_html);
                            $sv->set_error("tracks");
                        }
                    }
                } else {
                    if ($ttype == "none") {
                        $t->{$type} = "+none";
                    }
                }
            }
            if (count((array) $t) || get($tracks, "_")) {
                $tracks->{$trackname} = $t;
            }
        }
        $sv->save("tracks", count((array) $tracks) ? json_encode($tracks) : null);
        return false;
    }
}
SettingGroup::register("tags", "Tags &amp; tracks", 700, new SettingRenderer_Tags());
SettingGroup::register_synonym("tracks", "tags");
예제 #3
0
// src/settings/s_sub.php -- HotCRP settings > submissions page
// HotCRP is Copyright (c) 2006-2016 Eddie Kohler and Regents of the UC
// Distributed under an MIT-like license; see LICENSE
class SettingRenderer_Submissions extends SettingRenderer
{
    function render($sv)
    {
        global $Conf, $Opt;
        $sv->echo_checkbox('sub_open', '<b>Open site for submissions</b>');
        echo "<div class='g'></div>\n";
        echo "<strong>Blind submission:</strong> Are author names hidden from reviewers?<br />\n";
        $sv->echo_radio_table("sub_blind", array(Conf::BLIND_ALWAYS => "Yes—submissions are anonymous", Conf::BLIND_NEVER => "No—author names are visible to reviewers", Conf::BLIND_UNTILREVIEW => "Blind until review—reviewers can see author names after submitting a review", Conf::BLIND_OPTIONAL => "Depends—authors decide whether to expose their names"));
        echo "<div class='g'></div>\n<table>\n";
        $sv->echo_entry_row("sub_reg", "Registration deadline");
        $sv->echo_entry_row("sub_sub", "Submission deadline");
        $sv->echo_entry_row("sub_grace", 'Grace period');
        echo "</table>\n";
        $sv->echo_radio_table("sub_freeze", array(0 => "Allow updates until the submission deadline (usually the best choice)", 1 => "Authors must freeze the final version of each submission"));
        echo "<div class='g'></div><table>\n";
        $sv->echo_checkbox_row('pc_seeall', "PC can see <i>all registered papers</i> until submission deadline<br /><small>Check this box if you want to collect review preferences before most papers are submitted. After the submission deadline, PC members can only see submitted papers.</small>");
        echo "</table>";
    }
    function crosscheck($sv)
    {
        if ($sv->has_interest("sub_open") && $sv->newv("sub_freeze", -1) == 0 && $sv->newv("sub_open") > 0 && $sv->newv("sub_sub") <= 0) {
            $sv->set_warning(null, "Authors can update their submissions until the deadline, but there is no deadline. This is sometimes unintentional. You probably should (1) specify a paper submission deadline; (2) select “Authors must freeze the final version of each submission”; or (3) manually turn off “Open site for submissions” when submissions complete.");
        }
    }
}
SettingGroup::register("sub", "Submissions", 300, new SettingRenderer_Submissions());
예제 #4
0
        }
        // actually create setting
        while (count($bs) > 0 && $bs[count($bs) - 1] == "") {
            array_pop($bs);
        }
        $sv->save("sub_banal_data", join(";", $bs) . $zoomarg);
        $e1 = $cf->errors;
        $s2 = $cf->check_file("{$ConfSitePATH}/src/sample.pdf", "a4;1;;3inx3in;14;15" . $zoomarg);
        $e2 = $cf->errors;
        $want_e2 = CheckFormat::ERR_PAPERSIZE | CheckFormat::ERR_PAGELIMIT | CheckFormat::ERR_TEXTBLOCK | CheckFormat::ERR_BODYFONTSIZE | CheckFormat::ERR_BODYLEADING;
        if ($s1 != 2 || $e1 != 0 || $s2 != 1 || ($e2 & $want_e2) != $want_e2) {
            $errors = "<div class=\"fx\"><table><tr><td>Analysis:&nbsp;</td><td>{$s1} {$e1} {$s2} {$e2} (expected 2 0 1 {$want_e2})</td></tr>" . "<tr><td class=\"nw\">Exit status:&nbsp;</td><td>" . htmlspecialchars($cf->banal_status) . "</td></tr>";
            if (trim($cf->banal_stdout)) {
                $errors .= "<tr><td>Stdout:&nbsp;</td><td><pre class=\"email\">" . htmlspecialchars($cf->banal_stdout) . "</pre></td></tr>";
            }
            if (trim($cf->banal_stdout)) {
                if (trim($cf->banal_stderr)) {
                    $errors .= "<tr><td>Stderr:&nbsp;</td><td><pre class=\"email\">" . htmlspecialchars($cf->banal_stderr) . "</pre></td></tr>";
                }
            }
            $errors .= "<tr><td>Check:&nbsp;</td><td>" . join("<br />\n", array_map(function ($x) {
                return $x[1];
            }, $cf->msgs)) . "</td></tr>";
            $sv->set_warning(null, "Running the automated paper checker on a sample PDF file produced unexpected results. You should disable it for now. <div id=\"foldbanal_warning\" class=\"foldc\">" . foldbutton("banal_warning", 0, "Checker output") . $errors . "</table></div></div>");
        }
        return false;
    }
}
SettingGroup::register("subform", "Submission form", 400, new SettingRenderer_SubForm());
SettingGroup::register_synonym("opt", "subform");
예제 #5
0
 private static function sort()
 {
     if (self::$sorted) {
         return;
     }
     uasort(self::$all, function ($a, $b) {
         if ($a->priority != $b->priority) {
             return $a->priority < $b->priority ? -1 : 1;
         } else {
             return strcasecmp($a->name, $b->name);
         }
     });
     foreach (self::$all as $name => $group) {
         usort($group->render, function ($a, $b) {
             if ($a[0] != $b[0]) {
                 return $a[0] < $b[0] ? -1 : 1;
             }
             if ($a[1] != $b[1]) {
                 return $a[1] < $b[1] ? -1 : 1;
             }
             return 0;
         });
     }
     self::$sorted = true;
 }
            }
        }
        foreach ($roundnames_set as $i) {
            $isuf = $i ? "_{$i}" : "";
            if (($v = parse_value($sv, "resp_open{$isuf}", Si::get("resp_open"))) !== null) {
                $sv->save("resp_open{$isuf}", $v <= 0 ? null : $v);
            }
            if (($v = parse_value($sv, "resp_done{$isuf}", Si::get("resp_done"))) !== null) {
                $sv->save("resp_done{$isuf}", $v <= 0 ? null : $v);
            }
            if (($v = parse_value($sv, "resp_grace{$isuf}", Si::get("resp_grace"))) !== null) {
                $sv->save("resp_grace{$isuf}", $v <= 0 ? null : $v);
            }
            if (($v = parse_value($sv, "resp_words{$isuf}", Si::get("resp_words"))) !== null) {
                $sv->save("resp_words{$isuf}", $v < 0 ? null : $v);
            }
            if (($v = parse_value($sv, "msg.resp_instrux{$isuf}", Si::get("msg.resp_instrux"))) !== null) {
                $sv->save("msg.resp_instrux{$isuf}", $v);
            }
        }
        if (count($roundnames) > 1 || $roundnames[0] !== 1) {
            $sv->save("resp_rounds", join(" ", $roundnames));
        } else {
            $sv->save("resp_rounds", null);
        }
        return false;
    }
}
SettingGroup::register("decisions", "Decisions", 800, new SettingRenderer_Decisions());
SettingGroup::register_synonym("dec", "decisions");
예제 #7
0
        echo '<div class="f-h">Examples: “HotOS XIV”, “NSDI \'14”</div>';
        echo "<div class=\"g\"></div>\n";
        if ($sv->oldv("opt.longName") == $sv->oldv("opt.shortName")) {
            $sv->set_oldv("opt.longName", "");
        }
        echo "<div class='f-c'>", $sv->label("opt.longName", "Conference name"), "</div>\n";
        $sv->echo_entry("opt.longName");
        echo '<div class="f-h">Example: “14th Workshop on Hot Topics in Operating Systems”</div>';
        echo "<div class=\"g\"></div>\n";
        echo "<div class='f-c'>", $sv->label("opt.conferenceSite", "Conference URL"), "</div>\n";
        $sv->echo_entry("opt.conferenceSite");
        echo '<div class="f-h">Example: “http://yourconference.org/”</div>';
        echo '<div class="lg"></div>', "\n";
        echo '<div class="f-c">', $sv->label("opt.contactName", "Name of site contact"), "</div>\n";
        $sv->echo_entry("opt.contactName");
        echo '<div class="g"></div>', "\n";
        echo "<div class='f-c'>", $sv->label("opt.contactEmail", "Email of site contact"), "</div>\n";
        $sv->echo_entry("opt.contactEmail");
        echo '<div class="f-h">The site contact is the contact point for users if something goes wrong. It defaults to the chair.</div>';
        echo '<div class="lg"></div>', "\n";
        echo '<div class="f-c">', $sv->label("opt.emailReplyTo", "Reply-To field for email"), "</div>\n";
        $sv->echo_entry("opt.emailReplyTo");
        echo '<div class="g"></div>', "\n";
        echo '<div class="f-c">', $sv->label("opt.emailCc", "Default Cc for reviewer email"), "</div>\n";
        $sv->echo_entry("opt.emailCc");
        echo '<div class="f-h">This applies to email sent to reviewers and email sent using the <a href="', hoturl("mail"), '">mail tool</a>. It doesn’t apply to account-related email or email sent to submitters.</div>';
    }
}
SettingGroup::register("basics", "Basics", 0, new SettingRenderer_Basics());
SettingGroup::register_synonym("info", "basics");
예제 #8
0
<?php

// src/settings/s_msg.php -- HotCRP settings > messages page
// HotCRP is Copyright (c) 2006-2016 Eddie Kohler and Regents of the UC
// Distributed under an MIT-like license; see LICENSE
class SettingRenderer_Messages extends SettingRenderer
{
    function render($sv)
    {
        $sv->echo_message("msg.home", "Home page message");
        $sv->echo_message("msg.clickthrough_submit", "Clickthrough submission terms", "<div class=\"hint fx\">Users must “accept” these terms to edit or submit a paper. Use HTML and include a headline, such as “&lt;h2&gt;Submission terms&lt;/h2&gt;”.</div>");
        $sv->echo_message("msg.submit", "Submission message", "<div class=\"hint fx\">This message will appear on paper editing pages.</div>");
        $sv->echo_message("msg.clickthrough_review", "Clickthrough reviewing terms", "<div class=\"hint fx\">Users must “accept” these terms to edit a review. Use HTML and include a headline, such as “&lt;h2&gt;Submission terms&lt;/h2&gt;”.</div>");
        $sv->echo_message("msg.conflictdef", "Definition of conflict of interest");
        $sv->echo_message("msg.revprefdescription", "Review preference instructions");
    }
}
SettingGroup::register("msg", "Messages", 200, new SettingRenderer_Messages());
            $fmap[$fid] = $f->has_options;
        }
        $samples = json_decode(file_get_contents("{$ConfSitePATH}/src/reviewformlibrary.json"));
        $req = array();
        if ($sv->use_req()) {
            foreach ($rf->fmap as $fid => $f) {
                foreach (ReviewForm_SettingParser::$setting_prefixes as $fx) {
                    if (isset($sv->req["{$fx}{$fid}"])) {
                        $req["{$fx}{$fid}"] = $sv->req["{$fx}{$fid}"];
                    }
                }
            }
        }
        $Conf->footerHtml('<div id="review_form_caption_description" style="display:none">' . '<p>Enter an HTML description for the review form.
Include any guidance you’d like to provide for reviewers.
Note that complex HTML will not appear on offline review forms.</p></div>' . '<div id="review_form_caption_options" style="display:none">' . '<p>Enter one option per line, numbered starting from 1 (higher numbers
are better). For example:</p>
<pre class="entryexample dark">1. Reject
2. Weak reject
3. Weak accept
4. Accept</pre>
<p>Or use consecutive capital letters (lower letters are better).</p>
<p>Normally scores are mandatory: a review with a missing score cannot be
submitted. Add a line “<code>No entry</code>” to make the score optional.</p></div>');
        $Conf->footerScript("review_form_settings(" . json_encode($fmap) . "," . json_encode($rf->unparse_full_json()) . "," . json_encode($samples) . "," . json_encode($sv->error_fields()) . "," . json_encode($req) . ")");
        echo Ht::hidden("has_review_form", 1), "<div id=\"reviewform_removedcontainer\"></div>", "<div id=\"reviewform_container\"></div>", Ht::button("Add score field", array("onclick" => "review_form_settings.add(1)")), "<span class='sep'></span>", Ht::button("Add text field", array("onclick" => "review_form_settings.add(0)"));
    }
}
SettingGroup::register("reviewform", "Review form", 600, new ReviewForm_SettingRenderer());
SettingGroup::register_synonym("rfo", "reviewform");
예제 #10
0
                        $sv->save("rev_roundtag", $rname);
                    }
                } else {
                    if (!($rerror = Conf::round_name_error($t))) {
                        $sv->save("rev_roundtag", $t);
                    } else {
                        $sv->set_error("rev_roundtag", $rerror);
                    }
                }
            }
        }
        if (count($this->rev_round_changes)) {
            $sv->need_lock["PaperReview"] = true;
            return true;
        } else {
            return false;
        }
    }
    public function save($sv, $si)
    {
        global $Conf;
        // remove references to deleted rounds
        foreach ($this->rev_round_changes as $x) {
            $Conf->qe("update PaperReview set reviewRound={$x['1']} where reviewRound={$x['0']}");
        }
    }
}
SettingGroup::register("reviews", "Reviews", 500, new SettingRenderer_Reviews());
SettingGroup::register_synonym("rev", "reviews");
SettingGroup::register_synonym("review", "reviews");