Changeset 150

Show
Ignore:
Timestamp:
08/31/10 10:10:53 (17 months ago)
Author:
gnum
Message:

Fixes #97, vCard can be downloaded by any facilitator also made changes for OPML files, those can be downloaded by any user.

Location:
trunk
Files:
3 modified

Legend:

Unmodified
Added
Removed
  • trunk/actions/download_educourse_opml.php

    r24 r150  
    88        $educourse = get_entity($guid); 
    99 
    10         if ($educourse->getSubtype() == 'educourse' && $educourse->canEdit()) { 
     10        if ($educourse->getSubtype() == 'educourse') { 
    1111                $mime = 'text/x-opml'; 
    1212                $filename = 'educourse_' . $guid . '_' . $type  . '.opml'; 
  • trunk/start.php

    r146 r150  
    161161        register_action('edufeedr/join_educourse', true, $CONFIG->pluginspath . 'edufeedr/actions/join_educourse.php'); 
    162162        register_action('edufeedr/remove_participant', false, $CONFIG->pluginspath . 'edufeedr/actions/remove_participant.php'); 
    163         register_action('edufeedr/download_educourse_vcard', true, $CONFIG->pluginspath . 'edufeedr/actions/download_educourse_vcard.php'); 
    164         register_action('edufeedr/download_educourse_opml', false, $CONFIG->pluginspath . 'edufeedr/actions/download_educourse_opml.php'); 
     163        register_action('edufeedr/download_educourse_vcard', false, $CONFIG->pluginspath . 'edufeedr/actions/download_educourse_vcard.php'); 
     164        register_action('edufeedr/download_educourse_opml', true, $CONFIG->pluginspath . 'edufeedr/actions/download_educourse_opml.php'); 
    165165        register_action('edufeedr/edit_participant', false, $CONFIG->pluginspath . 'edufeedr/actions/edit_participant.php'); 
    166166        register_action('edufeedr/add_assignment', false, $CONFIG->pluginspath . 'edufeedr/actions/add_assignment.php'); 
  • trunk/views/default/edufeedr/educourse_participants.php

    r142 r150  
    2929                        $body .= '<label>' . elgg_echo('edufeedr:label:course:downloads') . '</label>'; 
    3030                        $body .= '<ul>'; 
     31                        // vCard is only available for course owner and facilitators 
     32                        if ($vars['entity']->canEdit() && edufeedrCanEditEducourse($vars['entity'])) { 
    3133            /*translation:vCard file with Address Book contacts*/ 
    32             $body .= '<li><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:file') . '</a></li>'; 
     34                                $body .= '<li><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:file') . '</a></li>'; 
     35                        } 
    3336            /*translation:OPML file with RSS feeds for blog posts*/ 
    3437            $body .= '<li><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:file') . '</a></li>';