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

Uses of deprecated [grade,core] string detected

    XMLWordPrintable

Details

    • MOODLE_311_STABLE, MOODLE_400_STABLE
    • MOODLE_311_STABLE
    • MDL-71570-311
    • MDL-71570-master
    • Hide

      Test 1 (deprecated string is not being used anywhere)

      1. Open terminal and navigate to the root directory of your moodle instance
      2. Run the following command (search the string existence in the code):

        ag '\{#str}} *grade\b'

      3. Verify that NO results are found.

      Test 2 (deprecated string was properly replaced)

      1. Login as admin.
      2. Create a course.
      3. Enrol a student in the course
      4. Create a forum (Forum 1) in the course.
        1. In the 'Whole forum grading' section, for "Grade" set "Type" as "Point".
        2. Save and return to course.
      5. Create another forum (Forum 2) in the course.
        1. In the 'Whole forum grading' section, for "Grade" set "Type" as "Scale"
        2. Save and return to course.
      6. Login as the student.
      7. Go to Forum 1.
      8. Click on "View grades"
        1. Verify that there are 2 labels with the language string "Grade" in the modal
      9. Repeat steps 7-8 for Forum 2. 
      Show
      Test 1 (deprecated string is not being used anywhere) Open terminal and navigate to the root directory of your moodle instance Run the following command (search the string existence in the code): ag '\{#str}} *grade\b' Verify that NO results are found. Test 2 (deprecated string was properly replaced) Login as admin. Create a course. Enrol a student in the course Create a forum (Forum 1) in the course. In the 'Whole forum grading' section, for "Grade" set "Type" as "Point". Save and return to course. Create another forum (Forum 2) in the course. In the 'Whole forum grading' section, for "Grade" set "Type" as "Scale" Save and return to course. Login as the student. Go to Forum 1. Click on "View grades" Verify that there are 2 labels with the language string "Grade" in the modal Repeat steps 7-8 for Forum 2. 
    • 1
    • QA blitz 3

    Description

      While looking for PHP8 specific problems in apache logs (see MDL-70986), it has been discovered this remaining use of the [grade,core] string, that is now deprecated:

      174106:[Fri May 07 19:41:51.524170 2021] [php:notice] [pid 6009] [client 172.24.0.7:46980] Debugging:
       
      String [grade,core] is deprecated. Either you should no longer be using that string, or the string has been incorrectly deprecated, in which case you should report this as a bug. Please refer to https://docs.moodle.org/dev/String_deprecation in
      * line 394 of /lib/classes/string_manager_standard.php: call to debugging()
      * line 206 of /lib/classes/output/mustache_template_source_loader.php: call to core_string_manager_standard->get_string()
      * line 181 of /lib/classes/output/mustache_template_source_loader.php: call to core\\output\\mustache_template_source_loader->core\\output\\{closure}()
      * line 209 of /lib/classes/output/mustache_template_source_loader.php: call to core\\output\\mustache_template_source_loader->core\\output\\{closure}()
      * line 152 of /lib/classes/output/external.php: call to core\\output\\mustache_template_source_loader->load_with_dependencies()
      * line 261 of /lib/externallib.php: call to core\\output\\external::load_template_with_dependencies()
      * line 81 of /lib/ajax/service.php: call to external_api::call_external_function()
      * line 33 of /lib/ajax/service-nologin.php: call to require_once()
      , referer: http://webserverbd13e3f8a83bd6ab/behatrun3/mod/forum/view.php?id=107000
      

      The lang string was deprecated by MDL-71118, for 311 and master

      This issue is about to detect it (an any other use that may be not detected by behat), and start using the new alternative.

      Attachments

        Issue Links

          Activity

            People

              Geshoski Mihail Geshoski
              stronk7 Eloy Lafuente (stronk7)
              Sujith Haridasan Sujith Haridasan
              Sara Arjona (@sarjona) Sara Arjona (@sarjona)
              Gladys Basiana Gladys Basiana
              Adrian Greeve, Jake Dallimore, Mathew May, Mihail Geshoski, Sujith Haridasan, Aya Saad, David Mudrák (@mudrd8mz), Helen Foster, Víctor Déniz Falcón
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:
                17/May/21

                Time Tracking

                  Estimated:
                  Original Estimate - 0 minutes
                  0m
                  Remaining:
                  Remaining Estimate - 0 minutes
                  0m
                  Logged:
                  Time Spent - 2 hours, 5 minutes
                  2h 5m