Changeset 15
- Timestamp:
- 02/26/10 16:50:22 (2 years ago)
- Location:
- trunk
- Files:
-
- 3 added
- 7 modified
-
actions/download_educourse_opml.php (added)
-
actions/edit_participant.php (added)
-
api.php (modified) (1 diff)
-
edit_participant.php (added)
-
languages/en.php (modified) (18 diffs)
-
languages/et.php (modified) (18 diffs)
-
start.php (modified) (2 diffs)
-
views/default/edufeedr/forms/join_educourse.php (modified) (2 diffs)
-
views/default/edufeedr/single_educourse_participant.php (modified) (1 diff)
-
views/default/object/educourse.php (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/api.php
r14 r15 49 49 return $vcard; 50 50 } 51 52 function edufeedrCourseOPML($educourse, $type = 'posts') { 53 $participants = $educourse->participants; 54 $participants = unserialize($participants); 55 56 $owner = $educourse->getOwnerEntity(); 57 58 $opml = '<?xml version="1.0" encoding="UTF-8"' . '?' . '>'; 59 $opml .= '<opml version="2.0">'; 60 61 $opml .= '<head>'; 62 $opml .= '<title>' . $educourse->title . '</title>'; 63 $opml .= '<dateCreated>' . date(DATE_RSS, $educourse->time_created) . '</dateCreated>'; 64 $opml .= '<ownerName>' . $owner->name . '</ownerName>'; 65 $opml .= '<ownerEmail>' . $owner->email . '</ownerEmail>'; 66 $opml .= '<ownerId>' . $owner->getURL() . '</ownerId>'; 67 $opml .= '</head>'; 68 69 $opml .= '<body>'; 70 71 foreach ($participants as $participant) { 72 $opml .= '<outline type="rss" text="' . $participant['firstname'] . ' ' . $participant['lastname'] . '" description="" xmlUrl="' . __helperBlogFeedURL($participant['blog'], $type) . '" htmlUrl="' . $participant['blog'] . '"/>'; 73 } 74 75 $opml .= '</body>'; 76 77 $opml .= '</opml>'; 78 79 return $opml; 80 } 81 82 function __helperBlogFeedURL($url, $type = 'posts') { 83 if (!in_array($type, array('posts', 'comments'))) 84 $type = 'posts'; 85 86 // XXX NO CODE HERE YET 87 return $url; 88 } 51 89 ?> -
trunk/languages/en.php
r14 r15 22 22 /* 23 23 File: /edufeedr/views/default/edufeedr/single_educourse_participant.php 24 Lines: 1724 Lines: 20 25 25 Text: Are you sure you want to remove participant %s? 26 26 _missing_translation_ … … 38 38 /* 39 39 File: /edufeedr/views/default/edufeedr/forms/join_educourse.php 40 Lines: 2140 Lines: 31 41 41 Text: Course %s 42 42 _missing_translation_ … … 78 78 /* 79 79 File: /edufeedr/views/default/object/educourse.php 80 Lines: 5880 Lines: 60 81 81 Text: Download vCard 82 82 _missing_translation_ … … 85 85 86 86 /* 87 File: /edufeedr/views/default/edufeedr/forms/join_educourse.php 88 Lines: 35 87 File: /edufeedr/views/default/object/educourse.php 88 Lines: 75 89 Text: Download comments OPML 90 _missing_translation_ 91 */ 92 "edufeedr:action:download:comments:opml" => "Download comments OPML", 93 94 /* 95 File: /edufeedr/views/default/edufeedr/forms/join_educourse.php 96 Lines: 45 89 97 Text: Blog 90 98 _missing_translation_ … … 93 101 94 102 /* 103 File: /edufeedr/actions/download_educourse_opml.php 95 104 File: /edufeedr/actions/download_educourse_vcard.php 96 Lines: 23 105 Lines: 23, 23 97 106 Text: Download failed. 98 107 _missing_translation_ … … 102 111 /* 103 112 File: /edufeedr/views/default/edufeedr/forms/join_educourse.php 104 Lines: 31113 Lines: 41 105 114 Text: E-mail 106 115 _missing_translation_ … … 110 119 /* 111 120 File: /edufeedr/views/default/object/educourse.php 112 Lines: 9 1121 Lines: 99 113 122 Text: Teacher 114 123 _missing_translation_ … … 119 128 File: /edufeedr/views/default/edufeedr/forms/join_educourse.php 120 129 File: /edufeedr/views/default/object/educourse.php 121 Lines: 39, 66130 Lines: 49, 68 122 131 Text: Sign up 123 132 _missing_translation_ … … 143 152 /* 144 153 File: /edufeedr/views/default/object/educourse.php 145 Lines: 76154 Lines: 84 146 155 Text: Course participants 147 156 _missing_translation_ … … 167 176 168 177 /* 178 File: /edufeedr/edit_participant.php 179 Lines: 26 180 Text: Edit participant %s of course %s 181 _missing_translation_ 182 */ 183 "edufeedr:title:edit:participant" => "Edit participant %s of course %s", 184 185 /* 169 186 File: /edufeedr/views/default/edufeedr/forms/edit_educourse.php 170 187 Lines: 63 … … 191 208 192 209 /* 210 File: /edufeedr/views/default/object/educourse.php 211 Lines: 72 212 Text: Download posts OPML 213 _missing_translation_ 214 */ 215 "edufeedr:action:download:posts:opml" => "Download posts OPML", 216 217 /* 193 218 File: /edufeedr/add_educourse.php 194 219 Lines: 23 … … 217 242 File: /edufeedr/actions/add_educourse.php 218 243 File: /edufeedr/actions/edit_educourse.php 244 File: /edufeedr/actions/edit_participant.php 219 245 File: /edufeedr/actions/join_educourse.php 220 Lines: 30, 34, 2 6246 Lines: 30, 34, 28, 26 221 247 Text: Please fill all required fields. 222 248 _missing_translation_ … … 226 252 /* 227 253 File: /edufeedr/views/default/edufeedr/forms/join_educourse.php 228 Lines: 27254 Lines: 37 229 255 Text: Last name 230 256 _missing_translation_ … … 234 260 /* 235 261 File: /edufeedr/views/default/edufeedr/forms/join_educourse.php 236 Lines: 23262 Lines: 33 237 263 Text: First name 238 264 _missing_translation_ 239 265 */ 240 266 "edufeedr:label:firstname" => "First name", 267 268 /* 269 File: /edufeedr/views/default/edufeedr/single_educourse_participant.php 270 Lines: 13 271 Text: Edit participant 272 _missing_translation_ 273 */ 274 "edufeedr:course:edit:participant" => "Edit participant", 241 275 242 276 /* … … 258 292 /* 259 293 File: /edufeedr/views/default/edufeedr/single_educourse_participant.php 260 Lines: 1 5294 Lines: 18 261 295 Text: Remove participant 262 296 _missing_translation_ 263 297 */ 264 298 "edufeedr:course:remove:participant" => "Remove participant", 299 300 /* 301 File: /edufeedr/actions/delete_educourse.php 302 Lines: 18 303 Text: Course could not be deleted. 304 _missing_translation_ 305 */ 306 "edufeedr:error:educourse:not:deleted" => "Course could not be deleted.", 307 308 /* 309 File: /edufeedr/start.php 310 Lines: 12 311 Text: EduFeedr 312 _missing_translation_ 313 */ 314 "edufeedr:menu:edufeedr" => "EduFeedr", 265 315 266 316 /* … … 273 323 274 324 /* 275 File: /edufeedr/start.php276 Lines: 12277 Text: EduFeedr278 _missing_translation_279 */280 "edufeedr:menu:edufeedr" => "EduFeedr",281 282 /*283 File: /edufeedr/actions/delete_educourse.php284 Lines: 18285 Text: Course could not be deleted.286 _missing_translation_287 */288 "edufeedr:error:educourse:not:deleted" => "Course could not be deleted.",289 290 /*291 325 File: /edufeedr/index.php 292 326 Lines: 9 … … 298 332 /* 299 333 File: /edufeedr/views/default/object/educourse.php 300 Lines: 84334 Lines: 92 301 335 Text: Blogroll 302 336 _missing_translation_ … … 311 345 */ 312 346 "edufeedr:label:course_blog" => "Course blog", 347 348 /* 349 File: /edufeedr/actions/edit_participant.php 350 Lines: 41 351 Text: Participant information changed. 352 _missing_translation_ 353 */ 354 "edufeedr:message:participant:changed" => "Participant information changed.", 313 355 314 356 ); -
trunk/languages/et.php
r14 r15 22 22 /* 23 23 File: /edufeedr/views/default/edufeedr/single_educourse_participant.php 24 Lines: 1724 Lines: 20 25 25 Text: Are you sure you want to remove participant %s? 26 26 _missing_translation_ … … 38 38 /* 39 39 File: /edufeedr/views/default/edufeedr/forms/join_educourse.php 40 Lines: 2140 Lines: 31 41 41 Text: Course %s 42 42 _missing_translation_ … … 78 78 /* 79 79 File: /edufeedr/views/default/object/educourse.php 80 Lines: 5880 Lines: 60 81 81 Text: Download vCard 82 82 _missing_translation_ … … 85 85 86 86 /* 87 File: /edufeedr/views/default/edufeedr/forms/join_educourse.php 88 Lines: 35 87 File: /edufeedr/views/default/object/educourse.php 88 Lines: 75 89 Text: Download comments OPML 90 _missing_translation_ 91 */ 92 "edufeedr:action:download:comments:opml" => "Download comments OPML", 93 94 /* 95 File: /edufeedr/views/default/edufeedr/forms/join_educourse.php 96 Lines: 45 89 97 Text: Blog 90 98 _missing_translation_ … … 93 101 94 102 /* 103 File: /edufeedr/actions/download_educourse_opml.php 95 104 File: /edufeedr/actions/download_educourse_vcard.php 96 Lines: 23 105 Lines: 23, 23 97 106 Text: Download failed. 98 107 _missing_translation_ … … 102 111 /* 103 112 File: /edufeedr/views/default/edufeedr/forms/join_educourse.php 104 Lines: 31113 Lines: 41 105 114 Text: E-mail 106 115 _missing_translation_ … … 110 119 /* 111 120 File: /edufeedr/views/default/object/educourse.php 112 Lines: 9 1121 Lines: 99 113 122 Text: Teacher 114 123 _missing_translation_ … … 119 128 File: /edufeedr/views/default/edufeedr/forms/join_educourse.php 120 129 File: /edufeedr/views/default/object/educourse.php 121 Lines: 39, 66130 Lines: 49, 68 122 131 Text: Sign up 123 132 _missing_translation_ … … 143 152 /* 144 153 File: /edufeedr/views/default/object/educourse.php 145 Lines: 76154 Lines: 84 146 155 Text: Course participants 147 156 _missing_translation_ … … 167 176 168 177 /* 178 File: /edufeedr/edit_participant.php 179 Lines: 26 180 Text: Edit participant %s of course %s 181 _missing_translation_ 182 */ 183 "edufeedr:title:edit:participant" => "Edit participant %s of course %s", 184 185 /* 169 186 File: /edufeedr/views/default/edufeedr/forms/edit_educourse.php 170 187 Lines: 63 … … 191 208 192 209 /* 210 File: /edufeedr/views/default/object/educourse.php 211 Lines: 72 212 Text: Download posts OPML 213 _missing_translation_ 214 */ 215 "edufeedr:action:download:posts:opml" => "Download posts OPML", 216 217 /* 193 218 File: /edufeedr/add_educourse.php 194 219 Lines: 23 … … 217 242 File: /edufeedr/actions/add_educourse.php 218 243 File: /edufeedr/actions/edit_educourse.php 244 File: /edufeedr/actions/edit_participant.php 219 245 File: /edufeedr/actions/join_educourse.php 220 Lines: 30, 34, 2 6246 Lines: 30, 34, 28, 26 221 247 Text: Please fill all required fields. 222 248 _missing_translation_ … … 226 252 /* 227 253 File: /edufeedr/views/default/edufeedr/forms/join_educourse.php 228 Lines: 27254 Lines: 37 229 255 Text: Last name 230 256 _missing_translation_ … … 234 260 /* 235 261 File: /edufeedr/views/default/edufeedr/forms/join_educourse.php 236 Lines: 23262 Lines: 33 237 263 Text: First name 238 264 _missing_translation_ 239 265 */ 240 266 "edufeedr:label:firstname" => "First name", 267 268 /* 269 File: /edufeedr/views/default/edufeedr/single_educourse_participant.php 270 Lines: 13 271 Text: Edit participant 272 _missing_translation_ 273 */ 274 "edufeedr:course:edit:participant" => "Edit participant", 241 275 242 276 /* … … 258 292 /* 259 293 File: /edufeedr/views/default/edufeedr/single_educourse_participant.php 260 Lines: 1 5294 Lines: 18 261 295 Text: Remove participant 262 296 _missing_translation_ 263 297 */ 264 298 "edufeedr:course:remove:participant" => "Remove participant", 299 300 /* 301 File: /edufeedr/actions/delete_educourse.php 302 Lines: 18 303 Text: Course could not be deleted. 304 _missing_translation_ 305 */ 306 "edufeedr:error:educourse:not:deleted" => "Course could not be deleted.", 307 308 /* 309 File: /edufeedr/start.php 310 Lines: 12 311 Text: EduFeedr 312 _missing_translation_ 313 */ 314 "edufeedr:menu:edufeedr" => "EduFeedr", 265 315 266 316 /* … … 273 323 274 324 /* 275 File: /edufeedr/start.php276 Lines: 12277 Text: EduFeedr278 _missing_translation_279 */280 "edufeedr:menu:edufeedr" => "EduFeedr",281 282 /*283 File: /edufeedr/actions/delete_educourse.php284 Lines: 18285 Text: Course could not be deleted.286 _missing_translation_287 */288 "edufeedr:error:educourse:not:deleted" => "Course could not be deleted.",289 290 /*291 325 File: /edufeedr/index.php 292 326 Lines: 9 … … 298 332 /* 299 333 File: /edufeedr/views/default/object/educourse.php 300 Lines: 84334 Lines: 92 301 335 Text: Blogroll 302 336 _missing_translation_ … … 311 345 */ 312 346 "edufeedr:label:course_blog" => "Course blog", 347 348 /* 349 File: /edufeedr/actions/edit_participant.php 350 Lines: 41 351 Text: Participant information changed. 352 _missing_translation_ 353 */ 354 "edufeedr:message:participant:changed" => "Participant information changed.", 313 355 314 356 ); -
trunk/start.php
r14 r15 77 77 include($CONFIG->pluginspath . 'edufeedr/join_educourse.php'); 78 78 break; 79 case "edit_participant": 80 set_input('educourse', $page[1]); 81 set_input('participant_id', $page[2]); 82 include($CONFIG->pluginspath . 'edufeedr/edit_participant.php'); 83 break; 79 84 default: 80 85 include($CONFIG->pluginspath . 'edufeedr/index.php'); … … 105 110 register_action('edufeedr/remove_participant', false, $CONFIG->pluginspath . 'edufeedr/actions/remove_participant.php'); 106 111 register_action('edufeedr/download_educourse_vcard', true, $CONFIG->pluginspath . 'edufeedr/actions/download_educourse_vcard.php'); 112 register_action('edufeedr/download_educourse_opml', false, $CONFIG->pluginspath . 'edufeedr/actions/download_educourse_opml.php'); 113 register_action('edufeedr/edit_participant', true, $CONFIG->pluginspath . 'edufeedr/actions/edit_participant.php'); 107 114 ?> -
trunk/views/default/edufeedr/forms/join_educourse.php
r12 r15 2 2 3 3 if (isset($vars['entity']) && $vars['entity']->getSubtype() == 'educourse') { 4 $action = 'edufeedr/join_educourse'; 5 $firstname = ''; 6 $lastname = ''; 7 $email = ''; 8 $blog = ''; 4 5 if (isset($vars['participant'])) { 6 $action = 'edufeedr/edit_participant'; 7 $participant = $vars['participant']; 8 $firstname = $participant['firstname']; 9 $lastname = $participant['lastname']; 10 $email = $participant['email']; 11 $blog = $participant['blog']; 12 } else { 13 $action = 'edufeedr/join_educourse'; 14 $firstname = ''; 15 $lastname = ''; 16 $email = ''; 17 $blog = ''; 18 } 9 19 10 20 if (isset($vars['join_firstname']) && !empty($vars['join_firstname'])) … … 39 49 $submit_input = elgg_view('input/submit', array('internalname' => 'submit', 'value' => elgg_echo('edufeedr:submit:signup'))); 40 50 $entity_hidden = elgg_view('input/hidden', array('internalname' => 'educourse', 'value' => $vars['entity']->getGUID())); 51 if (isset($vars['participant_id'])) 52 $entity_hidden .= elgg_view('input/hidden', array('internalname' => 'participant_id', 'value' => $vars['participant_id'])); 41 53 42 54 $form_body = <<<EOT -
trunk/views/default/edufeedr/single_educourse_participant.php
r12 r15 9 9 10 10 if (edufeedrCanEditEducourse($vars['entity'])) { 11 echo ' '; 12 /*translation:Edit participant*/ 13 echo '<a href="' . $vars['url'] . 'pg/edufeedr/edit_participant/' . $vars['entity']->getGUID() . '/' . $vars['participant_number'] . '">' . elgg_echo('edufeedr:course:edit:participant') . '</a>'; 11 14 echo ' '; 12 15 echo elgg_view('output/confirmlink', array( -
trunk/views/default/object/educourse.php
r14 r15 7 7 8 8 if (isset($vars['full']) && $vars['full'] == true) { 9 echo '<div class="educourse">'; 9 $ts = time(); 10 $token = generate_action_token($ts); 11 echo '<div class="educourse">'; 10 12 11 13 echo '<h3><a href="' . $vars['entity']->getURL() . '" title="' . $vars['entity']->title . '">' . $vars['entity']->title . '</h3>'; … … 55 57 ); 56 58 echo ' '; 57 $ts = time();58 $token = generate_action_token($ts);59 59 /*translation:Download vCard*/ 60 60 echo '<a href="' . $vars['url'] . 'action/edufeedr/download_educourse_vcard?educourse=' . $vars['entity']->getGUID() . '&__elgg_ts='. $ts . '&__elgg_token=' . $token .'">' . elgg_echo('edufeedr:action:download:vcard') . '</a>'; … … 62 62 } 63 63 64 echo '<div>'; 64 65 // Sign up 65 66 if (edufeedrIsEducourseOpen($vars['entity'])) { 66 echo '<div>';67 67 /*translation:Sign up*/ 68 68 echo '<a href="' . $vars['url'] . 'pg/edufeedr/join/' . $vars['entity']->getGUID() . '">' . elgg_echo('edufeedr:submit:signup') . '</a>'; 69 echo ' </div>';69 echo ' '; 70 70 } 71 /*translation:Download posts OPML*/ 72 echo '<a href="' . $vars['url'] . 'action/edufeedr/download_educourse_opml?educourse=' . $vars['entity']->getGUID() . '&type=posts&__elgg_ts=' . $ts . '&__elgg_token=' . $token . '">' . elgg_echo('edufeedr:action:download:posts:opml') . '</a>'; 73 echo ' '; 74 /*translation:Download comments OPML*/ 75 echo '<a href="' . $vars['url'] . 'action/edufeedr/download_educourse_opml?educourse=' . $vars['entity']->getGUID() . '&type=comments&__elgg_ts=' . $ts . '&__elgg_token=' . $token . '">' . elgg_echo('edufeedr:action:download:comments:opml') . '</a>'; 76 echo '</div>'; 71 77 72 78 // Course patricipants
