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

Creating Assignment with receive a passing grade to complete this activity: Exception - grade_floatval(): Argument #1 ($number)

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: Minor Minor
    • None
    • 4.0
    • Assignment
    • MOODLE_400_STABLE

      1. Create an Assignment
      2. Fill in Assignment name "Test"
      3. go to Completion tracking
      4. select require grade 
        1. Student must receive a grade to complete this activity and
        1. Student must receive a passing grade to complete this activity

      You will get this: Exception - grade_floatval(): Argument #1 ($number) must be of type ?float, string given, called in [dirroot]/course/moodleform_mod.php on line 496

      Stack trace:

      • line 1595 of /lib/gradelib.php: TypeError thrown
      • line 496 of /course/moodleform_mod.php: call to grade_floatval()
      • line 244 of /mod/assign/mod_form.php: call to moodleform_mod->validation()
      • line 653 of /lib/formslib.php: call to mod_assign_mod_form->validation()
      • line 589 of /lib/formslib.php: call to moodleform->validate_defined_fields()
      • line 699 of /lib/formslib.php: call to moodleform->is_validated()
      • line 1352 of /course/moodleform_mod.php: call to moodleform->get_data()
      • line 166 of /course/modedit.php: call to moodleform_mod->get_data()

       

      The problem may be that the passing grade is still empty. If one makes comparable steps with an existing task, an error message is immediately displayed under "Student must receive a passing grade to complete this activity".

      Notice: I have not tested the other modules with the passing grade option.

      Also tested on https://qa.moodledemo.net/

            Unassigned Unassigned
            dag Dag Klimas
            Votes:
            5 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved:

                Error rendering 'clockify-timesheets-time-tracking-reports:timer-sidebar'. Please contact your Jira administrators.