https://www.mediawiki.org/wiki/Special:Code/MediaWiki/109660

Revision: 109660
Author:   jeroendedauw
Date:     2012-01-20 22:57:57 +0000 (Fri, 20 Jan 2012)
Log Message:
-----------
follow up to r109656 - removing obsolete file, adding newly needed files and 
updating names on a bunch of places

Modified Paths:
--------------
    trunk/extensions/EducationProgram/EducationProgram.i18n.alias.php
    trunk/extensions/EducationProgram/EducationProgram.php

Added Paths:
-----------
    trunk/extensions/EducationProgram/specials/SpecialCA.php
    trunk/extensions/EducationProgram/specials/SpecialCAs.php
    trunk/extensions/EducationProgram/specials/SpecialOA.php
    trunk/extensions/EducationProgram/specials/SpecialOAs.php

Removed Paths:
-------------
    trunk/extensions/EducationProgram/specials/SpecialAmbassador.php
    trunk/extensions/EducationProgram/specials/SpecialAmbassadors.php

Modified: trunk/extensions/EducationProgram/EducationProgram.i18n.alias.php
===================================================================
--- trunk/extensions/EducationProgram/EducationProgram.i18n.alias.php   
2012-01-20 22:46:35 UTC (rev 109659)
+++ trunk/extensions/EducationProgram/EducationProgram.i18n.alias.php   
2012-01-20 22:57:57 UTC (rev 109660)
@@ -23,13 +23,15 @@
        'Students' => array( 'Students' ),
        'Course' => array( 'Course' ),
        'Courses' => array( 'Courses' ),
-       'Term' => array( 'Term' ),
-       'Terms' => array( 'Terms' ),
+       'MasterCourse' => array( 'MasterCourse' ),
+       'MasterCourses' => array( 'MasterCourses' ),
        'EducationProgram' => array( 'EducationProgram' ),
        'EditCourse' => array( 'EditCourse' ),
        'EditInstitution' => array( 'EditInstitution' ),
-       'EditTerm' => array( 'EditTerm' ),
+       'EditMC' => array( 'EditMC' ),
        'Enroll' => array( 'Enroll' ),
-       'Ambassadors' => array( 'Ambassadors' ),
-       'Ambassador' => array( 'Ambassador' ),
+       'CampusAmbassadors' => array( 'CampusAmbassadors' ),
+       'OnlineAmbassadors' => array( 'OnlineAmbassadors' ),
+       'CampusAmbassador' => array( 'CampusAmbassador' ),
+       'OnlineAmbassador' => array( 'OnlineAmbassador' ),
 );

Modified: trunk/extensions/EducationProgram/EducationProgram.php
===================================================================
--- trunk/extensions/EducationProgram/EducationProgram.php      2012-01-20 
22:46:35 UTC (rev 109659)
+++ trunk/extensions/EducationProgram/EducationProgram.php      2012-01-20 
22:57:57 UTC (rev 109660)
@@ -9,7 +9,9 @@
  *
  * The source code makes use of a number of terms different from but 
corresponding to those in the UI:
  * * Org instead of Institution
- * * Mentor instead of Ambassador
+ * * MC for master course
+ * * CA for campus ambassador
+ * * OA for online ambassador
  *
  * @file EducationProgram.php
  * @ingroup EducationProgram
@@ -63,11 +65,11 @@
 
 $wgAutoloadClasses['EPCourse']                                                 
= dirname( __FILE__ ) . '/includes/EPCourse.php';
 $wgAutoloadClasses['EPCoursePager']                            = dirname( 
__FILE__ ) . '/includes/EPCoursePager.php';
+$wgAutoloadClasses['EPMC']                                             = 
dirname( __FILE__ ) . '/includes/EPMC.php';
+$wgAutoloadClasses['EPMCPager']                                = dirname( 
__FILE__ ) . '/includes/EPMCPager.php';
 $wgAutoloadClasses['EPDBObject']                                       = 
dirname( __FILE__ ) . '/includes/EPDBObject.php';
 $wgAutoloadClasses['EPInstructor']                                     = 
dirname( __FILE__ ) . '/includes/EPInstructor.php';
 $wgAutoloadClasses['EPLogFormatter']                           = dirname( 
__FILE__ ) . '/includes/EPLogFormatter.php';
-$wgAutoloadClasses['EPMentor']                                                 
= dirname( __FILE__ ) . '/includes/EPMentor.php';
-$wgAutoloadClasses['EPMentorPager']                            = dirname( 
__FILE__ ) . '/includes/EPMentorPager.php';
 $wgAutoloadClasses['EPOrg']                                            = 
dirname( __FILE__ ) . '/includes/EPOrg.php';
 $wgAutoloadClasses['EPOrgPager']                                       = 
dirname( __FILE__ ) . '/includes/EPOrgPager.php';
 $wgAutoloadClasses['EPPager']                                          = 
dirname( __FILE__ ) . '/includes/EPPager.php';
@@ -76,12 +78,16 @@
 $wgAutoloadClasses['EPTerm']                                           = 
dirname( __FILE__ ) . '/includes/EPTerm.php';
 $wgAutoloadClasses['EPTermPager']                                      = 
dirname( __FILE__ ) . '/includes/EPTermPager.php';
 $wgAutoloadClasses['EPUtils']                                          = 
dirname( __FILE__ ) . '/includes/EPUtils.php';
+$wgAutoloadClasses['EPOA']                                                 = 
dirname( __FILE__ ) . '/includes/EPOA.php';
+$wgAutoloadClasses['EPOAPager']                                    = dirname( 
__FILE__ ) . '/includes/EPOAPager.php';
+$wgAutoloadClasses['EPCA']                                         = dirname( 
__FILE__ ) . '/includes/EPCA.php';
+$wgAutoloadClasses['EPCAPager']                                    = dirname( 
__FILE__ ) . '/includes/EPCAPager.php';
 
 $wgAutoloadClasses['SpecialCourse']                            = dirname( 
__FILE__ ) . '/specials/SpecialCourse.php';
 $wgAutoloadClasses['SpecialCourses']                           = dirname( 
__FILE__ ) . '/specials/SpecialCourses.php';
 $wgAutoloadClasses['SpecialEditCourse']                        = dirname( 
__FILE__ ) . '/specials/SpecialEditCourse.php';
 $wgAutoloadClasses['SpecialEditInstitution']           = dirname( __FILE__ ) . 
'/specials/SpecialEditInstitution.php';
-$wgAutoloadClasses['SpecialEditTerm']                          = dirname( 
__FILE__ ) . '/specials/SpecialEditTerm.php';
+$wgAutoloadClasses['SpecialEditMC']                            = dirname( 
__FILE__ ) . '/specials/SpecialEditMC.php';
 $wgAutoloadClasses['SpecialEducationProgram']          = dirname( __FILE__ ) . 
'/specials/SpecialEducationProgram.php';
 $wgAutoloadClasses['SpecialEPFormPage']                        = dirname( 
__FILE__ ) . '/specials/SpecialEPFormPage.php';
 $wgAutoloadClasses['SpecialEPPage']                            = dirname( 
__FILE__ ) . '/specials/SpecialEPPage.php';
@@ -90,11 +96,13 @@
 $wgAutoloadClasses['SpecialMyCourses']                                 = 
dirname( __FILE__ ) . '/specials/SpecialMyCourses.php';
 $wgAutoloadClasses['SpecialStudent']                           = dirname( 
__FILE__ ) . '/specials/SpecialStudent.php';
 $wgAutoloadClasses['SpecialStudents']                          = dirname( 
__FILE__ ) . '/specials/SpecialStudents.php';
-$wgAutoloadClasses['SpecialTerm']                                      = 
dirname( __FILE__ ) . '/specials/SpecialTerm.php';
-$wgAutoloadClasses['SpecialTerms']                                     = 
dirname( __FILE__ ) . '/specials/SpecialTerms.php';
+$wgAutoloadClasses['SpecialMC']                                        = 
dirname( __FILE__ ) . '/specials/SpecialMC.php';
+$wgAutoloadClasses['SpecialMCs']                                       = 
dirname( __FILE__ ) . '/specials/SpecialMCs.php';
 $wgAutoloadClasses['SpecialEnroll']                            = dirname( 
__FILE__ ) . '/specials/SpecialEnroll.php';
-$wgAutoloadClasses['SpecialAmbassadors']                       = dirname( 
__FILE__ ) . '/specials/SpecialAmbassadors.php';
-$wgAutoloadClasses['SpecialAmbassador']                        = dirname( 
__FILE__ ) . '/specials/SpecialAmbassador.php';
+$wgAutoloadClasses['SpecialCAs']                               = dirname( 
__FILE__ ) . '/specials/SpecialCAs.php';
+$wgAutoloadClasses['SpecialOAs']                               = dirname( 
__FILE__ ) . '/specials/SpecialOAs.php';
+$wgAutoloadClasses['SpecialCA']                                = dirname( 
__FILE__ ) . '/specials/SpecialCA.php';
+$wgAutoloadClasses['SpecialOA']                                = dirname( 
__FILE__ ) . '/specials/SpecialOA.php';
 
 // Special pages
 $wgSpecialPages['MyCourses']                                           = 
'SpecialMyCourses';
@@ -104,15 +112,17 @@
 $wgSpecialPages['Students']                                            = 
'SpecialStudents';
 $wgSpecialPages['Course']                                                      
= 'SpecialCourse';
 $wgSpecialPages['Courses']                                                     
= 'SpecialCourses';
-$wgSpecialPages['Term']                                                        
= 'SpecialTerm';
-$wgSpecialPages['Terms']                                                       
= 'SpecialTerms';
+$wgSpecialPages['MasterCourse']                                        = 
'SpecialMC';
+$wgSpecialPages['MasterCourses']                                       = 
'SpecialMCs';
 $wgSpecialPages['EducationProgram']                            = 
'SpecialEducationProgram';
 $wgSpecialPages['EditCourse']                                          = 
'SpecialEditCourse';
 $wgSpecialPages['EditInstitution']                                     = 
'SpecialEditInstitution';
-$wgSpecialPages['EditTerm']                                            = 
'SpecialEditTerm';
+$wgSpecialPages['EditMC']                                                  = 
'SpecialEditMC';
 $wgSpecialPages['Enroll']                                              = 
'SpecialEnroll';
-$wgSpecialPages['Ambassadors']                                         = 
'SpecialAmbassadors';
-$wgSpecialPages['Ambassador']                                  = 
'SpecialAmbassador';
+$wgSpecialPages['CampusAmbassadors']                   = 'SpecialCAs';
+$wgSpecialPages['OnlineAmbassadors']                   = 'SpecialOAs';
+$wgSpecialPages['CampusAmbassador']                    = 'SpecialCA';
+$wgSpecialPages['OnlineAmbassador']                    = 'SpecialOA';
 
 $wgSpecialPageGroups['MyCourses']                                      = 
'education';
 $wgSpecialPageGroups['Institution']                            = 'education';
@@ -121,21 +131,22 @@
 $wgSpecialPageGroups['Students']                                       = 
'education';
 $wgSpecialPageGroups['Course']                                                 
= 'education';
 $wgSpecialPageGroups['Courses']                                        = 
'education';
-$wgSpecialPageGroups['Term']                                           = 
'education';
-$wgSpecialPageGroups['Terms']                                          = 
'education';
+$wgSpecialPageGroups['MasterCourse']                           = 'education';
+$wgSpecialPageGroups['MasterCourses']                          = 'education';
 $wgSpecialPageGroups['EducationProgram']                       = 'education';
 $wgSpecialPageGroups['EditCourse']                                     = 
'education';
 $wgSpecialPageGroups['EditInstitution']                        = 'education';
-$wgSpecialPageGroups['EditTerm']                                       = 
'education';
-$wgSpecialPageGroups['Ambassadors']                            = 'education';
-$wgSpecialPageGroups['Ambassador']                                     = 
'education';
+$wgSpecialPageGroups['EditMC']                                             = 
'education';
+$wgSpecialPageGroups['CampusAmbassadors']                      = 'education';
+$wgSpecialPageGroups['OnlineAmbassadors']                      = 'education';
+$wgSpecialPageGroups['CampusAmbassador']                       = 'education';
+$wgSpecialPageGroups['OnlineAmbassador']                       = 'education';
 
 // DB object classes
 $egEPDBObjects = array();
 $egEPDBObjects['EPOrg'] = array( 'table' => 'ep_orgs', 'prefix' => 'org_' );
+$egEPDBObjects['EPMC'] = array( 'table' => 'ep_mcs', 'prefix' => 'mc_' );
 $egEPDBObjects['EPCourse'] = array( 'table' => 'ep_courses', 'prefix' => 
'course_' );
-$egEPDBObjects['EPTerm'] = array( 'table' => 'ep_terms', 'prefix' => 'term_' );
-$egEPDBObjects['EPMentor'] = array( 'table' => 'ep_mentors', 'prefix' => 
'mentor_' );
 $egEPDBObjects['EPStudent'] = array( 'table' => 'ep_students', 'prefix' => 
'student_' );
 $egEPDBObjects[] = array( 'table' => 'ep_students_per_term', 'prefix' => 
'spt_' );
 

Deleted: trunk/extensions/EducationProgram/specials/SpecialAmbassador.php
===================================================================
--- trunk/extensions/EducationProgram/specials/SpecialAmbassador.php    
2012-01-20 22:46:35 UTC (rev 109659)
+++ trunk/extensions/EducationProgram/specials/SpecialAmbassador.php    
2012-01-20 22:57:57 UTC (rev 109660)
@@ -1,82 +0,0 @@
-<?php
-
-/**
- * Shows the info for a single ambassador.
- *
- * @since 0.1
- *
- * @file SpecialAmbassador.php
- * @ingroup EducationProgram
- *
- * @licence GNU GPL v3 or later
- * @author Jeroen De Dauw < [email protected] >
- */
-class SpecialAmbassador extends SpecialEPPage {
-
-       /**
-        * Constructor.
-        *
-        * @since 0.1
-        */
-       public function __construct() {
-               parent::__construct( 'Ambassador' );
-       }
-
-       /**
-        * Main method.
-        *
-        * @since 0.1
-        *
-        * @param string $subPage
-        */
-       public function execute( $subPage ) {
-               parent::execute( $subPage );
-
-               $out = $this->getOutput();
-
-               if ( trim( $subPage ) === '' ) {
-                       $this->getOutput()->redirect( SpecialPage::getTitleFor( 
'Ambassadors' )->getLocalURL() );
-               }
-               else {
-                       $out->setPageTitle( wfMsgExt( 'ep-ambassador-title', 
'parsemag', $this->subPage ) );
-
-                       $this->displayNavigation();
-
-                       $mentor = false; // EPMentor::selectRow( null, array( 
'id' => $this->subPage ) );
-
-                       if ( $mentor === false ) {
-                               $this->showWarning( wfMessage( 
'ep-ambassador-does-not-exist', $this->subPage ) );
-                       }
-                       else {
-                               $this->displaySummary( $mentor );
-                       }
-               }
-       }
-
-       /**
-        * Gets the summary data.
-        *
-        * @since 0.1
-        *
-        * @param EPMentor $mentor
-        *
-        * @return array
-        */
-       protected function getSummaryData( EPDBObject $mentor ) {
-               $stats = array();
-
-               $orgs = array();
-
-               foreach ( $mentor->getOrgs( 'name' ) as /* EPOrg */ $org ) {
-                       $orgs[] = Linker::linkKnown(
-                               SpecialPage::getTitleFor( 'Institution', 
$org->getField( 'name' ) ),
-                               htmlspecialchars( $org->getField( 'name' ) )
-                       );
-               }
-
-               $stats['orgs'] = $this->getLanguage()->pipeList( $orgs );
-
-               return $stats;
-       }
-
-}

Deleted: trunk/extensions/EducationProgram/specials/SpecialAmbassadors.php
===================================================================
--- trunk/extensions/EducationProgram/specials/SpecialAmbassadors.php   
2012-01-20 22:46:35 UTC (rev 109659)
+++ trunk/extensions/EducationProgram/specials/SpecialAmbassadors.php   
2012-01-20 22:57:57 UTC (rev 109660)
@@ -1,45 +0,0 @@
-<?php
-
-/**
- * Page listing all mentors in a pager with filter control.
- *
- * @since 0.1
- *
- * @file SpecialAmbassadors.php
- * @ingroup EducationProgram
- *
- * @licence GNU GPL v3 or later
- * @author Jeroen De Dauw < [email protected] >
- */
-class SpecialAmbassadors extends SpecialEPPage {
-
-       /**
-        * Constructor.
-        *
-        * @since 0.1
-        */
-       public function __construct() {
-               parent::__construct( 'Ambassadors' );
-       }
-
-       /**
-        * Main method.
-        *
-        * @since 0.1
-        *
-        * @param string|null $subPage
-        */
-       public function execute( $subPage ) {
-               parent::execute( $subPage );
-
-               if ( $this->subPage === '' ) {
-                       $this->displayNavigation();
-                       EPMentor::displayPager( $this->getContext() );
-               }
-               else {
-                       // TODO
-                       // $this->getOutput()->redirect( 
SpecialPage::getTitleFor( 'Institution', $this->subPage )->getLocalURL() );
-               }
-       }
-
-}

Added: trunk/extensions/EducationProgram/specials/SpecialCA.php
===================================================================
--- trunk/extensions/EducationProgram/specials/SpecialCA.php                    
        (rev 0)
+++ trunk/extensions/EducationProgram/specials/SpecialCA.php    2012-01-20 
22:57:57 UTC (rev 109660)
@@ -0,0 +1,71 @@
+<?php
+
+/**
+ * Shows the info for a single campus ambassador.
+ *
+ * @since 0.1
+ *
+ * @file SpecialCA.php
+ * @ingroup EducationProgram
+ *
+ * @licence GNU GPL v3 or later
+ * @author Jeroen De Dauw < [email protected] >
+ */
+class SpecialCA extends SpecialEPPage {
+
+       /**
+        * Constructor.
+        *
+        * @since 0.1
+        */
+       public function __construct() {
+               parent::__construct( 'CampusAmbassador' );
+       }
+
+       /**
+        * Main method.
+        *
+        * @since 0.1
+        *
+        * @param string $subPage
+        */
+       public function execute( $subPage ) {
+               parent::execute( $subPage );
+
+               $out = $this->getOutput();
+
+               if ( trim( $subPage ) === '' ) {
+                       $this->getOutput()->redirect( SpecialPage::getTitleFor( 
'CampusAmbassadors' )->getLocalURL() );
+               }
+               else {
+                       $out->setPageTitle( wfMsgExt( 'ep-ca-title', 
'parsemag', $this->subPage ) );
+
+                       $this->displayNavigation();
+
+                       $ca = false; // TODO
+
+                       if ( $ca === false ) {
+                               $this->showWarning( wfMessage( 
'ep-ca-does-not-exist', $this->subPage ) );
+                       }
+                       else {
+                               $this->displaySummary( $ca );
+                       }
+               }
+       }
+
+       /**
+        * Gets the summary data.
+        *
+        * @since 0.1
+        *
+        * @param EPCA $ca
+        *
+        * @return array
+        */
+       protected function getSummaryData( EPDBObject $ca ) {
+               $stats = array();
+
+               return $stats;
+       }
+
+}

Added: trunk/extensions/EducationProgram/specials/SpecialCAs.php
===================================================================
--- trunk/extensions/EducationProgram/specials/SpecialCAs.php                   
        (rev 0)
+++ trunk/extensions/EducationProgram/specials/SpecialCAs.php   2012-01-20 
22:57:57 UTC (rev 109660)
@@ -0,0 +1,46 @@
+<?php
+
+/**
+ * Page listing campus ambassadors in a pager with filter control.
+ *
+ * @since 0.1
+ *
+ * @file SpecialCAs.php
+ * @ingroup EducationProgram
+ *
+ * @licence GNU GPL v3 or later
+ * @author Jeroen De Dauw < [email protected] >
+ */
+class SpecialCAs extends SpecialEPPage {
+
+       /**
+        * Constructor.
+        *
+        * @since 0.1
+        */
+       public function __construct() {
+               parent::__construct( 'CampusAmbassadors' );
+       }
+
+       /**
+        * Main method.
+        *
+        * @since 0.1
+        *
+        * @param string|null $subPage
+        */
+       public function execute( $subPage ) {
+               parent::execute( $subPage );
+
+               if ( $this->subPage === '' ) {
+                       $this->displayNavigation();
+                       // TODO
+                       // EPMentor::displayPager( $this->getContext() );
+               }
+               else {
+                       // TODO
+                       // $this->getOutput()->redirect( 
SpecialPage::getTitleFor( 'Institution', $this->subPage )->getLocalURL() );
+               }
+       }
+
+}

Added: trunk/extensions/EducationProgram/specials/SpecialOA.php
===================================================================
--- trunk/extensions/EducationProgram/specials/SpecialOA.php                    
        (rev 0)
+++ trunk/extensions/EducationProgram/specials/SpecialOA.php    2012-01-20 
22:57:57 UTC (rev 109660)
@@ -0,0 +1,71 @@
+<?php
+
+/**
+ * Shows the info for a single online ambassador.
+ *
+ * @since 0.1
+ *
+ * @file SpecialOA.php
+ * @ingroup EducationProgram
+ *
+ * @licence GNU GPL v3 or later
+ * @author Jeroen De Dauw < [email protected] >
+ */
+class SpecialOA extends SpecialEPPage {
+
+       /**
+        * Constructor.
+        *
+        * @since 0.1
+        */
+       public function __construct() {
+               parent::__construct( 'OnlineAmbassador' );
+       }
+
+       /**
+        * Main method.
+        *
+        * @since 0.1
+        *
+        * @param string $subPage
+        */
+       public function execute( $subPage ) {
+               parent::execute( $subPage );
+
+               $out = $this->getOutput();
+
+               if ( trim( $subPage ) === '' ) {
+                       $this->getOutput()->redirect( SpecialPage::getTitleFor( 
'OnlineAmbassadors' )->getLocalURL() );
+               }
+               else {
+                       $out->setPageTitle( wfMsgExt( 'ep-oa-title', 
'parsemag', $this->subPage ) );
+
+                       $this->displayNavigation();
+
+                       $oa = false; // TODO
+
+                       if ( $oa === false ) {
+                               $this->showWarning( wfMessage( 
'ep-oa-does-not-exist', $this->subPage ) );
+                       }
+                       else {
+                               $this->displaySummary( $oa );
+                       }
+               }
+       }
+
+       /**
+        * Gets the summary data.
+        *
+        * @since 0.1
+        *
+        * @param EPOA $ca
+        *
+        * @return array
+        */
+       protected function getSummaryData( EPDBObject $oa ) {
+               $stats = array();
+
+               return $stats;
+       }
+
+}

Added: trunk/extensions/EducationProgram/specials/SpecialOAs.php
===================================================================
--- trunk/extensions/EducationProgram/specials/SpecialOAs.php                   
        (rev 0)
+++ trunk/extensions/EducationProgram/specials/SpecialOAs.php   2012-01-20 
22:57:57 UTC (rev 109660)
@@ -0,0 +1,46 @@
+<?php
+
+/**
+ * Page listing online ambassadors in a pager with filter control.
+ *
+ * @since 0.1
+ *
+ * @file SpecialOAs.php
+ * @ingroup EducationProgram
+ *
+ * @licence GNU GPL v3 or later
+ * @author Jeroen De Dauw < [email protected] >
+ */
+class SpecialOAs extends SpecialEPPage {
+
+       /**
+        * Constructor.
+        *
+        * @since 0.1
+        */
+       public function __construct() {
+               parent::__construct( 'OnlineAmbassadors' );
+       }
+
+       /**
+        * Main method.
+        *
+        * @since 0.1
+        *
+        * @param string|null $subPage
+        */
+       public function execute( $subPage ) {
+               parent::execute( $subPage );
+
+               if ( $this->subPage === '' ) {
+                       $this->displayNavigation();
+                       // TODO
+                       // EPMentor::displayPager( $this->getContext() );
+               }
+               else {
+                       // TODO
+                       // $this->getOutput()->redirect( 
SpecialPage::getTitleFor( 'Institution', $this->subPage )->getLocalURL() );
+               }
+       }
+
+}


_______________________________________________
MediaWiki-CVS mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs

Reply via email to