From 02f4ef27a6fbe478588cedae28f9d9001756ab38 Mon Sep 17 00:00:00 2001 From: BlueRaja Date: Fri, 17 Aug 2012 20:03:51 -0500 Subject: Ignore the move-count from today - Memberslist Page In order to not show "0 moves" for an entire day, "This Week" now shows scores from the past 7 days rather than the current week. They can still view "this week's" scores on the scoreboard page - not sure if we'd want to change that for consistency or not. --- pages/memberlist.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pages/memberlist.php b/pages/memberlist.php index 191bfa5..a682579 100644 --- a/pages/memberlist.php +++ b/pages/memberlist.php @@ -58,7 +58,7 @@ $sql = "SELECT (SELECT SUM(moves) FROM solutions WHERE solutions.userID = users.ID) AS totalMoves, (SELECT SUM(moves) FROM solutions WHERE solutions.userID = users.ID AND - YEARweek(solutions.dateModified) = YEARweek(CURRENT_DATE)) AS totalMovesThisWeek, + solutions.dateModified BETWEEN DATE_SUB(CURRENT_DATE, INTERVAL 7 DAY) AND CURRENT_DATE) AS totalMovesThisWeek, (SELECT COUNT(*) FROM solutions WHERE solutions.userID = users.ID) AS totalMazes, SUM(CASE WHEN statistics.type IN (32, 33, 34, 35) THEN statistics.value ELSE 0 END) as totalWins, SUM(CASE WHEN statistics.type IN (1, 2, 3, 4) THEN statistics.value ELSE 0 END) as totalTies, @@ -88,7 +88,7 @@ $cat['Moves']['c'] = 'totalMoves'; $cat['Moves']['title'] = 'Total Moves Mazed'; $cat['This Week']['c'] = 'totalMovesThisWeek'; -$cat['This Week']['title'] = 'Total Moves Mazed This Week (Starting Monday)'; +$cat['This Week']['title'] = 'Total Moves In Past 7 Days (Excluding Today)'; $cat['Wins']['c'] = 'totalWins'; $cat['Wins']['title'] = 'Total Wins (Champion)'; -- cgit v1.2.3