mdjnelson / moodle-mod_customcert

Enables the creation of dynamically generated certificates with complete customisation via the web browser.
https://moodle.org/plugins/mod_customcert
GNU General Public License v3.0
91 stars 158 forks source link

Add roundtrip linking between my profiles certs and courses #469 #470

Closed brendanheywood closed 2 years ago

brendanheywood commented 2 years ago

469

mdjnelson commented 2 years ago

Hi @brendanheywood - I can't see what this achieves except passing the $courseid to require_login. There is no change in navigation afaict.

brendanheywood commented 2 years ago

Passing the $courseid to require_login changes the way core behaves and it adds the course context to the crumb trail and other navigation elements. So from a course you click into your plugin, and then you click into various core navigation and get back to where you came from. Without it you end up at the site level instead of where you started.

Eg:

  1. from /user/index.php?id=2
  2. click on a user -> /user/view.php?id=105&course=2
  3. click on participants, and you are back to /user/index.php?id=2
  4. click on user again -> /user/view.php?id=105&course=2
  5. now click on 'my certificates' -> /mod/customcert/my_certificates.php?userid=105&course=2
  6. now you are still 'inside' the course, so in the crumb trail you can click on either
  7. /user/index.php?id=2 - back to start
  8. /course/view.php?id=2 back to course
brendanheywood commented 2 years ago

Compare with:

image

vs without:

image

mdjnelson commented 2 years ago

I thought this was the case but it does not work for me. The breadcrumbs do not change. It remains "Dashboard > Profile > My certificates".

mdjnelson commented 2 years ago

Ahhh I see! Sorry. I was doing it as the user, not the administrator. Cherry-picking.