<?php

// +----------------------------------------------------------------------+
// | PHP version 4                                                        |
// +----------------------------------------------------------------------+
// | Copyright (c) 1997-2005 Snapshot Inc.                                |
// +----------------------------------------------------------------------+
// | License                                                              |
// | GNU General Public License                                           |
// +----------------------------------------------------------------------+
// | Authors: Takayuki Tanimoto <takayuki@snapshot.co.jp>                 |
// +----------------------------------------------------------------------+
//
// $Id: QuestionsView_success.class.php,v 1.1 2005/06/20 09:31:24 snapshot Exp $
//
// Description:
// 2005/05/18
//

require_once (OPT_DIR.'u-learning/view/AdminView.class.php');

class QuestionsView extends AdminView {

    function setRendererAttributes(& $controller, & $request, & $user, & $renderer) {
        $exam= $request->getAttribute('exam');
        if ($exam->publish_time) {
            $renderer->setTemplate('Questions_published.php');
        } else {
            $renderer->setTemplate('Questions_success.php');
        }

        $renderer->setAttribute('subject', $request->getAttribute('subject'));
        $renderer->setAttribute('subjects', $request->getAttribute('subjects'));
        $renderer->setAttribute('exam', $exam);
        $renderer->setAttribute('questions', $request->getAttribute('questions'));
        $renderer->setAttribute('nextnum', $request->getAttribute('nextnum'));
        $renderer->setAttribute('expand_num', $request->getAttribute('expand_num'));
        $renderer->setAttribute('update_num', $request->getAttribute('update_num'));
        $renderer->setAttribute('questions_count', $request->getAttribute('questions_count'));
        $renderer->setAttribute('total_point', $request->getAttribute('total_point'));
    }

}
?>