Moodle
  1. Moodle
  2. MDL-1489

When I choose 0 for Number of Comments,...

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Won't Fix
    • Affects Version/s: 1.3
    • Fix Version/s: None
    • Component/s: Workshop
    • Labels:
      None
    • Environment:
      Linux
    • Database:
      MySQL
    • Affected Branches:
      MOODLE_13_STABLE
    • Rank:
      2890

      Description

      When I choose 0 for Number of Comments, Assessment Elements, Grade Bands, Criterion Statments or Categories in a Rubric, I have this error when I am on the Editing Assessment Elements page and I click save changes :

      Warning: Invalid argument supplied for foreach() in /home/www/test/moodle/mod/workshop/assessments.php on line 575

        Activity

        Hide
        Martin Dougiamas added a comment -

        From Arni Reynisson (arnihr at php.is) Sunday, 30 May 2004, 07:34 AM:

        I can't reproduce this. Can you specify more specifics? Or try using latest CVS?

        From Etienne Rozé (etienne.roze at sante-pub.u-nancy.fr) Tuesday, 1 June 2004, 08:26 PM:

        I use the last version of moodle (http://moodle.org/download.php/moodle/moodle-latest.tgz).

        When I turn on the debug mode, I have this message on the page moodle/mod/workshop/assessments.php?action=editelements&id=143 :

        Unknown column 'workshop' in 'where clause'

        SELECT COUNT FROM mdl_workshop_grades WHERE workshop = '5'

        So I suppose that an update of moodle broke something.

        I don't know to force the update of one module ( for reparation).

        May be you can help me ?

        From Etienne Rozé (etienne.roze at sante-pub.u-nancy.fr) Tuesday, 1 June 2004, 08:53 PM:

        I delete the workshop module completly ( db and files), and reinstall... I have the same symptoms...

        The version of the workshop module is 2004052100.

        From Arni Reynisson (arnihr at php.is) Wednesday, 2 June 2004, 10:27 PM:

        Find this line (line 297 from my cvs):

        $count = count_records(workshop_grades, workshop, $workshop->id);

        and change it to:

        $count = count_records(workshop_grades, workshopid, $workshop->id);

        Untested btw. See what it does.

        From Etienne Rozé (etienne.roze at sante-pub.u-nancy.fr) Wednesday, 2 June 2004, 10:59 PM:

        OK. Thank you.

        The debug message Unknown column 'workshop' in 'where etc... disappeared and it's ok when I choose more than 0 Number of comments...

        But the problem is the same when it's 0 Number of comments : I have always Warning: Invalid argument supplied ... (see my first message)

        and I come back to Editing Assessment Elements page

        From Arni Reynisson (arnihr at php.is) Thursday, 3 June 2004, 04:00 AM:

        Uff.

        I've been trying to work my way through mod/workshop/ and that ain't easy. I've found more bugs, at least really faulty things regarding to variables in, mostly $workshop->nelements, so that loops that depend on that variable never loop, because it's often initialized to 0, although I can't seem to find out why.

        Will try to pinpoint these errors and post them here later.

        From Ray Kingdon (rkingdon at glam.ac.uk) Friday, 18 June 2004, 05:44 PM:

        Yes, this is somewhat uncharted territory I'm afraid. I've fixed a few things which should help. The fixes are now in CVS.

        Please note that if you do set the number of assessments elements to zero, the grading strategy must be Not Graded. (It does not make any sense at all to have a normal grading strategy with no grading elements.)

        If the fixes I've made improve matters I'll update some of the help files.

        Thanks

        Ray

        Show
        Martin Dougiamas added a comment - From Arni Reynisson (arnihr at php.is) Sunday, 30 May 2004, 07:34 AM: I can't reproduce this. Can you specify more specifics? Or try using latest CVS? From Etienne Rozé (etienne.roze at sante-pub.u-nancy.fr) Tuesday, 1 June 2004, 08:26 PM: I use the last version of moodle ( http://moodle.org/download.php/moodle/moodle-latest.tgz ). When I turn on the debug mode, I have this message on the page moodle/mod/workshop/assessments.php?action=editelements&id=143 : Unknown column 'workshop' in 'where clause' SELECT COUNT FROM mdl_workshop_grades WHERE workshop = '5' So I suppose that an update of moodle broke something. I don't know to force the update of one module ( for reparation). May be you can help me ? From Etienne Rozé (etienne.roze at sante-pub.u-nancy.fr) Tuesday, 1 June 2004, 08:53 PM: I delete the workshop module completly ( db and files), and reinstall... I have the same symptoms... The version of the workshop module is 2004052100. From Arni Reynisson (arnihr at php.is) Wednesday, 2 June 2004, 10:27 PM: Find this line (line 297 from my cvs): $count = count_records(workshop_grades, workshop, $workshop->id); and change it to: $count = count_records(workshop_grades, workshopid, $workshop->id); Untested btw. See what it does. From Etienne Rozé (etienne.roze at sante-pub.u-nancy.fr) Wednesday, 2 June 2004, 10:59 PM: OK. Thank you. The debug message Unknown column 'workshop' in 'where etc... disappeared and it's ok when I choose more than 0 Number of comments... But the problem is the same when it's 0 Number of comments : I have always Warning: Invalid argument supplied ... (see my first message) and I come back to Editing Assessment Elements page From Arni Reynisson (arnihr at php.is) Thursday, 3 June 2004, 04:00 AM: Uff. I've been trying to work my way through mod/workshop/ and that ain't easy. I've found more bugs, at least really faulty things regarding to variables in, mostly $workshop->nelements, so that loops that depend on that variable never loop, because it's often initialized to 0, although I can't seem to find out why. Will try to pinpoint these errors and post them here later. From Ray Kingdon (rkingdon at glam.ac.uk) Friday, 18 June 2004, 05:44 PM: Yes, this is somewhat uncharted territory I'm afraid. I've fixed a few things which should help. The fixes are now in CVS. Please note that if you do set the number of assessments elements to zero, the grading strategy must be Not Graded. (It does not make any sense at all to have a normal grading strategy with no grading elements.) If the fixes I've made improve matters I'll update some of the help files. Thanks Ray
        Hide
        Martin Dougiamas added a comment -

        Moving this to Peter because Ray is no longer with us (RIP)

        Show
        Martin Dougiamas added a comment - Moving this to Peter because Ray is no longer with us (RIP)
        Hide
        Michael de Raadt added a comment -

        I'm closing this issue because it is now related to an unsupported version. The new Workshop activity was written from scratch.

        If you still think this is an issue relevant to the current version, please create a new issue for the current version.

        Show
        Michael de Raadt added a comment - I'm closing this issue because it is now related to an unsupported version. The new Workshop activity was written from scratch. If you still think this is an issue relevant to the current version, please create a new issue for the current version.

          People

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

            Dates

            • Created:
              Updated:
              Resolved: