Details

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

      Prerequisite

      1. course with few activities and users having gardes

      Test

      1. Log in as admin
      2. Enable gradepublishing
      3. Go to course and click on Grades
      4. Click on Key manager (Grade administration > Export> Key manager).
      5. Make sure no setType warning appears
      6. Add new key and make sure it gets added without any problem.
      7. Export grades as "Plain text file" (Grade administration > Export> Plain text file)
      8. Make sure no setType warning appears and you can export grades without any problem.
      Show
      Prerequisite course with few activities and users having gardes Test Log in as admin Enable gradepublishing Go to course and click on Grades Click on Key manager (Grade administration > Export > Key manager). Make sure no setType warning appears Add new key and make sure it gets added without any problem. Export grades as "Plain text file" (Grade administration > Export > Plain text file) Make sure no setType warning appears and you can export grades without any problem.
    • Affected Branches:
      MOODLE_25_STABLE
    • Fixed Branches:
      MOODLE_25_STABLE
    • Pull Master Branch:
      wip-mdl-40469

      Description

      With gradepublishing set, try export gradebook as plain text and you will see following warning:

      Did you remember to call setType() for 'iprestriction'? Defaulting to PARAM_RAW cleaning.
       
          line 1303 of /lib/formslib.php: call to debugging()
          line 281 of /lib/formslib.php: call to moodleform->detectMissingSetType()
          line 202 of /lib/formslib.php: call to moodleform->_process_submission()
          line 43 of /grade/export/txt/index.php: call to moodleform->moodleform()
      

      While generating user key (Grades ► User keys ► Create user key), you will see following warning:

      Did you remember to call setType() for 'iprestriction'? Defaulting to PARAM_RAW cleaning.
       
          line 1303 of /lib/formslib.php: call to debugging()
          line 281 of /lib/formslib.php: call to moodleform->detectMissingSetType()
          line 202 of /lib/formslib.php: call to moodleform->_process_submission()
          line 92 of /grade/export/key.php: call to moodleform->moodleform()
      

        Gliffy Diagrams

          Attachments

            Issue Links

              Activity

              Hide
              rajeshtaneja Rajesh Taneja added a comment -

              Robert reported this problem in MDL-38851

              Show
              rajeshtaneja Rajesh Taneja added a comment - Robert reported this problem in MDL-38851
              Hide
              rrusso Robert Russo added a comment -

              Thanks Rajesh

              Show
              rrusso Robert Russo added a comment - Thanks Rajesh
              Hide
              ankit_frenz Ankit Agarwal added a comment - - edited

              Hi Raj,
              Two minor things, you might want to reconsider:-

              1. iprestriction - am not sure what all is allowed here but PARAM_NOTAGS seems more appropriate.
              2. 'key' is of type varchar, PARAM_INT seems incorrect. (Also it is not required to settype for selects)

              Rest looks good.
              Thanks

              Show
              ankit_frenz Ankit Agarwal added a comment - - edited Hi Raj, Two minor things, you might want to reconsider:- iprestriction - am not sure what all is allowed here but PARAM_NOTAGS seems more appropriate. 'key' is of type varchar, PARAM_INT seems incorrect. (Also it is not required to settype for selects) Rest looks good. Thanks
              Hide
              rajeshtaneja Rajesh Taneja added a comment -

              Thanks for the feedback Ankit,

              1. iprestriction is using PARAM_RAW_TRIMMED in admin/webservice/forms.php, so seems fine to me.
              2. Fixed.

              Pushing it for integration.

              Show
              rajeshtaneja Rajesh Taneja added a comment - Thanks for the feedback Ankit, iprestriction is using PARAM_RAW_TRIMMED in admin/webservice/forms.php, so seems fine to me. Fixed. Pushing it for integration.
              Hide
              samhemelryk Sam Hemelryk added a comment -

              Thanks Raj this has been integrated now

              Show
              samhemelryk Sam Hemelryk added a comment - Thanks Raj this has been integrated now
              Hide
              rwijaya Rossiani Wijaya added a comment -

              Hi Raj,

              This is working as instructed.

              Tested for 2.5 and master.

              However just some comment regarding the param type for iprestriction, it doesn't seem correct to use PARAM_RAW_TRIMMED. I input characters for key IP restriction and it takes the value as a validate input. (screenshot).

              I am aware that we don't have something like PARAM_IP to use, but it might be good to implement it.

              Other than that, this is working as expected.

              Test passed.

              Show
              rwijaya Rossiani Wijaya added a comment - Hi Raj, This is working as instructed. Tested for 2.5 and master. However just some comment regarding the param type for iprestriction, it doesn't seem correct to use PARAM_RAW_TRIMMED. I input characters for key IP restriction and it takes the value as a validate input. (screenshot). I am aware that we don't have something like PARAM_IP to use, but it might be good to implement it. Other than that, this is working as expected. Test passed.
              Hide
              rajeshtaneja Rajesh Taneja added a comment -

              Thanks Rossie,

              This being a admin page, I won't be of much concern. As you have mentioned, there is no existing PARAM_IP to do this, hence keeping it in sync with other use-case.

              Show
              rajeshtaneja Rajesh Taneja added a comment - Thanks Rossie, This being a admin page, I won't be of much concern. As you have mentioned, there is no existing PARAM_IP to do this, hence keeping it in sync with other use-case.
              Hide
              samhemelryk Sam Hemelryk added a comment -

              Huzzah, your code made it into Moodle. Perhaps now things are ever so slightly better!

              "The ship can't take this much pressure. Sometimes it falls apart just sitting in the hangar."
              ~ Professor Farnsworth

              Show
              samhemelryk Sam Hemelryk added a comment - Huzzah, your code made it into Moodle. Perhaps now things are ever so slightly better! "The ship can't take this much pressure. Sometimes it falls apart just sitting in the hangar." ~ Professor Farnsworth

                People

                • Votes:
                  0 Vote for this issue
                  Watchers:
                  5 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved:
                    Fix Release Date:
                    9/Sep/13