echo "</i></font><br><br>"; } echo "<font face='" . $theme['font_mainbody'] . "'><b>"; echo _("Random Rule"); echo "</b></font><br>"; $result = dpsql_query("SELECT anchor,subject,rule FROM rules WHERE document = '{$round->document}' ORDER BY RAND(NOW()) LIMIT 1"); $rule = mysql_fetch_assoc($result); echo "<i>" . $rule['subject'] . "</i><br>"; echo "" . $rule['rule'] . "<br>"; // TRANSLATORS: %1$s is the linked name of a random Guideline section. printf(_("See the %1\$s section of the <a href='%2\$s'>Guidelines</a>"), "<a href='{$round_doc_url}#" . $rule['anchor'] . "'>" . $rule['subject'] . "</a>", $round_doc_url); echo "<br><br>"; } thoughts_re_mentor_feedback($pagesproofed); if ($round->is_a_mentor_round()) { if (user_can_work_on_beginner_pages_in_round($round)) { mentor_banner($round); } } if ($pagesproofed <= 20) { if ($uao->can_access) { echo "<hr width='75%'>\n"; echo "<font face='" . $theme['font_mainbody'] . "'><b>"; echo _("Click on the title of a book in the list below to start proofreading."); echo "</b></font><br><br>\n"; } } else { // Link to queues. echo "<hr width='75%'>\n"; echo "<h4 align='center'>", _('Release Queues'), "</h4>"; $res = dpsql_query("\n SELECT COUNT(*)\n FROM queue_defns\n WHERE round_id='{$round->id}'\n ");
echo "<div class='calloutheader'>"; echo _("You can now see Site News."); echo "</div>"; echo "<p>"; echo _("Now that you have proofread 20 pages you can see the Site News. This is updated regularly with announcements from the administrators."); echo "</p>"; echo "<p><small>"; echo _("After a period of time, this message will no longer appear."); echo "</small></p>"; echo "</div>"; } show_news_for_page("HUB"); } // Show any mentor banners. foreach ($Round_for_round_id_ as $round) { if ($round->is_a_mentor_round() && user_can_work_on_beginner_pages_in_round($round)) { mentor_banner($round); } } // ============================================================================= echo "\n<hr>\n"; // ---------------------------------- // Get the project transitions for the number of projects completed today // set the timestamp representing the start of today $t_start_of_today = mktime(0, 0, 0, date('m'), date('d'), date('y')); // For transition events (event_type = 'transition'), details2 gives // the project's new state. $res = mysql_query("\n SELECT details2, count(distinct projectid)\n FROM project_events\n WHERE event_type = 'transition' AND timestamp >= {$t_start_of_today}\n GROUP BY details2\n") or die(mysql_error()); $n_projects_transitioned_to_state_ = array(); while (list($project_state, $count) = mysql_fetch_row($res)) { $n_projects_transitioned_to_state_[$project_state] = $count;
$other_mentoring_rounds = array(); foreach ($Round_for_round_id_ as $round) { if ($round->is_a_mentor_round() && $round->id != $mentoring_round->id) { $other_mentoring_rounds[] = $round; } } if (count($other_mentoring_rounds) > 0) { echo "<p>(" . _('Show this page for:'); foreach ($other_mentoring_rounds as $other_round) { $url = "{$code_url}/tools/proofers/for_mentors.php?round_id={$other_round->id}"; echo " <a href='{$url}'>{$other_round->id}</a>"; } echo ")</p>"; } // --------------------------------------------------------------- if (!user_can_work_on_beginner_pages_in_round($mentoring_round)) { echo sprintf(_("You do not have access to 'Mentors Only' projects in %s."), $mentoring_round->id); echo "\n"; exit; } // --------------------------------------------------------------- // For each mentorable project (in this round), // show a summary (one line per mentee) // and then a listing (one line per page). echo "<h2>" . sprintf(_("Pages available to Mentors in round %s"), $mentoring_round->id) . "</h2>"; echo "<br>" . _("Oldest project listed first.") . "<br>"; $mentored_round = $mentoring_round->mentee_round; $result = mysql_query(project_sql($mentoring_round)); while ($proj = mysql_fetch_object($result)) { // Display project summary info echo "<br>";