Changeset 155
- Timestamp:
- 09/01/10 15:44:14 (17 months ago)
- Location:
- trunk
- Files:
-
- 1 added
- 6 modified
-
actions/ajax/add_facilitator.php (modified) (1 diff)
-
api.php (modified) (1 diff)
-
languages/en.php (modified) (10 diffs)
-
languages/et.php (modified) (10 diffs)
-
views/default/edufeedr/educourse_blog.php (modified) (1 diff)
-
views/default/edufeedr/educourse_post.php (modified) (1 diff)
-
views/default/edufeedr/singles/educourse_comment.php (added)
Legend:
- Unmodified
- Added
- Removed
-
trunk/actions/ajax/add_facilitator.php
r139 r155 16 16 // Check if data is provided 17 17 if ($facilitator && $educourse->getSubtype() == 'educourse' && edufeedrCanManageEducourse($educourse)) { 18 19 /* XXX WE DO NOT INSERT FACILITATOR AS TEACHER YET20 $es = new EduSuckr;21 $query = insert_data("INSERT INTO {$CONFIG->dbprefix}edufeedr_course_participants (course_guid, firstname, lastname, email, blog, posts, comments, status) VALUES (".$educourse->getGUID().", 'Course', 'Blog', '".$teacher->email."', '$course_blog', '".$pc['posts']."', '".$pc['comments']."', 'teacher')");22 $teacher_data = array(23 'participant_id' => $participant_id,24 'course_guid' => $educourse->getGUID(),25 'firstname' => "Course",26 'lastname' => "Blog",27 'email' => $teacher->email,28 'blog' => $course_blog,29 'posts' => $pc['posts'],30 'comments' => $pc['comments'],31 'status' => 'teacher'32 );33 */34 18 // Check if that facilitator has already been added to the course 35 19 $added_check = get_data("SELECT id from {$CONFIG->dbprefix}edufeedr_course_facilitators WHERE course_guid = {$educourse->getGUID()} and user_guid = {$facilitator->getGUID()}"); -
trunk/api.php
r139 r155 148 148 $feed->handle_content_type(); 149 149 150 // XXX We do not handleerrors here, as invalid XML is processed fine, but might raise errors150 //We do not handle errors here, as invalid XML is processed fine, but might raise errors 151 151 //TODO Think about preprocessing Feed before giving it to SimplePie parser 152 152 if ($feed->error()) -
trunk/languages/en.php
r153 r155 57 57 /* 58 58 File: /edufeedr/views/default/object/educourse.php 59 Lines: 6 359 Lines: 64 60 60 Text: Delete course 61 61 _missing_translation_ … … 105 105 /* 106 106 File: /edufeedr/views/default/edufeedr/educourse_blog.php 107 Lines: 44 107 File: /edufeedr/views/default/edufeedr/singles/educourse_comment.php 108 Lines: 44, 50 108 109 Text: read more 109 110 _missing_translation_ … … 118 119 */ 119 120 "edufeedr:action:download:vcard:file" => "vCard file with Address Book contacts", 120 121 /*122 File: /edufeedr/open_courses.php123 Lines: 9124 Text: Open courses125 _missing_translation_126 */127 "edufeedr:title:open:courses" => "Open courses",128 121 129 122 /* … … 334 327 /* 335 328 File: /edufeedr/views/default/edufeedr/educourse_blog.php 336 File: /edufeedr/views/default/edufeedr/educourse_blog.php337 329 File: /edufeedr/views/default/edufeedr/educourse_post.php 338 File: /edufeedr/views/default/edufeedr/ educourse_post.php339 Lines: 48, 92, 24, 40330 File: /edufeedr/views/default/edufeedr/singles/educourse_comment.php 331 Lines: 48, 24, 59 340 332 Text: hide 341 333 _missing_translation_ … … 377 369 /* 378 370 File: /edufeedr/views/default/edufeedr/educourse_blog.php 379 Lines: 110371 Lines: 86 380 372 Text: Hidden comments 381 373 _missing_translation_ … … 505 497 /* 506 498 File: /edufeedr/views/default/edufeedr/educourse_post.php 507 Lines: 4 9499 Lines: 40 508 500 Text: Post a comment 509 501 _missing_translation_ … … 623 615 624 616 /* 617 File: /edufeedr/views/default/edufeedr/singles/educourse_comment.php 618 Lines: 27 619 Text: %s to %s 620 _missing_translation_ 621 */ 622 "edufeedr:post_comment_commenter_to_poster" => "%s to %s", 623 624 /* 625 625 File: /edufeedr/actions/join_educourse.php 626 626 Lines: 65 … … 882 882 883 883 /* 884 File: /edufeedr/ views/default/edufeedr/educourse_blog.php885 Lines: 87886 Text: read the post887 _missing_translation_ 888 */ 889 "edufeedr: read:the:blogpost" => "read the post",884 File: /edufeedr/open_courses.php 885 Lines: 9 886 Text: Open courses 887 _missing_translation_ 888 */ 889 "edufeedr:title:open:courses" => "Open courses", 890 890 891 891 /* … … 923 923 /* 924 924 File: /edufeedr/views/default/object/educourse.php 925 Lines: 5 6925 Lines: 57 926 926 Text: Edit course info 927 927 _missing_translation_ … … 931 931 /* 932 932 File: /edufeedr/views/default/edufeedr/educourse_blog.php 933 Lines: 107933 Lines: 83 934 934 Text: Hidden posts 935 935 _missing_translation_ -
trunk/languages/et.php
r153 r155 57 57 /* 58 58 File: /edufeedr/views/default/object/educourse.php 59 Lines: 6 359 Lines: 64 60 60 Text: Delete course 61 61 _missing_translation_ … … 105 105 /* 106 106 File: /edufeedr/views/default/edufeedr/educourse_blog.php 107 Lines: 44 107 File: /edufeedr/views/default/edufeedr/singles/educourse_comment.php 108 Lines: 44, 50 108 109 Text: read more 109 110 _missing_translation_ … … 118 119 */ 119 120 "edufeedr:action:download:vcard:file" => "vCard file with Address Book contacts", 120 121 /*122 File: /edufeedr/open_courses.php123 Lines: 9124 Text: Open courses125 _missing_translation_126 */127 "edufeedr:title:open:courses" => "Open courses",128 121 129 122 /* … … 334 327 /* 335 328 File: /edufeedr/views/default/edufeedr/educourse_blog.php 336 File: /edufeedr/views/default/edufeedr/educourse_blog.php337 329 File: /edufeedr/views/default/edufeedr/educourse_post.php 338 File: /edufeedr/views/default/edufeedr/ educourse_post.php339 Lines: 48, 92, 24, 40330 File: /edufeedr/views/default/edufeedr/singles/educourse_comment.php 331 Lines: 48, 24, 59 340 332 Text: hide 341 333 _missing_translation_ … … 377 369 /* 378 370 File: /edufeedr/views/default/edufeedr/educourse_blog.php 379 Lines: 110371 Lines: 86 380 372 Text: Hidden comments 381 373 _missing_translation_ … … 505 497 /* 506 498 File: /edufeedr/views/default/edufeedr/educourse_post.php 507 Lines: 4 9499 Lines: 40 508 500 Text: Post a comment 509 501 _missing_translation_ … … 623 615 624 616 /* 617 File: /edufeedr/views/default/edufeedr/singles/educourse_comment.php 618 Lines: 27 619 Text: %s to %s 620 _missing_translation_ 621 */ 622 "edufeedr:post_comment_commenter_to_poster" => "%s to %s", 623 624 /* 625 625 File: /edufeedr/actions/join_educourse.php 626 626 Lines: 65 … … 882 882 883 883 /* 884 File: /edufeedr/ views/default/edufeedr/educourse_blog.php885 Lines: 87886 Text: read the post887 _missing_translation_ 888 */ 889 "edufeedr: read:the:blogpost" => "read the post",884 File: /edufeedr/open_courses.php 885 Lines: 9 886 Text: Open courses 887 _missing_translation_ 888 */ 889 "edufeedr:title:open:courses" => "Open courses", 890 890 891 891 /* … … 923 923 /* 924 924 File: /edufeedr/views/default/object/educourse.php 925 Lines: 5 6925 Lines: 57 926 926 Text: Edit course info 927 927 _missing_translation_ … … 931 931 /* 932 932 File: /edufeedr/views/default/edufeedr/educourse_blog.php 933 Lines: 107933 Lines: 83 934 934 Text: Hidden posts 935 935 _missing_translation_ -
trunk/views/default/edufeedr/educourse_blog.php
r154 r155 68 68 $comm_date = date('d.m.Y', $comment['date']); 69 69 } 70 $chtml .= "<h4 style=\"padding-top:15px;\">".$comment['title']."</h4>"; 71 /*$chtml .= "<div><i>".$comment['author']."</i></div>";*/ 72 $chtml .= "<em>".date("d.m.Y G:i",$comment['date'])."</em>"; 73 $chtml .= "<div>"; 74 if (strlen($comment['content'])>200) { 75 $last_space = strrpos(substr($comment['content'], 0, 200), ' '); 76 $content_piece = substr($comment['content'], 0, $last_space); 77 $chtml .= '<div id="comment_intro_'.$c.'">'.$content_piece.'...</div>'; 78 $chtml .= '<div id="comment_'.$c.'" style="display:none">'.$comment['content'].'</div>'; 79 } else { 80 81 $chtml .= $comment['content']; 82 } 83 84 if ($comment['post_id']) { 85 $chtml .= '<div class="clearfloat"></div>'; 86 /*translation:read the post*/ 87 $chtml .= '<a href="'.$vars['url'].'pg/edufeedr/view_post/'.$vars['entity']->getGUID().'/'.$comment['post_id'].'">' . elgg_echo('edufeedr:read:the:blogpost') . '</a>'; 88 } 89 // Hide comment 90 if ($vars['entity']->canEdit() && edufeedrCanEditEducourse($vars['entity'])) { 91 /*translation:hide*/ 92 $chtml .= ' | <a href="'.$vars['url'].'action/edufeedr/hide_comment?comment_id='.$comment['id'].'&educourse='.$vars['entity']->getGUID().'&__elgg_ts='.$ts.'&__elgg_token='.$token.'">' . elgg_echo('edufeedr:action:hide'). '</a>'; 93 } 94 $chtml .= '</div>'; 70 $chtml .= elgg_view('edufeedr/singles/educourse_comment', array('educourse' => $vars['entity'], 'comment' => $comment, 'type' => 'coursefeed')); 95 71 $c++; 96 72 } -
trunk/views/default/edufeedr/educourse_post.php
r132 r155 32 32 if (is_array($data['comments']) && sizeof($data['comments']) > 0) { 33 33 foreach ($data['comments'] as $comment) { 34 $body .= '<div class="edufeedr_post_comment">'; 35 $body .= '<em>' . date('d.m.Y G:i', $comment['date']) . '</em>'; 36 $body .= '<div class="edufeedr_comment_content">' . $comment['content'] . '</div>'; 37 // Hide comment 38 if ($vars['entity']->canEdit() && edufeedrCanEditEducourse($vars['entity'])) { 39 /*translation:hide*/ 40 $body .= '<a href="'.$vars['url'].'action/edufeedr/hide_comment?comment_id='.$comment['id'].'&educourse='.$vars['entity']->getGUID().'&__elgg_ts='.$ts.'&__elgg_token='.$token.'">' . elgg_echo('edufeedr:action:hide') . '</a>'; 41 } 42 43 $body .= '</div>'; 34 $body .= elgg_view('edufeedr/singles/educourse_comment', array('educourse' => $vars['entity'], 'comment' => $comment, 'type' => 'viewpost')); 44 35 } 45 36 }
