r107417 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r107416‎ | r107417 | r107418 >
Date:20:40, 27 December 2011
Author:jeroendedauw
Status:deferred
Tags:educationprogram 
Comment:
adding enrolment special page
Modified paths:
  • /trunk/extensions/EducationProgram/EducationProgram.i18n.alias.php (modified) (history)
  • /trunk/extensions/EducationProgram/EducationProgram.i18n.php (modified) (history)
  • /trunk/extensions/EducationProgram/EducationProgram.php (modified) (history)
  • /trunk/extensions/EducationProgram/includes/EPStudentPager.php (modified) (history)
  • /trunk/extensions/EducationProgram/specials/SpecialEnroll.php (added) (history)

Diff [purge]

Index: trunk/extensions/EducationProgram/EducationProgram.i18n.alias.php
@@ -28,5 +28,5 @@
2929 'EducationProgram' => array( 'EducationProgram' ),
3030 'EditCourse' => array( 'EditCourse' ),
3131 'EditInstitution' => array( 'EditInstitution' ),
32 - 'EditTerm' => array( 'EditTerm' ),
 32+ 'Enroll' => array( 'Enroll' ),
3333 );
Index: trunk/extensions/EducationProgram/specials/SpecialEnroll.php
@@ -0,0 +1,40 @@
 2+<?php
 3+
 4+/**
 5+ *
 6+ *
 7+ * @since 0.1
 8+ *
 9+ * @file SpecialEnroll.php
 10+ * @ingroup EducationProgram
 11+ *
 12+ * @licence GNU GPL v3 or later
 13+ * @author Jeroen De Dauw < jeroendedauw@gmail.com >
 14+ */
 15+class SpecialEnroll extends SpecialEPPage {
 16+
 17+ /**
 18+ * Constructor.
 19+ *
 20+ * @since 0.1
 21+ */
 22+ public function __construct() {
 23+ parent::__construct( 'Enroll', 'epstudent', false );
 24+ }
 25+
 26+ /**
 27+ * Main method.
 28+ *
 29+ * @since 0.1
 30+ *
 31+ * @param string $arg
 32+ */
 33+ public function execute( $subPage ) {
 34+ parent::execute( $subPage );
 35+
 36+ $out = $this->getOutput();
 37+
 38+ // TODO: AUTH
 39+ }
 40+
 41+}
Index: trunk/extensions/EducationProgram/includes/EPStudentPager.php
@@ -26,14 +26,14 @@
2727 parent::__construct( $context, $conds, 'EPStudent' );
2828 }
2929
30 - /**
 30+ /**
3131 * (non-PHPdoc)
32 - * @see TablePager::getFieldNames()
 32+ * @see EPPager::getFields()
3333 */
34 - public function getFieldNames() {
35 - return parent::getFieldNameList( array(
 34+ public function getFields() {
 35+ return array(
3636 // TODO
37 - ) );
 37+ );
3838 }
3939
4040 /**
Index: trunk/extensions/EducationProgram/EducationProgram.i18n.php
@@ -61,6 +61,7 @@
6262 'special-editterm-edit' => 'Edit term',
6363 'special-editcourse-add' => 'Add course',
6464 'special-editcourse-edit' => 'Edit course',
 65+ 'special-enroll' => 'Enroll',
6566
6667 // Special:Institutions
6768 'ep-institutions-nosuchinstitution' => 'There is no institution with name "$1". Existing institutions are listed below.',
Index: trunk/extensions/EducationProgram/EducationProgram.php
@@ -82,6 +82,7 @@
8383 $wgAutoloadClasses['SpecialStudents'] = dirname( __FILE__ ) . '/specials/SpecialStudents.php';
8484 $wgAutoloadClasses['SpecialTerm'] = dirname( __FILE__ ) . '/specials/SpecialTerm.php';
8585 $wgAutoloadClasses['SpecialTerms'] = dirname( __FILE__ ) . '/specials/SpecialTerms.php';
 86+$wgAutoloadClasses['SpecialEnroll'] = dirname( __FILE__ ) . '/specials/SpecialEnroll.php';
8687
8788 // Special pages
8889 $wgSpecialPages['MyCourses'] = 'SpecialMyCourses';
@@ -97,6 +98,7 @@
9899 $wgSpecialPages['EditCourse'] = 'SpecialEditCourse';
99100 $wgSpecialPages['EditInstitution'] = 'SpecialEditInstitution';
100101 $wgSpecialPages['EditTerm'] = 'SpecialEditTerm';
 102+$wgSpecialPages['Enroll'] = 'SpecialEnroll';
101103
102104 $wgSpecialPageGroups['MyCourses'] = 'education';
103105 $wgSpecialPageGroups['Institution'] = 'education';

Status & tagging log