Proyectos de Subversion Moodle

Rev

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

Rev 11 Rev 1441
Línea 31... Línea 31...
31
 *
31
 *
32
 * @package    core_backup
32
 * @package    core_backup
33
 * @copyright  2017 Adrian Greeve <adrian@moodle.com>
33
 * @copyright  2017 Adrian Greeve <adrian@moodle.com>
34
 * @license    http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
34
 * @license    http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
35
 */
35
 */
36
class restore_stepslib_date_test extends \restore_date_testcase {
36
final class restore_stepslib_date_test extends \restore_date_testcase {
Línea 37... Línea 37...
37
 
37
 
38
    /**
38
    /**
39
     * Restoring a manual grade item does not result in the timecreated or
39
     * Restoring a manual grade item does not result in the timecreated or
40
     * timemodified dates being changed.
40
     * timemodified dates being changed.
Línea 318... Línea 318...
318
    }
318
    }
Línea 319... Línea 319...
319
 
319
 
320
    /**
320
    /**
321
     * Checking that the user completion of an activity relating to the view field does not change
321
     * Checking that the user completion of an activity relating to the view field does not change
322
     * when doing a course restore.
322
     * when doing a course restore.
-
 
323
     * @covers \backup_userscompletion_structure_step
323
     * @covers ::backup_and_restore
324
     * @covers \restore_userscompletion_structure_step
324
     */
325
     */
325
    public function test_usercompletion_view_restore(): void {
326
    public function test_usercompletion_view_restore(): void {
326
        global $DB;
327
        global $DB;
327
        // More completion...
328
        // More completion...
Línea 406... Línea 407...
406
 
407
 
Línea 407... Línea 408...
407
        $attemptobj->process_submitted_actions($timenow, false, $tosubmit);
408
        $attemptobj->process_submitted_actions($timenow, false, $tosubmit);
408
 
409
 
409
        // Finish the attempt.
410
        // Finish the attempt.
-
 
411
        $attemptobj = quiz_attempt::create($attempt->id);
Línea 410... Línea 412...
410
        $attemptobj = quiz_attempt::create($attempt->id);
412
        $attemptobj->process_submit($timenow, false);
411
        $attemptobj->process_finish($timenow, false);
413
        $attemptobj->process_grade_submission($timenow);
412
 
414
 
413
        $questionattemptstepdates = [];
415
        $questionattemptstepdates = [];
414
        $originaliterator = $quba->get_attempt_iterator();
416
        $originaliterator = $attemptobj->get_question_usage()->get_attempt_iterator();
Línea 415... Línea 417...
415
        foreach ($originaliterator as $questionattempt) {
417
        foreach ($originaliterator as $questionattempt) {