Proyectos de Subversion Moodle

Rev

Rev 1 | Mostrar el archivo completo | | | Autoría | Ultima modificación | Ver Log |

Rev 1 Rev 1441
Línea 27... Línea 27...
27
 *      - string itemid: itemid of the file
27
 *      - string itemid: itemid of the file
28
 *      - string filename: Name of the file added to the draft area.
28
 *      - string filename: Name of the file added to the draft area.
29
 *      - string filesize: The file size.
29
 *      - string filesize: The file size.
30
 *      - string filepath: The filepath.
30
 *      - string filepath: The filepath.
31
 *      - string contenthash: The file contenthash.
31
 *      - string contenthash: The file contenthash.
-
 
32
 *      - float avscantime: (optional) if present, the time taken to do any AV scanning, in seconds.
32
 * }
33
 * }
33
 *
34
 *
34
 * @package   core
35
 * @package   core
35
 * @since     Moodle 4.2
36
 * @since     Moodle 4.2
36
 * @copyright 2023 The Open University.
37
 * @copyright 2023 The Open University.
Línea 75... Línea 76...
75
        }
76
        }
Línea 76... Línea 77...
76
 
77
 
77
        if (!isset($this->other['contenthash'])) {
78
        if (!isset($this->other['contenthash'])) {
78
            throw new \coding_exception('The \'contenthash\' value must be set in other.');
79
            throw new \coding_exception('The \'contenthash\' value must be set in other.');
-
 
80
        }
-
 
81
 
-
 
82
        if (isset($this->data['other']['avscantime'])) {
-
 
83
            if (!is_numeric($this->data['other']['avscantime'])) {
-
 
84
                throw new \coding_exception('If given, \'avscantime\' in other must be a number.');
-
 
85
            }
-
 
86
            $this->data['other']['avscantime'] = (float) $this->data['other']['avscantime'];
-
 
87
        }
79
        }
88
 
80
    }
89
    }