Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-59994

CBE: after deleting user that is waiting for competency review by manager/administrator these roles cannot open Moodle anymore

XMLWordPrintable

    • MOODLE_31_STABLE, MOODLE_33_STABLE
    • MOODLE_32_STABLE, MOODLE_33_STABLE
    • MDL-59994-master-v2
    • Hide
      1. Log in as admin.
      2. Go to Site administration > Competencies > Competency frameworks
      3. Create a competency framework
      4. Add a competency to that competency framework.
      5. Go to a existing course, or create one.
      6. Enrol an student.
      7. On the course, click on Competencies on the navigation drawer.
      8. Then click Add competencies to course, and select the competency you just created.
      9. Create an assignment, expand Competencies section, search and select the competency and select Send for review on Upon activity completion. Enable manual completion for this assignment
      10. Log out and log in as student that you enrolled.
      11. Complete this assignment (manually mark it as completed).
      12. Log out and log in as admin.
      13. Go to Site administration > Users > Accounts > Browse list of users.
      14. Delete the student you used to submit the assignment.
      15. Log out.
      16. Try to access Moodle as admin.
      17. Make sure you are able to login and you don't see the mentioned error.
      Show
      Log in as admin. Go to Site administration > Competencies > Competency frameworks Create a competency framework Add a competency to that competency framework. Go to a existing course, or create one. Enrol an student. On the course, click on Competencies on the navigation drawer. Then click Add competencies to course , and select the competency you just created. Create an assignment, expand Competencies section, search and select the competency and select Send for review on Upon activity completion . Enable manual completion for this assignment Log out and log in as student that you enrolled. Complete this assignment (manually mark it as completed). Log out and log in as admin. Go to Site administration > Users > Accounts > Browse list of users. Delete the student you used to submit the assignment. Log out. Try to access Moodle as admin. Make sure you are able to login and you don't see the mentioned error.

      Hello,

      When you have a competency waiting for a manager review and then you delete that user whose submission it is and try to access Moodle as manager/administrator you cannot do it anymore, Moodle opens only to show an error message but you cannot proceed or do anything else.

      // code 
       
      Invalid user
      Debug info: SELECT id FROM {user} WHERE id = ? AND deleted = ?
      [array (
      0 => '6',
      1 => 0,
      )]
      Error code: invaliduser
      Stack trace:
      line 1533 of /lib/dml/moodle_database.php: dml_missing_record_exception thrown
      line 1509 of /lib/dml/moodle_database.php: call to moodle_database->get_record_select()
      line 6212 of /lib/accesslib.php: call to moodle_database->get_record()
      line 222 of /competency/classes/user_competency.php: call to context_user::instance()
      line 59 of /lib/classes/external/persistent_exporter.php: call to core_competency\user_competency->get_context()
      line 99 of /blocks/lp/classes/output/summary.php: call to core\external\persistent_exporter->__construct()
      line 66 of /blocks/lp/classes/output/renderer.php: call to block_lp\output\summary->export_for_template()
      line 401 of /lib/outputrenderers.php: call to block_lp\output\renderer->render_summary()
      line 77 of /blocks/lp/block_lp.php: call to plugin_renderer_base->render()
      line 288 of /blocks/moodleblock.class.php: call to block_lp->get_content()
      line 230 of /blocks/moodleblock.class.php: call to block_base->formatted_contents()
      line 1200 of /lib/blocklib.php: call to block_base->get_content_for_output()
      line 1252 of /lib/blocklib.php: call to block_manager->create_block_contents()
      line 579 of /lib/outputrenderers.php: call to block_manager->ensure_content_created()
      line 110 of /theme/boost/classes/output/core_renderer.php: call to core_renderer->standard_head_html()
      line 219 of /lib/mustache/src/Mustache/Context.php: call to theme_boost\output\core_renderer->standard_head_html()
      line 138 of /lib/mustache/src/Mustache/Context.php: call to Mustache_Context->findVariableInStack()
      line 35 of /data/moodledatat/33x/localcache/mustache/1504160890/boost/__Mustache_f331ea457e6ac7e84847fc291f6981fb.php: call to Mustache_Context->findDot()
      line 68 of /lib/mustache/src/Mustache/Template.php: call to __Mustache_f331ea457e6ac7e84847fc291f6981fb->renderInternal()
      line 177 of /lib/outputrenderers.php: call to Mustache_Template->render()
      line 55 of /theme/boost/layout/columns2.php: call to renderer_base->render_from_template()
      line 1162 of /lib/outputrenderers.php: call to include()
      line 1092 of /lib/outputrenderers.php: call to core_renderer->render_page_layout()
      line 164 of /my/index.php: call to core_renderer->header()
      

      Steps to repeat.

      1. Make a competency framework that has a competency x
        2. Assign this competency to course1 and create an assignment-activity and for it select this competency and "send for review"
        3. Complete this assingment as Student1
        4. Delete user Student1 from Moodle
        5. Try to access Moodle with manager or administrator

      Tested on Moodle 3.3.1+

            lameze Simey Lameze
            urpokarhu Jari Vilkman
            Mark Nelson Mark Nelson
            Jun Pataleta Jun Pataleta
            Marina Glancy Marina Glancy
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated:
              Resolved:

                Error rendering 'clockify-timesheets-time-tracking-reports:timer-sidebar'. Please contact your Jira administrators.