mc-exam-randomizer

Crates.iomc-exam-randomizer
lib.rsmc-exam-randomizer
version0.3.7
sourcesrc
created_at2022-06-24 06:54:34.67387
updated_at2023-02-15 23:55:03.1373
descriptionThis is a library that help produce a randomized multiple choice (mc) exam.
homepagehttps://github.com/mmogib/mc-exam-randomizer
repositoryhttps://github.com/mmogib/mc-exam-randomizer
max_upload_size
id612238
size383,011
(mmogib)

documentation

https://github.com/mmogib/mc-exam-randomizer

README

Multiple Choice Exam Randomizer (mc-exam-randomizer)

Usage


use mc_exam_randomizer::{
    errors::ExamReaderError,
    shuffler::{shuffle_exam, Exam},
};

fn main() {
    
    // use your own file
    let filename_tex = "files/exam.tex";
    
    match Exam::from_tex(filename_tex, "master") {
        Ok(ex) => {
            println!("master {:#?}", ex);
            let version_1 = shuffle_exam(&ex, Some("version 1"));
            println!("ver1 {:#?}", version_1);
        }
        Err(err) => match err {
            ExamReaderError::TemplateError(err_st) => {
                println!("ERR: {:#?}", err_st);
            }
            _ => println!("Err: {:#?}", err),
        },
    };
    
}

Commit count: 18

cargo fmt