LLMS_Quiz_Attempt::l10n( string $key )

Translate attempt related strings


Parameters Parameters

$key

(string) (Required) Key to translate.


Top ↑

Return Return

(string)


Top ↑

Source Source

File: includes/models/model.llms.quiz.attempt.php

701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
        $i++;
    }
 
    // Fisher-yates-knuth shuffle variation O(n).
    $num = count( $inc );
    while ( $num-- ) {
        $perm                       = wp_rand( 0, $num );
        $swap                       = $questions[ $inc[ $num ] ];
        $questions[ $inc[ $num ] ]  = $questions[ $inc[ $perm ] ];
        $questions[ $inc[ $perm ] ] = $swap;
    }
 
    return $questions;
 
}
 
/**
 * Determine if the attempt can be autograded


Top ↑

Changelog Changelog

Changelog
Version Description
4.2.0 Made sure the status key exists to avoid trying to access to array's undefined index.
3.9.0
3.16.0 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

You must log in before being able to contribute a note or feedback.