<?xml encoding="ISO-8859-1"?>

<!--
   DTD for management of STAF's students works

   Copyright: synteta8@tecfa.unige.ch
   Version  : 1.3
   Date     : 15/06/99
   Updated : 18/06/99

   Goals:
   - allow students upload their work for STAF in a more concrete way,
   - allow student-teacher interaction for evaluation and remarks,
   - keep track of the upload date,
   - allow queries like: 
   "all the works submitted for staf14",
   "give the students and the auditors",
   "give the works submitted ontime" etc...
   - be more or less human readable

Fixed in DTD /DKS

 - deadline entity just defines attributes (fixed the names of these),
   else you have to define an element for the deadline.
 - login-name and password elements were useless
 - personal-data should be empty
 - staf course must be an attribute (same error in other places)
   e.g. optional elements have a ?, the others are mandatory
        ELEMENT tags can't have #REQUIRED etc....
 - content required a child elements, fixed it to accept pcdata


                           -->

<!-- ****************************** ENTITY Declarations ******************* 
   ... these are used as macros to make the code more tight
  -->

<!ENTITY % deadline "
  deadline-day CDATA #REQUIRED
  deadline-month CDATA #REQUIRED
  deadline-year CDATA #REQUIRED
"
>

<!ENTITY % stamp "
  creation-day NMTOKEN #IMPLIED
  creation-month NMTOKEN #IMPLIED
  creation-year NMTOKEN #IMPLIED
  mod-day NMTOKEN #IMPLIED
  mod-month NMTOKEN #IMPLIED
  mod-year NMTOKEN #IMPLIED
  mod-by NMTOKEN #IMPLIED
  version NMTOKEN #IMPLIED
  status (draft|final|revised) #IMPLIED
"
>

<!-- ****************************** Students ************************** -->
<!-- ****************************************************************** -->
<!ELEMENT person ( ldap-id, personal-data, MOO, exercises )?>


<!-- ****************** LDAP uid for the search engine **************** -->
<!ELEMENT ldap-id EMPTY>
<!ATTLIST ldap-id id    CDATA #REQUIRED>


<!-- *************************** Personal-data *********************** -->
<!ELEMENT personal-data EMPTY>
<!ATTLIST personal-data
  first-name          	CDATA #REQUIRED
  family-name          	CDATA #REQUIRED
  middle-initial 	CDATA #IMPLIED
  role			(student|auditor|professor) #REQUIRED
  promotion		(Alice|Beatrice|Celine|Daisy|Eva) #REQUIRED
  year			CDATA #REQUIRED
  home-URL              CDATA #IMPLIED
  email          	CDATA #REQUIRED
>
<!ELEMENT MOO EMPTY>
<!ATTLIST MOO
  personnage            CDATA #IMPLIED  
  salle			CDATA #IMPLIED
>


<!-- *************************** Exercise(s) ************************** -->
<!-- ****************************************************************** -->
<!ELEMENT exercises ((exercise)+)>
<!ELEMENT exercise (staf, title, URL, description, (report)?, (link)?, (participants)*, (problems)?, (teacher-comments)?, (student-comments)? )>
<!ATTLIST exercise 
  id		       ID #REQUIRED
%stamp; %deadline; >

<!ELEMENT staf EMPTY>
<!ATTLIST staf 
  course                (11|12|13|14|15|16|17|18) #REQUIRED 
  ex-number		CDATA #REQUIRED
  professor		CDATA #IMPLIED
  type			(course|project) #IMPLIED
  has-password		(yes|no) #IMPLIED		 
>

<!ELEMENT title (#PCDATA)>
<!ELEMENT URL   (#PCDATA)>
<!ELEMENT description (#PCDATA)>
<!ELEMENT report EMPTY>
<!ATTLIST report report-URL CDATA #REQUIRED> 

<!ELEMENT link EMPTY>
<!ATTLIST link 
  title	        CDATA #REQUIRED
  main-exercise IDREF #IMPLIED 
  secondary     IDREFS #IMPLIED
>
<!ELEMENT participants (personal-data)* >


<!-- **************************** Problem(s) ************************** -->
<!ELEMENT problems ((problem)*)>

<!ELEMENT problem (title, content, (solution)?, (teacher-help)?)>
<!ATTLIST problem
          problem-status (open|solved) #REQUIRED
>

<!ELEMENT teacher-help (#PCDATA)>


<!-- ***************** Teacher comments ******************** -->
<!ELEMENT teacher-comments ((teacher-comment)+, (evaluation))>

<!ELEMENT teacher-comment (title, content)>

<!ELEMENT evaluation (title, content, mark)?>

<!-- ******************Student's comments ******************** -->
<!ELEMENT student-comments ((comment)*)>

<!ELEMENT comment (title, content)>


<!-- ****************************** Common Items ******************** -->
<!ELEMENT title (#PCDATA)>

<!ELEMENT content (#PCDATA | item | para | list)*>
<!ELEMENT solution (#PCDATA | item | para | list)*>

<!ELEMENT list (item)+>
<!ATTLIST list type (ul|ol) #REQUIRED>

<!ELEMENT item (#PCDATA)>

<!ELEMENT para (#PCDATA)>

<!ELEMENT mark (#PCDATA)>














