Skip to main content

Cleaning Up Blocks in Courses

Comments

2 comments

  • Jason Rodgers

    Here is something that might help

    SELECT 
    BI.Blockname,
    C.instanceid AS CourseID,
    CO.fullname,
    concat('https://YOURURL/course/view.php?id=',C.instanceid) as Directlink
    FROM mdl_block_instances BI
    LEFT JOIN mdl_context C ON C.id=BI.parentcontextid
    LEFT JOIN mdl_course CO ON CO.id=C.instanceid
    WHERE CO.visible=1
    1
  • Janelle Cleaves

    Dear Jason,

    I meant to respond to this here. Thank you! That works great.

    0

Please sign in to leave a comment.