Exemple #1
0
 function selectors()
 {
     $sel = array("students" => "All students");
     foreach (ContactView::pset_list(true, false) as $pset) {
         if (Contact::student_can_see_pset($pset)) {
             if (!$pset->gitless || $pset->partner) {
                 $sel[] = array("optgroup", $pset->title);
             }
             if (!$pset->gitless) {
                 $sel[$pset->urlkey . ":workingrepo"] = "{$pset->title}, working repo";
                 $sel[$pset->urlkey . ":brokenrepo"] = "{$pset->title}, broken repo";
                 $sel[$pset->urlkey . ":openrepo"] = "{$pset->title}, open repo";
                 $sel[$pset->urlkey . ":norepo"] = "{$pset->title}, no repo";
             }
             if ($pset->partner) {
                 $sel[$pset->urlkey . ":partner"] = "{$pset->title}, partner";
                 $sel[$pset->urlkey . ":nopartner"] = "{$pset->title}, no partner";
             }
         }
     }
     $sel[] = array("optgroup");
     $sel["pc"] = "TFs";
     foreach (pcTags() as $t) {
         if ($t != "pc") {
             $sel["pc:{$t}"] = "#{$t} TFs";
         }
     }
     $sel["all"] = "All users";
     $usersel = array("all" => "All", "college" => "College", "extension" => "Extension");
     return Ht::select("recipients", $sel, $this->type, array("id" => "recipients", "onchange" => "setmailpsel(this)")) . "  " . Ht::select("userrecipients", $usersel, $this->usertype, array("id" => "userrecipients"));
 }
Exemple #2
0
    $result = Dbl::qe("select cn.*, rg.gradercid main_gradercid, rg.gradehash\n        from CommitNotes cn\n        left join RepositoryGrade rg on (rg.repoid=cn.repoid and rg.pset=cn.pset)\n        where hasactiveflags=1");
    if (edb_nrows($result)) {
        echo $sep;
        show_regrades($result);
        if ($Profile) {
            echo "<div>Δt ", sprintf("%.06f", microtime(true) - $t0), "</div>";
        }
        $sep = "<hr />\n";
    }
    $pctable = [];
    foreach (pcMembers() as $pc) {
        if ($pc->firstName && !$pc->firstNameAmbiguous) {
            $pctable[$pc->contactId] = $pc->firstName;
        } else {
            $pctable[$pc->contactId] = Text::name_text($pc);
        }
    }
    Ht::stash_script('peteramati_grader_map=' . json_encode($pctable) . ';');
    foreach (ContactView::pset_list($Me, true) as $pset) {
        echo $sep;
        show_pset_table($pset, $Me);
        $sep = "<hr />\n";
    }
    Ht::stash_script("\$('.s61check').click(click_s61check)");
    if ($LastPsetFix) {
        $Conf->log("Repository.lastpset links are bogus", $Me);
        Contact::update_all_repo_lastpset();
    }
}
echo "<div class='clear'></div>\n";
$Conf->footer();