Example #1
0
 // Save any adjusted properties to the database.
 $properties->save();
 if (!$locked or $userObject->has_role(array('SysAdmin', 'Admin'))) {
     $old_modules = $properties->get_modules(true);
     if (!$locked or $userObject->has_role(array('SysAdmin'))) {
         Paper_utils::update_modules($paper_modules, $paperID, $mysqli, $userObject);
     }
     $paper_modules = $properties->get_modules(true);
     $utils = new GeneralUtils();
     if (!$utils->arrays_are_equal($old_modules, $paper_modules)) {
         $logger->track_change('Paper', $paperID, $userObject->get_user_ID(), implode(',', $old_modules), implode(',', $paper_modules), 'modules');
     }
     if (Paper_utils::update_reviewers($old_externals, $new_externals, 'external', $paperID, $mysqli)) {
         $logger->track_change('Paper', $paperID, $userObject->get_user_ID(), implode(',', array_keys($old_externals)), implode(',', $new_externals), 'externals');
     }
     if (Paper_utils::update_reviewers($old_internals, $new_internals, 'internal', $paperID, $mysqli)) {
         $logger->track_change('Paper', $paperID, $userObject->get_user_ID(), implode(',', array_keys($old_internals)), implode(',', $new_internals), 'internals');
     }
 }
 // Release objectives-based feedback
 if (isset($_POST['old_objectives_report']) and $_POST['old_objectives_report'] != '' and isset($_POST['objectives_report']) and $_POST['objectives_report'] == '0') {
     $editProperties = $mysqli->prepare("DELETE FROM feedback_release WHERE paper_id = ? AND type = 'objectives'");
     $editProperties->bind_param('i', $paperID);
     $editProperties->execute();
     $editProperties->close();
     $logger->track_change('Paper', $paperID, $userObject->get_user_ID(), 'Objectives-based Feedback', '', 'feedback');
 }
 if (isset($_POST['old_objectives_report']) and $_POST['old_objectives_report'] == '' and isset($_POST['objectives_report']) and $_POST['objectives_report'] == '1') {
     $editProperties = $mysqli->prepare("INSERT INTO feedback_release VALUES (NULL, ?, NOW(), 'objectives')");
     $editProperties->bind_param('i', $paperID);
     $editProperties->execute();