Skip to content
Permalink
Browse files

Braces, cleanup.

  • Loading branch information
kohler committed Nov 16, 2019
1 parent 79e2e6c commit 26ba118fa3c973f47a351a6bd15835e4d5d193f3
Showing with 161 additions and 101 deletions.
  1. +5 −4 assign.php
  2. +3 −6 search.php
  3. +132 −78 src/assignmentset.php
  4. +21 −13 src/paperapi.php
@@ -92,19 +92,20 @@ function pcAssignments($qreq) {
$aset->enable_papers($prow);
$aset->parse(join("", $t));
if ($aset->execute()) {
if ($qreq->ajax)
if ($qreq->ajax) {
json_exit(["ok" => true]);
else {
} else {
$Conf->confirmMsg("Assignments saved." . $aset->errors_div_html());
$Conf->self_redirect($qreq);
// NB normally does not return
loadRows();
}
} else {
if ($qreq->ajax)
if ($qreq->ajax) {
json_exit(["ok" => false, "error" => join("<br />", $aset->errors_html())]);
else
} else {
$Conf->errorMsg(join("<br />", $aset->errors_html()));
}
}
}

@@ -7,8 +7,10 @@
if ($Me->is_empty())
$Me->escape();

if (isset($Qreq->default) && $Qreq->defaultact)
if (isset($Qreq->default) && $Qreq->defaultact) {
$Qreq->fn = $Qreq->defaultact;
}
assert(!!$Qreq->ajax);


// paper group
@@ -127,11 +129,6 @@ function savesearch() {
}


// exit early if Ajax
if ($Qreq->ajax)
json_exit(["response" => ""]);


// set display options, including forceShow if chair
$pldisplay = $Me->session("pldisplay");
if ($Me->privChair && !isset($Qreq->forceShow)

0 comments on commit 26ba118

Please sign in to comment.
You can’t perform that action at this time.