r108932 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r108931‎ | r108932 | r108933 >
Date:18:24, 14 January 2012
Author:jeroendedauw
Status:deferred
Tags:
Comment:
added navigation links to special:mycourses and updated rel notes
Modified paths:
  • /trunk/extensions/EducationProgram/RELEASE-NOTES (modified) (history)
  • /trunk/extensions/EducationProgram/specials/SpecialCourse.php (modified) (history)
  • /trunk/extensions/EducationProgram/specials/SpecialMyCourses.php (modified) (history)

Diff [purge]

Index: trunk/extensions/EducationProgram/specials/SpecialMyCourses.php
@@ -44,6 +44,10 @@
4545 $this->getOutput()->addWikiMsg( 'ep-mycourses-not-a-student' );
4646 }
4747 else {
 48+ if ( $this->getUser()->isAllowed( 'ep-org' ) ) {
 49+ $this->displayNavigation();
 50+ }
 51+
4852 if ( $this->subPage === '' ) {
4953 $this->displayCourses( $student );
5054 }
@@ -194,5 +198,17 @@
195199
196200 $this->displaySummary( $course, false, $info );
197201 }
 202+
 203+ /**
 204+ * (non-PHPdoc)
 205+ * @see SpecialEPPage::getDefaultNavigationItems()
 206+ */
 207+ protected function getDefaultNavigationItems() {
 208+ $items = parent::getDefaultNavigationItems();
 209+
 210+ unset( $items[wfMsg( 'ep-nav-mycourses' )] );
 211+
 212+ return $items;
 213+ }
198214
199215 }
Index: trunk/extensions/EducationProgram/specials/SpecialCourse.php
@@ -103,12 +103,12 @@
104104 htmlspecialchars( $org )
105105 );
106106
 107+ $stats['status'] = wfMsgHtml( $course->getField( 'active' ) ? 'ep-course-active' : 'ep-course-inactive' );
 108+
107109 $lang = $this->getLanguage();
108110
109111 $stats['students'] = htmlspecialchars( $lang->formatNum( $course->getField( 'students' ) ) );
110112
111 - $stats['status'] = wfMsgHtml( $course->getField( 'active' ) ? 'ep-course-active' : 'ep-course-inactive' );
112 -
113113 $termCount = EPTerm::count( array( 'course_id' => $course->getId() ) );
114114 $stats['terms'] = htmlspecialchars( $lang->formatNum( $termCount ) );
115115
Index: trunk/extensions/EducationProgram/RELEASE-NOTES
@@ -10,4 +10,9 @@
1111
1212 Initial release with these features:
1313
14 -* ...
\ No newline at end of file
 14+* Management and browsing interfaces for institutions, courses and terms.
 15+* Pages with summaries and linked items for all institutions, courses and terms.
 16+* Enrollment page for students with optional token requirement.
 17+* Sortable and filterable list of students.
 18+* Personal courses overview at Special:MyCourses for students.
 19+* ...

Status & tagging log