Subversion Repositories wimsdev

Rev

Rev 16704 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 16704 Rev 18421
Line 46... Line 46...
46
{
46
{
47
 int i, j, k, nb;
47
 int i, j, k, nb;
48
 char *s;
48
 char *s;
49
 exodata *ed;
49
 exodata *ed;
50
 my_debug("Classe: %s\n", cd->name);
50
 my_debug("Classe: %s\n", cd->name);
-
 
51
 my_debug("Superclasse: %s\n", cd->sclass);
51
 my_debug("Feuilles: %i, Exercices: %i\n", cd->sheetcnt, cd->exocnt);
52
 my_debug("Feuilles: %i, Exercices: %i\n", cd->sheetcnt, cd->exocnt);
52
 for (i=0;i<cd->sheetcnt;i++)
53
 for (i=0;i<cd->sheetcnt;i++)
53
 {
54
 {
54
   my_debug("Feuille %i: %i exercices\n",i+1,cd->sheets[i].exocnt);
55
   my_debug("Feuille %i: %i exercices\n",i+1,cd->sheets[i].exocnt);
55
   nb=cd->sheets[i].techcnt;
56
   nb=cd->sheets[i].techcnt;
Line 93... Line 94...
93
{
94
{
94
  int i,j=0,k,l,m,n, oldest, offset;
95
  int i,j=0,k,l,m,n, oldest, offset;
95
  struct stat st;
96
  struct stat st;
96
  struct classdata *cd;
97
  struct classdata *cd;
97
  char buf[MAX_LINELEN+1], buf2[MAX_LINELEN+1];
98
  char buf[MAX_LINELEN+1], buf2[MAX_LINELEN+1];
-
 
99
  char spc[MAX_FNAME+1];
98
  char *p1, *p2, *p3, *q1, *q2;
100
  char *p1, *p2, *p3, *q1, *q2;
99
  time_t tt;
101
  time_t tt;
100
  tt=0, oldest=0;
102
  tt=0, oldest=0;
101
  for(i=0;i<classcaches;i++) {
103
  for(i=0;i<classcaches;i++) {
102
    cd=classcache[i].ptr;
104
    cd=classcache[i].ptr;
Line 117... Line 119...
117
  cd=classdata+i; cd->access=1;
119
  cd=classdata+i; cd->access=1;
118
  classcache[classcaches++].ptr=cd;
120
  classcache[classcaches++].ptr=cd;
119
  snprintf(cd->name,sizeof(cd->name),"%s",cl);
121
  snprintf(cd->name,sizeof(cd->name),"%s",cl);
120
  cd->techs[0]=0; offset=1;
122
  cd->techs[0]=0; offset=1;
121
  cd->start=time(NULL); cd->exocnt=0;
123
  cd->start=time(NULL); cd->exocnt=0;
-
 
124
  /* get superclass */
-
 
125
  // getdef is defined in wimslogdscore.c
-
 
126
  getdef (".def","class_superclass",spc);
-
 
127
  strcpy(cd->sclass,spc);
122
  /* Now get the exo data */
128
  /* Now get the exo data */
123
  wlogdaccessfile(buf,"r","sheets/.require");
129
  wlogdaccessfile(buf,"r","sheets/.require");
124
  p1=strchr (buf,':');
130
  p1=strchr (buf,':');
125
  if (p1==NULL) {
131
  if (p1==NULL) {
126
    /*old format*/
132
    /*old format*/