Okay
  Public Ticket #3958563
Course Email shortcodes
Open

Comments

  •  1
    Isigma started the conversation

    Is there an email shortcode for BP notifications, that can lead directly to:

    - the relevant course in apps for students,

    - the course submissions for the instructor.

    Currently the link to the course leads to the course page outside of the app, which means, after receiving the notification email one has to click this many times to get to the relevant content:

    Click in Email (opens course page outside the app) -> remember the course name -> click to get to the apps -> My Courses -> Specific course

  •  390
    Ripul replied

    Yes, we have a direct link.

    I think this is a useful suggestion, if your app page is set then we can add a direct link.

     

    add_filter('bp_course_wp_mail_tokens',function($args){
        $args['tokens']['course.titlelink']=get_permalink(vibebp_get_setting('bp_single_page').'#component=course&action=course&id='.$args['item_id']);
        return $args;
    });
    
  •  1
    Isigma replied

    That code, being added to Customizer does change the appearance of the notification emails:

    • for assignments it generates the Assignment Title with correct url: [domain]/app/#component=course&action=assignment_results&id=5290
    • for courses though it does not generate the Course Title, but only a text version of a generic link to the app page: [domain]/app/

    Also as a common rule for any app page elements, the #component in the url opens the actual component, the &whatever has no effect - the url will always open the component basic page, ignoring the &action, &id, etc. 

    I'm wondering if there is a setting somewhere that blocks that on our website. Please advice.