Details

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

      1. Create a site level badge.
      2. Add course set completion criteria.
      3. Select some courses and proceed.
      3. No setType() warning should appear.

      Show
      1. Create a site level badge. 2. Add course set completion criteria. 3. Select some courses and proceed. 3. No setType() warning should appear.
    • Affected Branches:
      MOODLE_25_STABLE
    • Fixed Branches:
      MOODLE_26_STABLE
    • Pull from Repository:

      Description

      Did you remember to call setType() for 'grade_14'? 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 78 of /badges/criteria_settings.php: call to moodleform->moodleform()

      To replicate:

      1. add a new badge
      2. add badge criteria for completing a set of course

        Gliffy Diagrams

          Attachments

            Activity

            Hide
            ankit_frenz Ankit Agarwal added a comment -

            Hi Yuliya,
            The patch looks nice. I did notice a few usages in helper_search_form() without setTypes, but since that api is just used to generate html code and is not really used in a "moodle form" sense, am happy to go ahead with the patch.
            Feel free to push for integration.
            cheers

            Show
            ankit_frenz Ankit Agarwal added a comment - Hi Yuliya, The patch looks nice. I did notice a few usages in helper_search_form() without setTypes, but since that api is just used to generate html code and is not really used in a "moodle form" sense, am happy to go ahead with the patch. Feel free to push for integration. cheers
            Hide
            samhemelryk Sam Hemelryk added a comment -

            Thanks Yuliya, I've cherry-picked the commit and integrated it now.
            I cherry-picked as the branch contained other commits. Please msg here is that assumption was wrong and we can look to rectify it.

            Many thanks
            Sam

            Show
            samhemelryk Sam Hemelryk added a comment - Thanks Yuliya, I've cherry-picked the commit and integrated it now. I cherry-picked as the branch contained other commits. Please msg here is that assumption was wrong and we can look to rectify it. Many thanks Sam
            Hide
            ybozhko Yuliya Bozhko added a comment -

            Thanks! I am pretty sure it was 2.5 master branch before the release last week. I was not sure if I needed to update it as it was already pushed for integration.

            Show
            ybozhko Yuliya Bozhko added a comment - Thanks! I am pretty sure it was 2.5 master branch before the release last week. I was not sure if I needed to update it as it was already pushed for integration.
            Hide
            poltawski Dan Poltawski added a comment -

            I've cherry-picked the patch to 2.5 (e7873336223b2e9ce03a880e2cc5eb85755894c4) as Michael noticed it seemed to be missing.

            Show
            poltawski Dan Poltawski added a comment - I've cherry-picked the patch to 2.5 (e7873336223b2e9ce03a880e2cc5eb85755894c4) as Michael noticed it seemed to be missing.
            Hide
            salvetore Michael de Raadt added a comment -

            Test result: Success!

            Tested in 2.5 and master. No warnings shown.

            Show
            salvetore Michael de Raadt added a comment - Test result: Success! Tested in 2.5 and master. No warnings shown.
            Hide
            poltawski Dan Poltawski added a comment -

            Thanks for your contributions!

            _main:
            @ BB#0:
                    push    {r7, lr}
                    mov     r7, sp
                    sub     sp, #4
                    movw    r0, :lower16:(L_.str-(LPC0_0+4))
                    movt    r0, :upper16:(L_.str-(LPC0_0+4))
            LPC0_0:
                    add     r0, pc
                    bl      _printf
                    movs    r1, #0
                    movt    r1, #0
                    str     r0, [sp]                @ 4-byte Spill
                    mov     r0, r1
                    add     sp, #4
                    pop     {r7, pc}
             
                    .section        __TEXT,__cstring,cstring_literals
            L_.str:                                 @ @.str
                    .asciz   "This code is now upstream!"
            

            Show
            poltawski Dan Poltawski added a comment - Thanks for your contributions! _main: @ BB#0: push {r7, lr} mov r7, sp sub sp, #4 movw r0, :lower16:(L_.str-(LPC0_0+4)) movt r0, :upper16:(L_.str-(LPC0_0+4)) LPC0_0: add r0, pc bl _printf movs r1, #0 movt r1, #0 str r0, [sp] @ 4-byte Spill mov r0, r1 add sp, #4 pop {r7, pc}   .section __TEXT,__cstring,cstring_literals L_.str: @ @.str .asciz "This code is now upstream!"

              People

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

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Fix Release Date:
                  18/Nov/13