jenkins-bot has submitted this change and it was merged.

Change subject: Update p2 export report
......................................................................


Update p2 export report

Add region, global north/south designation and language group to the
existing report.

Bug: T94645
Change-Id: I018060150f924922a80d8a05b4dab77d90304a1f
---
M data/i18n/en.json
M data/i18n/qqq.json
M data/templates/review/p2/list.html
M src/Wikimania/Scholarship/Controllers/Review/Phase2List.php
M src/Wikimania/Scholarship/Dao/Apply.php
5 files changed, 19 insertions(+), 4 deletions(-)

Approvals:
  BryanDavis: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/data/i18n/en.json b/data/i18n/en.json
index 6212254..b98c663 100644
--- a/data/i18n/en.json
+++ b/data/i18n/en.json
@@ -242,6 +242,9 @@
        "review-list-p1-score": "p1 score",
        "review-list-p2-score": "p2 score",
        "review-list-residence": "Residence",
+       "review-list-region": "Region",
+       "review-list-globalns": "Global North/South",
+       "review-list-size": "Size",
        "review-list-gender": "Gender",
        "review-list-age": "Age",
        "review-list-num-p2": "# p2 scorers",
diff --git a/data/i18n/qqq.json b/data/i18n/qqq.json
index 899a909..f0a00da 100644
--- a/data/i18n/qqq.json
+++ b/data/i18n/qqq.json
@@ -217,6 +217,9 @@
        "review-list-p1-score": "Table column header, submission phase 1 
score.\n{{Related|Wsa-review-list}}",
        "review-list-p2-score": "Table column header, submission phase 2 
score.\n{{Related|Wsa-review-list}}",
        "review-list-residence": "Table column header, applicant country of 
residence.\n{{Identical|Residence}}",
+       "review-list-region": "Table column header, geographic region.",
+       "review-list-globalns": "Table column header, developmental region.",
+       "review-list-size": "Table column header, wiki size.",
        "review-list-gender": "Table column header, applicant 
gender.\n{{Related|Wsa-review-list}}\n{{Identical|Gender}}",
        "review-list-age": "Table column header, applicant age.\n\nPreceded by 
{{msg-wm|Wsa-review-list-gender}}.\n{{Identical|Age}}",
        "review-list-num-p2": "Table column header, number of phase 2 reviewers 
of submission.\n{{Related|Wsa-review-list}}",
diff --git a/data/templates/review/p2/list.html 
b/data/templates/review/p2/list.html
index dec42cd..ff2faa3 100644
--- a/data/templates/review/p2/list.html
+++ b/data/templates/review/p2/list.html
@@ -52,6 +52,9 @@
     <th>{{ 'review-list-name'|message }}</th>
     <th>{{ 'review-list-email'|message }}</th>
     <th>{{ 'review-list-residence'|message }}</th>
+    <th>{{ 'review-list-region'|message }}</th>
+    <th>{{ 'review-list-globalns'|message }}</th>
+    <th>{{ 'review-list-size'|message }}</th>
     <th>{{ 'review-list-gender'|message }}</th>
     <th>{{ 'review-list-age'|message }}</th>
     <th>{{ 'review-list-num-p2'|message }}</th>
@@ -66,6 +69,9 @@
     <td><a href="{{ urlFor( 'review_view' ) }}?id={{ row.id }}&phase=2" 
target="_blank">{{ row.fname }} {{ row.lname }}</a></td>
     <td>{{ row.email }}</td>
     <td>{{ row.country_name }}</td>
+    <td>{{ row.region }}</td>
+    <td>{{ row.globalns }}</td>
+    <td>{{ row.size }}</td>
     <td>{{ row.gender }}</td>
     <td>{{ row.age }}</td>
     <td>{{ row.nscorers }}</td>
diff --git a/src/Wikimania/Scholarship/Controllers/Review/Phase2List.php 
b/src/Wikimania/Scholarship/Controllers/Review/Phase2List.php
index 1c5bf6c..aed90b7 100644
--- a/src/Wikimania/Scholarship/Controllers/Review/Phase2List.php
+++ b/src/Wikimania/Scholarship/Controllers/Review/Phase2List.php
@@ -75,7 +75,7 @@
                        $this->response->headers->set( 'Content-Disposition',
                                'attachment; filename="' . "p2_{$region}_{$ts}" 
. '.csv"' );
 
-                       echo 'id,name,email,residence,gender,age,"# p2 
scorers",relexp,expshare,"p2 score"', "\n";
+                       echo 'id,name,email,residence,region,"global 
north/south",size,gender,age,"# p2 scorers",relexp,expshare,"p2 score"', "\n";
 
                        $fp = fopen( 'php://output', 'w' );
                        foreach ( $rows as $row ) {
@@ -84,6 +84,9 @@
                                        ltrim( "{$row['fname']} 
{$row['lname']}", '=@' ),
                                        ltrim( $row['email'], '=@' ),
                                        ltrim( $row['country_name'], '=@' ),
+                                       ltrim( $row['region'], '=@' ),
+                                       ltrim( $row['globalns'], '=@' ),
+                                       ltrim( $row['size'], '=@' ),
                                        ltrim( $row['gender'], '=@' ),
                                        (int)$row['age'],
                                        (int)$row['nscorers'],
diff --git a/src/Wikimania/Scholarship/Dao/Apply.php 
b/src/Wikimania/Scholarship/Dao/Apply.php
index 1b9c25c..1770b51 100644
--- a/src/Wikimania/Scholarship/Dao/Apply.php
+++ b/src/Wikimania/Scholarship/Dao/Apply.php
@@ -561,6 +561,9 @@
                        "rkexps.expshare AS expshare",
                        "(COALESCE(:relexp * rkrexp.relexp, 0) + " .
                        "COALESCE(:expshare * rkexps.expshare, 0)) as p2score ",
+                       'c.region',
+                       'c.globalns',
+                       'l.size',
                );
 
                $having = array(
@@ -585,19 +588,16 @@
 
                if ( $region != 'All' ) {
                        $params['region'] = $region;
-                       $fields[] = 'c.region';
                        $having[] = 'c.region = :region';
                }
 
                if ( $globalns != 'All' ) {
                        $params['globalns'] = $globalns;
-                       $fields[] = 'c.globalns';
                        $having[] = 'c.globalns = :globalns';
                }
 
                if ( $languageGroup != 'All' ) {
                        $params['languageGroup'] = $languageGroup;
-                       $fields[] = 'l.size';
                        $having[] = 'l.size = :languageGroup';
                }
 

-- 
To view, visit https://gerrit.wikimedia.org/r/201084
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I018060150f924922a80d8a05b4dab77d90304a1f
Gerrit-PatchSet: 2
Gerrit-Project: wikimedia/wikimania-scholarships
Gerrit-Branch: master
Gerrit-Owner: BryanDavis <bda...@wikimedia.org>
Gerrit-Reviewer: Aude <aude.w...@gmail.com>
Gerrit-Reviewer: BryanDavis <bda...@wikimedia.org>
Gerrit-Reviewer: Chad <ch...@wikimedia.org>
Gerrit-Reviewer: Niharika29 <niharikakohl...@gmail.com>
Gerrit-Reviewer: Siebrand <siebr...@kitano.nl>
Gerrit-Reviewer: jenkins-bot <>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to