Details

    • Type: Sub-task
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 2.4
    • Fix Version/s: 2.4
    • Component/s: Libraries
    • Labels:
    • Testing Instructions:
      Hide

      TEST1

      • Grep for get_context_instance() and make sure there is no valid usage in core beside the definition of the function.

      TEST2 - Forums

      • Try creating a forum
      • editing/updating/deleting a forum
      • updating/deleting/editing a discussion
      • updating/deleting/editing a reply

      TEST3 - Messages

      • Send messages to users
      • try updating/deleting/editing a reply

      TEST4 - Groups

      • try updating/deleting/editing/creating a group

      TEST5- Authentication

      • Try out enrolling users with various authentication methods that we support (ldap,ment etc)

      TEST6-(optional)

      • Hunt down an alien.
      • Force the alien to test everything in Moodle
      Show
      TEST1 Grep for get_context_instance() and make sure there is no valid usage in core beside the definition of the function. TEST2 - Forums Try creating a forum editing/updating/deleting a forum updating/deleting/editing a discussion updating/deleting/editing a reply TEST3 - Messages Send messages to users try updating/deleting/editing a reply TEST4 - Groups try updating/deleting/editing/creating a group TEST5- Authentication Try out enrolling users with various authentication methods that we support (ldap,ment etc) TEST6-(optional) Hunt down an alien. Force the alien to test everything in Moodle
    • Affected Branches:
      MOODLE_24_STABLE
    • Fixed Branches:
      MOODLE_24_STABLE
    • Pull Master Branch:
      MDL-34471-master

      Description

      Replace get_context_instance with context_XXXX::instance() in set location (Clean up)

      • Remove any remaining instances of the function get_context_instance from core.

        Gliffy Diagrams

          Attachments

            Issue Links

              Activity

              Hide
              poltawski Dan Poltawski added a comment -

              I've not integrated the lib issue yet, but there seem to be stragglers:
              it grep -c get_context_instance( | grep -v 'lib'
              auth/fc/auth.php:1
              auth/ldap/auth.php:3
              auth/ldap/ntlmsso_attempt.php:1
              auth/ldap/ntlmsso_finish.php:1
              auth/ldap/ntlmsso_magic.php:1
              auth/mnet/auth.php:3
              auth/shibboleth/index.php:1
              comment/index.php:1
              completion/criteria/completion_criteria_course.php:2
              file.php:1
              group/assign.php:1
              group/autogroup.php:2
              group/autogroup_form.php:1
              group/delete.php:1
              group/group.php:1
              group/grouping.php:1
              group/groupings.php:1
              group/import.php:2
              group/index.php:1
              group/members.php:1
              group/overview.php:1
              help.php:1
              index.php:3
              iplookup/index.php:2
              message/defaultoutputs.php:2
              message/edit.php:3
              message/index.php:2
              message/search_advanced.html:1
              mod/forum/discuss.php:4
              mod/forum/index.php:6
              mod/forum/post.php:10
              mod/forum/post_form.php:1
              mod/forum/search.php:2
              mod/forum/subscribe.php:1
              mod/forum/subscribers.php:1
              mod/forum/unsubscribeall.php:1
              mod/forum/user.php:4
              mod/forum/view.php:2
              mod/resource/mod_form.php:1
              mod/resource/view.php:1
              my/index.php:4
              my/indexsys.php:1
              notes/delete.php:2
              notes/edit.php:2
              notes/index.php:8

              Show
              poltawski Dan Poltawski added a comment - I've not integrated the lib issue yet, but there seem to be stragglers: it grep -c get_context_instance( | grep -v 'lib' auth/fc/auth.php:1 auth/ldap/auth.php:3 auth/ldap/ntlmsso_attempt.php:1 auth/ldap/ntlmsso_finish.php:1 auth/ldap/ntlmsso_magic.php:1 auth/mnet/auth.php:3 auth/shibboleth/index.php:1 comment/index.php:1 completion/criteria/completion_criteria_course.php:2 file.php:1 group/assign.php:1 group/autogroup.php:2 group/autogroup_form.php:1 group/delete.php:1 group/group.php:1 group/grouping.php:1 group/groupings.php:1 group/import.php:2 group/index.php:1 group/members.php:1 group/overview.php:1 help.php:1 index.php:3 iplookup/index.php:2 message/defaultoutputs.php:2 message/edit.php:3 message/index.php:2 message/search_advanced.html:1 mod/forum/discuss.php:4 mod/forum/index.php:6 mod/forum/post.php:10 mod/forum/post_form.php:1 mod/forum/search.php:2 mod/forum/subscribe.php:1 mod/forum/subscribers.php:1 mod/forum/unsubscribeall.php:1 mod/forum/user.php:4 mod/forum/view.php:2 mod/resource/mod_form.php:1 mod/resource/view.php:1 my/index.php:4 my/indexsys.php:1 notes/delete.php:2 notes/edit.php:2 notes/index.php:8
              Hide
              ankit_frenz Ankit Agarwal added a comment -

              Thanks Dan for the heads up.
              I guess we missed forum and a few others when creating the subtasks.
              I will take care of those in this issue.
              Thanks

              Show
              ankit_frenz Ankit Agarwal added a comment - Thanks Dan for the heads up. I guess we missed forum and a few others when creating the subtasks. I will take care of those in this issue. Thanks
              Hide
              ankit_frenz Ankit Agarwal added a comment -

              Requesting a review!
              (PS:- branch is on integration to reduce conflicts)

              Thanks

              Show
              ankit_frenz Ankit Agarwal added a comment - Requesting a review! (PS:- branch is on integration to reduce conflicts) Thanks
              Hide
              dmonllao David Monllaó added a comment -

              Done Ankit, all changes reviewed

              Show
              dmonllao David Monllaó added a comment - Done Ankit, all changes reviewed
              Hide
              ankit_frenz Ankit Agarwal added a comment -

              Thanks David for the review.
              Sending for integration!

              Cheers!

              Show
              ankit_frenz Ankit Agarwal added a comment - Thanks David for the review. Sending for integration! Cheers!
              Hide
              samhemelryk Sam Hemelryk added a comment -

              Hi Ankit, forgot to mention sorry, I am leaving this to the last minute to review and integrate.
              It will be much easier to handle conflicts should they arise if this lands last.

              Show
              samhemelryk Sam Hemelryk added a comment - Hi Ankit, forgot to mention sorry, I am leaving this to the last minute to review and integrate. It will be much easier to handle conflicts should they arise if this lands last.
              Hide
              samhemelryk Sam Hemelryk added a comment -

              Ok guys, things looked pretty accurate and I've integrated this now

              Show
              samhemelryk Sam Hemelryk added a comment - Ok guys, things looked pretty accurate and I've integrated this now
              Hide
              rajeshtaneja Rajesh Taneja added a comment - - edited

              Hello Ankit,

              As discussed it will be nice to replace php doc for get_context_instance in im/backup/converter/moodle1/lib.php#L531

              Also, not sure if we should keep testcase for this. lib/tests/accesslib_test.php#L2274

              Show
              rajeshtaneja Rajesh Taneja added a comment - - edited Hello Ankit, As discussed it will be nice to replace php doc for get_context_instance in im/backup/converter/moodle1/lib.php#L531 Also, not sure if we should keep testcase for this. lib/tests/accesslib_test.php#L2274
              Hide
              ankit_frenz Ankit Agarwal added a comment -

              Hi Sam,
              Raj spotted the function being referenced in phpdoc block in backup/converter/moodle1/lib.php
              I have pushed a commit to update that.

              Can you please pull it in?
              Thanks

              Show
              ankit_frenz Ankit Agarwal added a comment - Hi Sam, Raj spotted the function being referenced in phpdoc block in backup/converter/moodle1/lib.php I have pushed a commit to update that. Can you please pull it in? Thanks
              Hide
              samhemelryk Sam Hemelryk added a comment -

              Thanks guys, have pulling in that change now.

              Show
              samhemelryk Sam Hemelryk added a comment - Thanks guys, have pulling in that change now.
              Hide
              rajeshtaneja Rajesh Taneja added a comment -

              Thanks Ankit and Sam,

              All works fine. Tested few Auth plugins, and all works as expected.

              Show
              rajeshtaneja Rajesh Taneja added a comment - Thanks Ankit and Sam, All works fine. Tested few Auth plugins, and all works as expected.
              Hide
              stronk7 Eloy Lafuente (stronk7) added a comment -

              Fixed STOP Closed STOP Thanks STOP

              Yay, imagination! Ciao

              Show
              stronk7 Eloy Lafuente (stronk7) added a comment - Fixed STOP Closed STOP Thanks STOP Yay, imagination! Ciao

                People

                • Votes:
                  1 Vote for this issue
                  Watchers:
                  1 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved:
                    Fix Release Date:
                    3/Dec/12