Grader
|
#include <Grader.h>
Public Member Functions | |
std::shared_ptr< RubricItem > | createRubricItem () |
std::shared_ptr< RubricItem > | createRubricItem (const std::string &) |
std::shared_ptr< RubricItem > | createRubricItem (const std::function< bool()> &) |
void | run () |
void | run_debug () |
bool | failed () |
bool | passed () |
nlohmann::json | resultsJson () |
std::string | results () |
Public Attributes | |
bool | has_evaluated = false |
Stats | stats |
The main Grader tool. Responsible for creating RubricItems, running them and then outputting results.
shared_ptr< RubricItem > Grader::createRubricItem | ( | ) |
Generates a RubricItem.
std::shared_ptr<RubricItem> Grader::createRubricItem | ( | const std::string & | ) |
Generates a RubricItem.
std::shared_ptr<RubricItem> Grader::createRubricItem | ( | const std::function< bool()> & | ) |
Generates a RubricItem.
bool Grader::failed | ( | ) |
Whether or not the Grader as a whole has failed.
bool Grader::passed | ( | ) |
Whether or not the Grader as a whole has passed. Every RubricItem must pass or be optional for this to be true.
string Grader::results | ( | ) |
Get a stringified JSON representation of the evaluation results. Good for outputting to another environment.
json Grader::resultsJson | ( | ) |
Get a JSON representation of the evaluation results.
void Grader::run | ( | ) |
Evaluates all RubricItems and respects checkpoint and optional flags.
void Grader::run_debug | ( | ) |
Evaluates all RubricItems regardless of flags.
bool Grader::has_evaluated = false |
True after it completes evaluating RubricItems
Stats Grader::stats |
Stores and generates info on evaluated RubricItems. public for testing purposes