You are viewing limited content. For full access, please sign in.

Question

Question

Randomized Evaluation of a peer

asked one day ago

One of the programs I support use a random anonymous peer to peer evaluation. It is currently done using word with an excel randomizer attached so the students cannot select who the student is. Does anyone know a way I can accomplish this in Forms or Workflow? If you need more information please let me know. Thank you in advance for getting back to me with this information. 

0 0

Replies

replied one day ago

Could use a SQL stored procedure.

CREATE PROCEDURE GenerateRandomNumber
    @min_value INT,
    @max_value INT,
    @random_number INT OUTPUT
AS
BEGIN
    -- Ensure min_value is less than or equal to max_value
    IF @min_value > @max_value
    BEGIN
        DECLARE @temp INT;
        SET @temp = @min_value;
        SET @min_value = @max_value;
        SET @max_value = @temp;
    END

    -- Generate a random number within the specified range
    SELECT @random_number = FLOOR(RAND() * (@max_value - @min_value + 1)) + @min_value;
END;

 

1 0
replied one day ago Show version history

If you can sequentially number your rows, then you can create a Randomizer Formula rule to return a random row. Use the following syntax for the rule with a Min and Max input assigned. Then query the top row in your table before calling the rule to set the correct max row count value.

FLOOR(%(Min) + (((((DAY(NOW()) * 86400 + HOUR(NOW()) * 3600 + SECOND(NOW())) * 9301 + 49297) - FLOOR(((DAY(NOW()) * 86400 + HOUR(NOW()) * 3600 + SECOND(NOW())) * 9301 + 49297) / 233280) * 233280) / 233280) * (%(Max) - %(Min) + 1)))

0 0
You are not allowed to follow up in this post.

Sign in to reply to this post.