<?php
/* vim: set expandtab tabstop=4 shiftwidth=4 foldmethod=marker: */

# Show valorations in a subject in a grade.
# @author Igor Támara
# Public domain. 2003. No warranties. http://structio.sourceforge.net/sigue

require "auth/confcol.php";

session_start();
if (!isset($_SESSION["autenticado"])||$_SESSION["autenticado"]==false) {
  require "header.php";
  require "footer.php";
  exit;
}

require "TableSelSurvey.php";
require "GroupValActual.php";
require "GroupVal.php";
$mine=explode(":",$_POST["curso"]);
if(isset($_POST["curso"])) {
  $_SESSION["curso"]=$_POST["curso"];
}

if (strcmp("valorar",$_SESSION["accion"])==0) {
  $values = new GroupValActual($GLOBALS["DIRCOL"],$mine[4],$mine[5],
	$_SESSION['año'],$_SESSION['periodo'],$mine[1]);
}
else {
  $values = new GroupVal($GLOBALS["DIRCOL"],$mine[4],$mine[5]
	,$_SESSION['año'],$_POST['periodorec'],$mine[1],$_SESSION['periodo']);
}
$title=$_SESSION["accion"]." ".$mine[6]." en ".$mine[2]." por ".$_SESSION["teacher"]." en ".$_SESSION['periodo'];
require "header.php";
$_SESSION["pastval"]=$values->selected;
/* We initialize and display the survey */	  
$values1 = new TableSelSurvey("", $values->questions,
		$values->students, $values->values,
		$values->selected, "actualizar.php");
$values1->display (); 

require "footer.php";
?>
