Subversion Repositories wimsdev

Rev

Rev 16132 | Blame | Compare with Previous | Last modification | View Log | RSS feed

  1. /*    Copyright (C) 1998-2003 XIAO, Gang of Universite de Nice - Sophia Antipolis
  2.  *
  3.  *  This program is free software; you can redistribute it and/or modify
  4.  *  it under the terms of the GNU General Public License as published by
  5.  *  the Free Software Foundation; either version 2 of the License, or
  6.  *  (at your option) any later version.
  7.  *
  8.  *  This program is distributed in the hope that it will be useful,
  9.  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
  10.  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  11.  *  GNU General Public License for more details.
  12.  *
  13.  *  You should have received a copy of the GNU General Public License
  14.  *  along with this program; if not, write to the Free Software
  15.  *  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  16.  */
  17.  
  18. /* WWW interactive multipurpose server, header definitions */
  19.  
  20. #ifndef wimsdef_h
  21. #define wimsdef_h
  22. /* maximal (multi-)line length. */
  23. #define MAX_LINELEN 45000
  24. /* limit of items in a list; will never exceed MAX_LINELEN/2. */
  25. #define MAX_LIST 8192
  26. /* maximal name length */
  27. #define MAX_NAMELEN 63
  28. /* maximal file name length, complete path. */
  29. #define MAX_FNAME 199
  30. /* maximal module name length. */
  31. #define MAX_MODULELEN 100
  32. /* maximal number of resident executions */
  33. #define MAX_MULTIEXEC 4
  34. /* maximal file length for webget */
  35. #define MAX_WEBGETFLEN (32*1024*1024)
  36. /* max length of class name */
  37. #define MAX_CLASSLEN 31
  38. /* max length of session name */
  39. #define MAX_SESSIONLEN 23
  40. /* max number of exercises in a class (sheets and exams)
  41.  * if it is greater than MAX_EXOS * MAX_SHEETS + MAX_EXAMS,
  42.  * the limitation is not useful
  43.  */
  44. #define MAX_CLASSEXOS 2048
  45. /* Must be less than 99 to be sure that some sessions filename
  46.    do not cause buffer overflow (see exam.c line 71)
  47.  */
  48. /* max number of exercises in a sheet or exam; not modifiable */
  49. #define MAX_EXOS 64
  50. /* max number of sheets; not modifiable */
  51. #define MAX_SHEETS 64
  52. /* max number of freeworks; */
  53. #define MAX_FREEWORKS 64
  54. /* max number of user in class to use module grades; */
  55. #define MAX_USERFORGRADES 200
  56. /* max number of exams; not used except in Misc/exostat and in adm modules */
  57. #define MAX_EXAMS 80
  58. /* max number of votes */
  59. #define MAX_VOTES 64
  60. /* max numbers of replies in OEF */
  61. #define MAX_OEFREPLIES 100
  62. /* max numbers of choices in OEF */
  63. #define MAX_OEFCHOICES 30
  64. /* max number of values for one techvar*/
  65. #define MAX_TECHVARVAL 20
  66. /* max limit of number of techvar (in each level of struture ) */
  67. #define MAX_LTECHVAR 64
  68. /* max length of data files: records, activities, definitions. */
  69. #define MAX_FILELEN (2048*1024-1)
  70. /* max number of filewrite calls in one request */
  71. #define MAX_FWRITE 64
  72. /* max total size of filewrite in one request */
  73. #define MAX_FWRITE_SIZE (128*1024)
  74. /* max languages on a site, hard limit */
  75. #define MAX_LANGUAGES 32
  76. /* max subclasses in a structure (must be less than 99)*/
  77. #define MAX_SUBCLASSES 32
  78. /* max number of lines in a work file */
  79. /* Limit for datafield cache */
  80. #define LINE_LIMIT 16384
  81. /* size of cached datafields */
  82. #define DATAFIELD_LIMIT 16384
  83. /* max required points */
  84. #define MAX_REQUIRE 200
  85. /* lengthmax of the seed as a char */
  86. #define SEEDSIZE 12
  87. /* maximum of the number of seed/score used in getseed*/
  88. #define MAX_SCORESEED 70
  89. /* maximum of the number of exercises presented with the same seed
  90.   if it is changed, search for MAX_SEEDSCORE in public_html
  91.   and change the value (in non adm modules)
  92. */
  93. #define MAX_SEEDSCORE 6
  94. /* maximum of complementary regvars*/
  95. #define MAX_REGVARS 10
  96. /* temporary log file */
  97. #define TEMP_LOG_FILE "../log/temp.log"
  98. /* Tag string for randfile */
  99. #define tag_string "\n:"
  100.  
  101. /* Define current version of the server here */
  102. #define wims_version PACKAGE_VERSION
  103. #ifdef VERSION_DATE
  104.   #define wims_version_date VERSION_DATE
  105. #else
  106.   #define wims_version_date ""
  107. #endif
  108.  
  109. #define SHORTSWNAME "WIMS"
  110. #define LONGSWNAME "WWW Interactive Multipurpose Server"
  111. #define SEEDSCORES (2*MAX_SCORESEED*SEEDSIZE)
  112. typedef struct scoreresult {
  113.   unsigned short int sh, exo, pad, seedlastcnt, active;
  114.   float require, weight, score, mean, last, try, best, level, new, seedscorelast;
  115.   char seedlast[SEEDSIZE];
  116.   char seedscores[SEEDSCORES];
  117.  
  118. } scoreresult;
  119.  
  120. #endif
  121.