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

Strict syntax error in quiz preview

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 2.3
    • Fix Version/s: 2.3
    • Component/s: Quiz
    • Labels:
    • Testing Instructions:
      Hide

      Start a quiz attempt/preview.

      Make sure there are no strict syntax errors displayed.

      Make sure that the quiz navigation 'block', the one with a button for each question in the quiz, does appear.

      Show
      Start a quiz attempt/preview. Make sure there are no strict syntax errors displayed. Make sure that the quiz navigation 'block', the one with a button for each question in the quiz, does appear.
    • Affected Branches:
      MOODLE_23_STABLE
    • Fixed Branches:
      MOODLE_23_STABLE
    • Pull from Repository:
    • Pull Master Branch:

      Description

      When previewing a quiz I get:

      Strict Standards: Only variables should be passed by reference in /Users/danp/git/integration/mod/quiz/attempt.php on line 114

      As discovered while testing MDL-32318

        Gliffy Diagrams

          Issue Links

            Activity

            Hide
            timhunt Tim Hunt added a comment -

            To INTEGRATORS:

            I just blindly back-ported this to all supported branches without really thinking. Do we need strict syntax fixes on all branches? I guess it does not really hurt, but I will let you make the final decision as to where to integrate.

            Show
            timhunt Tim Hunt added a comment - To INTEGRATORS: I just blindly back-ported this to all supported branches without really thinking. Do we need strict syntax fixes on all branches? I guess it does not really hurt, but I will let you make the final decision as to where to integrate.
            Hide
            poltawski Dan Poltawski added a comment -

            My thought would be not to backport strict fixes because:
            1/ It'll produce a lot of churn on the stable branches
            2/ Adds additional time/effort for testing
            3/ Unless its our goal to fix all of them it doesn't really seem worth doing one

            Show
            poltawski Dan Poltawski added a comment - My thought would be not to backport strict fixes because: 1/ It'll produce a lot of churn on the stable branches 2/ Adds additional time/effort for testing 3/ Unless its our goal to fix all of them it doesn't really seem worth doing one
            Hide
            poltawski Dan Poltawski added a comment -

            The main moodle.git repository has just been updated with latest weekly modifications. You may wish to rebase your PULL branches to simplify history and avoid any possible merge conflicts. This would also make integrator's life easier next week.

            TIA and ciao

            Show
            poltawski Dan Poltawski added a comment - The main moodle.git repository has just been updated with latest weekly modifications. You may wish to rebase your PULL branches to simplify history and avoid any possible merge conflicts. This would also make integrator's life easier next week. TIA and ciao
            Hide
            poltawski Dan Poltawski added a comment -

            Thanks Tim.

            This has been integrated. We are going for master only for strict fixes as its an improvement and for the reasons I mentioned above.

            Show
            poltawski Dan Poltawski added a comment - Thanks Tim. This has been integrated. We are going for master only for strict fixes as its an improvement and for the reasons I mentioned above.
            Hide
            abgreeve Adrian Greeve added a comment -

            I tried this pre and post patch. This patch does fix the initial strict standard problem, but when finishing the attempt and looking at the summary of the attempt it still displays a strict standard error.

            Strict Standards: Only variables should be passed by reference in /var/www/repositories/integration/master/moodle/mod/quiz/summary.php on line 83

            Show
            abgreeve Adrian Greeve added a comment - I tried this pre and post patch. This patch does fix the initial strict standard problem, but when finishing the attempt and looking at the summary of the attempt it still displays a strict standard error. Strict Standards: Only variables should be passed by reference in /var/www/repositories/integration/master/moodle/mod/quiz/summary.php on line 83
            Hide
            poltawski Dan Poltawski added a comment -

            Adrian: was that strict error present pre patch as well?

            Show
            poltawski Dan Poltawski added a comment - Adrian: was that strict error present pre patch as well?
            Hide
            abgreeve Adrian Greeve added a comment -

            Yes it was. I know that the file with the syntax error is different from the one mentioned in the description, but the testing instructions do say to test out the quiz attempt / preview.

            Show
            abgreeve Adrian Greeve added a comment - Yes it was. I know that the file with the syntax error is different from the one mentioned in the description, but the testing instructions do say to test out the quiz attempt / preview.
            Hide
            poltawski Dan Poltawski added a comment -

            Hmm, OK thanks. Well i'll wait for Tim to come online to decide, but I propose we take one of two avenues:

            1/ Add another commit to fix up this issue and get this done without another round of integration
            2/ Accept this is a (small) improvement and has fixed one issue, mark as passed and create another issue for the other issue..

            Show
            poltawski Dan Poltawski added a comment - Hmm, OK thanks. Well i'll wait for Tim to come online to decide, but I propose we take one of two avenues: 1/ Add another commit to fix up this issue and get this done without another round of integration 2/ Accept this is a (small) improvement and has fixed one issue, mark as passed and create another issue for the other issue..
            Hide
            timhunt Tim Hunt added a comment -

            I'm sorry, I should have caught this one too. It is basically the same code.

            Up to you whether you file a new issue for next week, or integrate a patch now.

            I am just about to make a suitable patch and push it.

            Show
            timhunt Tim Hunt added a comment - I'm sorry, I should have caught this one too. It is basically the same code. Up to you whether you file a new issue for next week, or integrate a patch now. I am just about to make a suitable patch and push it.
            Hide
            poltawski Dan Poltawski added a comment -

            I'll pull your patch into this week Tim

            Show
            poltawski Dan Poltawski added a comment - I'll pull your patch into this week Tim
            Show
            timhunt Tim Hunt added a comment - https://github.com/timhunt/moodle/compare/MDL-32396...MDL-32396b
            Hide
            poltawski Dan Poltawski added a comment -

            Thanks Tim, have broguht that in

            Show
            poltawski Dan Poltawski added a comment - Thanks Tim, have broguht that in
            Hide
            poltawski Dan Poltawski added a comment -

            Looks good now

            Show
            poltawski Dan Poltawski added a comment - Looks good now
            Hide
            poltawski Dan Poltawski added a comment -

            Bonza mate!

            Your changes have made it into the Moodle release! Its time to celebrate! Put a shrimp on the barbie and grab a stubby.

            Hooroo

            Show
            poltawski Dan Poltawski added a comment - Bonza mate! Your changes have made it into the Moodle release! Its time to celebrate! Put a shrimp on the barbie and grab a stubby. Hooroo

              People

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

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Fix Release Date:
                  25/Jun/12