2020-08-07 12:23:59 +02:00
|
|
|
module.exports =
|
|
|
|
{
|
|
|
|
// API'routes (after "apiUrl" defined in instance.js)
|
|
|
|
questionnaireRoutes: "/questionnaire",
|
|
|
|
getQuestionnaireRoutes: "/get",
|
|
|
|
previewQuestionnaireRoutes: "/preview",
|
|
|
|
publishedQuestionnaireRoutes: "/quiz/",
|
|
|
|
saveAnswersRoute: "/answer/",
|
|
|
|
getStatsQuestionnaires : "/stats/",
|
|
|
|
searchQuestionnairesRoute : "/search",
|
|
|
|
getRandomQuestionnairesRoute : "/getrandom",
|
|
|
|
searchAdminQuestionnairesRoute : "/searchadmin",
|
|
|
|
getListNextQuestionnaires: "/getlistnextquestionnaires/",
|
|
|
|
regenerateHTML: "/htmlregenerated",
|
|
|
|
// -- questions & choices :
|
|
|
|
questionsRoute: "/question/",
|
|
|
|
// -- tags :
|
|
|
|
tagsSearchRoute: "/tags/search/",
|
|
|
|
// -- answers :
|
|
|
|
getQuestionnairesWithoutAnswer: "/withoutanswer/user/",
|
|
|
|
getPreviousAnswers: "/user/answers/",
|
|
|
|
getStatsAnswers : "/user/anwswers/stats/",
|
|
|
|
getAdminStats: "/getadminstats/",
|
|
|
|
// forms : à compléter avec valeurs par défaut, etc. cf modèle
|
|
|
|
Questionnaire :
|
|
|
|
{
|
|
|
|
title: { maxlength: 255, required: true },
|
|
|
|
slug: { maxlength: 150 }, // champ requis mais calculé à partir du titre qd vide
|
|
|
|
introduction: { required: true }
|
|
|
|
},
|
|
|
|
searchQuestionnaires : { minlength: 3, required: true },
|
|
|
|
Question :
|
|
|
|
{
|
|
|
|
text: { maxlength: 255, required: true },
|
|
|
|
rank: { required: true, min:1, defaultValue:1 }
|
|
|
|
},
|
|
|
|
Choice :
|
|
|
|
{
|
|
|
|
text: { maxlength: 255, required: true }
|
|
|
|
},
|
|
|
|
nbQuestionsMin: 1,
|
|
|
|
nbQuestionsMax: 0,
|
|
|
|
nbChoicesMax: 10,
|
|
|
|
nbTagsMin: 0,
|
|
|
|
nbTagsMax: 0, // 0 = not max
|
|
|
|
// JSON and HTML dir
|
|
|
|
dirCacheQuestionnaires : "datas/questionnaires",
|
|
|
|
dirCacheQuestions : "datas/questionnaires/questions",
|
|
|
|
dirCacheUsersQuestionnaires : "datas/users/questionnaires",
|
|
|
|
dirCacheTags : "datas/questionnaires/tags",
|
|
|
|
dirHTMLQuestionnaire : "front/public/quiz",
|
|
|
|
dirHTMLTags : "front/public/quizs",
|
|
|
|
dirWebQuestionnaire : "quiz",//pour url page
|
2020-08-18 12:14:20 +02:00
|
|
|
dirWebTags : "quizs/",// idem
|
2020-08-07 12:23:59 +02:00
|
|
|
nbRandomResults : 3// limite les résultat du moteur de recherche quand demande de résultats au hasard
|
|
|
|
};
|