Skip to content
Snippets Groups Projects
Commit 3a6b4bf3 authored by Philip Kaluđerčić's avatar Philip Kaluđerčić :u7121:
Browse files

Generate an ID for each question

parent 4ec9715e
No related branches found
No related tags found
No related merge requests found
......@@ -6,6 +6,7 @@ use warnings;
use JSON;
use IPC::Open2;
use Digest::MD5 qw(md5_base64);
my @markdown = qw/cmark --smart --safe/;
......@@ -88,6 +89,7 @@ while (<>) {
add();
%last_option =
(
"id" => md5_base64($ARGV . $2),
"option" => md($2),
"correct" => $1 eq "+" ? JSON::true : $1 eq "-" ? JSON::false : JSON::null
);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment