<!-- begin of Nikaia/supervisor.phtml -->
!! supervisor page definition.
!nocache
!if $module!=home
  !exit
!endif
!set home_theme=yes

!readproc tabletheme

!read classlogo.phtml
!if $class_logo!=
  <div id="classlogo" class="float_$class_logoside">
    <img src="$class_logo" alt="class logo">
  </div>
!endif

!read ./adm/title.phtml 2\
$wims_classname, $wims_institutionname\
($SU_log - $(wims_name_$class_typename))

<div class="wims_content">

!if _tool isin $wims_session
 !read ./tools.phtml
 </div><!--/wims_content -->
 </div><!--/wimsbody -->
</div><!--/wimspagebox -->
 !goto end
!endif
!!definition for menumodubox
!distribute items div,div into div0,div1

!if $class_type=3
  $SU_greet.
  !read ./subclasses.phtml
  !read ./Subclasses1.phtml
  !if $class_typename=level
      </div><!--wimscontent -->
     </div><!--wimsbody -->
    </div><!--wimspagebox -->
    !read themes/_procs/menumodubox3.proc
    !read themes/_widgets/menumodubox.phtml
    !goto end
  !else
    !goto nocheck
  !endif
!endif class_type=3

!if $class_type=4
  !if $wims_user=supervisor
    !read ./subclasses.phtml
    !read ./Subclasses1.phtml
  !endif
  </div><!--/wims_content -->
 </div><!--/wimsbody -->
</div><!--/wimspagebox -->
 !read themes/_procs/menumodubox3.proc
 !read themes/_widgets/menumodubox.phtml
 !goto end
!endif class_type=4


<p class="wims_greetings">
  !if $class_type notin 13
    $SU_greet
    $SU_exp1
    !set d_=!char 7,8 of $class_expiration
    !set m_=!char 5,6 of $class_expiration
    !set y_=!char 1 to 4 of $class_expiration
    !read adm/date.phtml date,$y_,$m_,$d_
    !href module=adm/class/config $c_date_out
    $SU_exp2.
  !else
    $SU_greet.
  !endif

  !set wims_ref_class=wims_button_help
  !if $class_type=2
    !set wims_helper=chapter=3&open=3_group#group
  !else
    !if $class_type=4
      !set wims_helper=chapter=3&open=3_institution#institution
    !else
      !set wims_helper=chapter=3&open=3_sheet#sheet
    !endif
  !endif
  !href target=wims_help module=help/main&$wims_helper $wims_name_whelp
</p>

!! ------- list of program of the class
!if $class_type=1 and $class_typename=course
 !read adm/class/graphclsprog $wims_class
!endif
!! -------

!if $wims_numpartconnected>0
  <p class="wims_connected">$SU_numpartconnected.</p>
!else
  <div class="wims_msg info">$SU_nopartconnected.</div>
!endif

!if $quota_free<2
  !if $quota_free<=0
    <div class="wims_msg alert">$wims_name_exceeded</div>
    <p class="wims_center">
      !set wims_ref_class=wims_button
      !href cmd=close&module=home&lang=$lang $wims_name_visitor
    </p>
    </div><!--/wims_content -->
    </div><!--/wimsbody-->
    </div><!--/wimspagebox-->
    !goto end
  !else
    <div class="wims_msg warning">
      <b>$wims_name_warning</b>! $wims_name_reaching_limit
    </div>
  !endif
!endif
:nocheck

!if & isin $newmsgcnt or $newmsgcnt>0
  <p class="wims_msg info">
    !href module=adm/forum/mboard $U_newmsg
  </p>
!endif
!if $class_type=4
     <div class="wimscenter">
       !href module=adm/class/gateway $wims_name_SU_Gateway
     </div>
    </div><!--/wims_content -->
   </div><!--/wimsbody -->
  </div><!--/wimspagebox -->

  !read themes/_procs/menumodubox3.proc
  !read themes/_widgets/menumodubox.phtml
  !goto end
!endif class_type=4

!if $class_type=2
  !if $subclasscnt>0
    $table_header
    <thead>
      $table_hdtr<th scope="col">$wims_name_number</th><th scope="col">$wims_name_title</th><th scope="col">$wims_name_nameteacher</th></tr>
    </thead>
    <tbody>
    !for i=1 to $subclasscnt
      !let f_class=!record $i of wimshome/log/classes/$wims_class/.subclasses
      !let f_aff=!item 4 of $f_class
      !let f_name=!item 1 of $f_class
      $table_tr
        <td>$ADD_class $i</td>
        <td>
          !href module=adm/class/classes&type=authsupervisor&class=$f_name $f_aff
        </td>
        <td>
          !item 9 of $f_class
        </td>
      </tr>
    !next i
    </tbody>
    $table_end
  !endif subclasscnt
    </div><!--/wims_content -->
   </div><!--/wimsbody -->
  </div><!--/wimspagebox -->

  !read themes/_procs/menumodubox2.proc
  !read themes/_widgets/menumodubox.phtml
  !goto end
!endif class_type=2
!! classtype=0 or 1
!let test=!fileexists wimshome/log/manager_msg.phtml.$lang
!if $test=yes
  <div id="wims_class_manager_msg" class="wims_class_manager_msg">
    !read ./wimshome/log/manager_msg.phtml.$lang
  </div>
!endif

!set test=!replace / by , in $wims_class
!if $(test[-1])=0
  !set test_up=!replace internal /0- by in $wims_class-
  !set wims_ref_class=wims_button
  !href module=adm/class/classes&type=authsupervisor&class=$test_up $SU_Bprogram
!endif

!set docpubliccnt=!recordcnt  wimshome/log/classes/$wims_class/doc/.docindex

!set table_htdr_1=$table_hdtr<th scope="col">$wims_name_number</th><th scope="col">$wims_name_title</th>
!set table_htdr_2=<th scope="col">$wims_name_Status</th><th scope="col">$wims_name_action</th></tr>
!set table_exocnt=<th>$wims_name_cnt_exo</th>
!set seq_open=!defof sequence_open in wimshome/log/classes/$wims_class/seq/.def
!if $seq_open=yes
  !set table_htdr_seq=<th scope="col">$wims_name_sequence</th>
!else
  !reset table_htdr_seq
!endif

!set toolcnt=!recordcnt  wimshome/log/classes/$wims_class/tool/.toolindex
!set glossarycnt=!recordcnt wimshome/log/classes/$wims_class/tool/.glossaryindex
!if $sheetcnt+$examcnt+$doccnt+$docpubliccnt+$votecnt+$subclasscnt+$toolcnt+$glossarycnt+$freeworkcnt<=0
  <p class="wims_msg info">$SU_nosheet</p>
!else
  !if $class_type notin 24
    !if $seq_open=yes
      $CR_sequence
    !endif
    <div class="wimscenter">
      !set wims_ref_class=wims_button
      !href module=adm/class/sequence $wims_name_reorder
    </div>
  !endif

  <div id="widget_supervisor_list">
    <ul id="wims_supervisor_summary">
      !if $subclasscnt>0
        <li><a href="#wims_supervisor_subclass">$wims_name_classlist</a></li>
      !endif
      !if $[$sheetcnt+$examcnt]>0
        <li><a href="#wims_supervisor_shlist">$C_A</a></li>
      !endif
      !if $[$docpubliccnt+$doccnt]>0
        <li><a href="#wims_supervisor_doc">$wims_name_Docs</a></li>
      !endif
      !if $votecnt>0
        <li><a href="#wims_supervisor_vote">$wims_name_Votes</a></li>
      !endif
      !if $toolcnt+$glossarycnt>0
        <li><a href="#wims_supervisor_tool" class="wims_tool_item">$wims_name_tools</a></li>
      !endif
      !if $freeworkcnt>0
        <li><a class="wims_freework_item" href="#wims_supervisor_freework">$wims_name_Freeworks</a></li>
      !endif
    </ul>

    !! Jquery tabs
    !read adm/tabscript supervisor_list

    !if $subclasscnt>0
      <div id="wims_supervisor_subclass">
        !distribute item 1,no into wims_incremental,table_spacer
        $table_header
        $table_hdtr<th scope="col">$wims_name_number</th><th scope="col">$wims_name_title</th><th scope="col">$wims_name_nameteacher</th></tr>
        !read themes/_widgets/supervisorsubclass.phtml
        $table_end
      </div>
    !endif

    !set table_class=sortable
    !if $sheetcnt+$examcnt>0
      <div id="wims_supervisor_shlist">
        !set table_id=TABLE_supervisor_shlist
        !set table_htdr_=<thead>$table_htdr_1$table_exocnt$table_htdr_seq$table_htdr_2</thead>
        $table_header
          <caption>$C_A</caption>
          $table_htdr_
          !read themes/_widgets/supervisorsheet.phtml
          !read themes/_widgets/supervisorexam.phtml
        $table_end
        !read tablesort.phtml
      </div>
    !endif

    !if $[$doccnt+$docpubliccnt]>0
      !set table_id=TABLE_supervisor_doc
      !set table_htdr_=<thead>$table_htdr_1$table_htdr_seq$table_htdr_2</thead>
      <div id="wims_supervisor_doc">
        $table_header
          <caption>$wims_name_Docs</caption>
          $table_htdr_
          !read themes/_widgets/supervisordoc.phtml
          !read themes/_widgets/supervisordocp.phtml
        $table_end
        !read tablesort.phtml
      </div>
    !endif

    !if $votecnt>0
      !set table_id=TABLE_supervisor_vote
      !set table_htdr_=<thead>$table_htdr_1$table_htdr_seq$table_htdr_2</thead>
      <div id="wims_supervisor_vote">
        $table_header
          <caption>$wims_name_Votes</caption>
          $table_htdr_
          !read themes/_widgets/supervisorvote.phtml
        $table_end
        !read tablesort.phtml
      </div>
    !endif

    !if $toolcnt+$glossarycnt>0
      !set table_id=TABLE_supervisor_tool
      !set table_htdr_=<thead>$table_htdr_1$table_htdr_seq$table_htdr_2</thead>
      <div id="wims_supervisor_tool">
        !distribute item 1,no into wims_incremental,table_id,table_spacer
        $table_header
          <caption>$wims_name_tools</caption>
          $table_htdr_
          !read themes/_widgets/supervisortool.phtml
        $table_end
        !read tablesort.phtml
      </div>
    !endif
    !if $freeworkcnt>0
      !set table_id=TABLE_supervisor_freework
      !set table_htdr_=<thead>$table_htdr_1$table_htdr_2</thead>
      <div id="wims_supervisor_freework">
        !distribute item 1,no into wims_incremental,table_spacer
        $table_header
          <caption>$wims_name_Freeworks</caption>
          $table_htdr_
          !read themes/_widgets/supervisorfreework.phtml
        $table_end
        !read tablesort.phtml
      </div>
    !endif
  </div>
!endif

!read ./form.phtml
!read ./result.phtml
</div><!--/wims_content -->
</div><!--/wimsbody -->
</div><!--/wimspagebox -->

!read themes/_procs/menumodubox0.proc
!read themes/_widgets/menumodubox.phtml

:end
!reset div0 div1

!distribute items div, span into div0,div1
!read themes/_procs/supervisormenubox.proc
!read themes/_widgets/menubox.phtml
!reset div0,div1

</div><!--wimsbodybox-->

!read themes/_widgets/visitorcredits.phtml
!read themes/_widgets/session_warn.phtml
!read themes/_widgets/footer_foundation.phtml
</body>
</html>
<!-- end of Nikaia/supervisor.phtml -->
