Index: trunk/extensions/EducationProgram/specials/SpecialCourse.php |
— | — | @@ -55,8 +55,12 @@ |
56 | 56 | } |
57 | 57 | } |
58 | 58 | else { |
59 | | - $this->displayInfo( $course ); |
| 59 | + $this->displaySummary( $course ); |
60 | 60 | |
| 61 | + $out->addHTML( Html::element( 'h2', array(), wfMsg( 'ep-course-description' ) ) ); |
| 62 | + |
| 63 | + $out->addHTML( '<p>' . $this->getOutput()->parse( $course->getField( 'description' ) ) . '</p>' ); |
| 64 | + |
61 | 65 | $out->addHTML( Html::element( 'h2', array(), wfMsg( 'ep-course-terms' ) ) ); |
62 | 66 | |
63 | 67 | EPTerm::displayPager( $this->getContext(), array( 'course_id' => $course->getId() ) ); |
— | — | @@ -65,16 +69,21 @@ |
66 | 70 | } |
67 | 71 | |
68 | 72 | /** |
69 | | - * Display the course info. |
70 | | - * |
| 73 | + * Gets the summary data. |
| 74 | + * |
71 | 75 | * @since 0.1 |
72 | | - * |
| 76 | + * |
73 | 77 | * @param EPCourse $course |
| 78 | + * |
| 79 | + * @return array |
74 | 80 | */ |
75 | | - protected function displayInfo( EPCourse $course ) { |
76 | | - $out = $this->getOutput(); |
77 | | - |
78 | | - |
| 81 | + protected function getSummaryData( EPDBObject $course ) { |
| 82 | + $stats = array(); |
| 83 | + |
| 84 | + $stats['name'] = $course->getField( 'name' ); |
| 85 | + $stats['org'] = EPOrg::selectFieldsRow( 'name', array( 'id' => $course->getField( 'org_id' ) ) ); |
| 86 | + |
| 87 | + return $stats; |
79 | 88 | } |
80 | 89 | |
81 | 90 | } |
Index: trunk/extensions/EducationProgram/EducationProgram.i18n.php |
— | — | @@ -168,6 +168,9 @@ |
169 | 169 | 'ep-course-terms' => 'Terms', |
170 | 170 | 'ep-course-none' => 'There is no course with name "$1". See [[Special:Courses|here]] for a list of courses.', |
171 | 171 | 'ep-course-create' => 'There is no course with name "$1" yet, but you can create it.', |
| 172 | + 'specialcourse-summary-name' => 'Name', |
| 173 | + 'specialcourse-summary-org' => 'Institution', |
| 174 | + 'ep-course-description' => 'Description', |
172 | 175 | |
173 | 176 | // Special:Term |
174 | 177 | 'ep-term-title' => 'Term: $1', |