• Resolved kskerp

    (@kskerp)


    I was trying to create an assignment link that brings the student to the assignment page (that is unique to them and their submission) from the course page

    The assignment page requires the student_ID and lesson_ID to generate the URL:

    /wp-admin/admin.php?page=namaste_lesson_homeworks&lesson_id=525&student_id=3

    I was curious if you could write a shortcode that could display an action event:

    a href=” assignment_URL”> “Name of assignment” </a

    and could be called similarly to: [assignment 303] where 303 is entered by the author and is the lesson_id for the assignment.

    I believe if the author passes the lesson_ID in using the shortcode, then the only other variable needed to create this navigation to an assignment is user_ID which can be accessed by $user_ID.

    I believe the action event would look similar to the following (if the 303 was saved as $user_input):

    a href=”/wp-admin/admin.php?page=namaste_lesson_homeworks&lesson_id=<?php echo $user_input?>&student_id=<?php echo $user_ID?>”> “assignment name </a

    This would be extremely helpful for me if this type of shortcode could be created!

    http://wordpress.org/plugins/namaste-lms/

Viewing 3 replies - 1 through 3 (of 3 total)
  • Thread Starter kskerp

    (@kskerp)

    sorry about the way the action events were written. every example I tried to write would create a link and change the original post.

    Plugin Author Bob

    (@prasunsen)

    yes, we have plans to add this

    Thread Starter kskerp

    (@kskerp)

    I got this shortcode working also.

    Your recent additions helped me understand how to add customized shortcode into this plugin 🙂 I imagine when you get around to these additions your code will be simpler.

    Thanks again!

    -Kevin

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘shortcode request’ is closed to new replies.