[virtualcommons-svn] SF.net SVN: virtualcommons:[21] vcweb/trunk/virtualcommons
Status: Beta
Brought to you by:
alllee
From: <al...@us...> - 2008-08-02 00:29:34
|
Revision: 21 http://virtualcommons.svn.sourceforge.net/virtualcommons/?rev=21&view=rev Author: alllee Date: 2008-08-02 00:29:43 +0000 (Sat, 02 Aug 2008) Log Message: ----------- renaming Session methods to put/get instead of store/load Modified Paths: -------------- vcweb/trunk/virtualcommons/experiment/experiment.inc vcweb/trunk/virtualcommons/experiment/experiment.module vcweb/trunk/virtualcommons/games/teacher_dashboard/teacher_dashboard.module Modified: vcweb/trunk/virtualcommons/experiment/experiment.inc =================================================================== --- vcweb/trunk/virtualcommons/experiment/experiment.inc 2008-08-02 00:15:56 UTC (rev 20) +++ vcweb/trunk/virtualcommons/experiment/experiment.inc 2008-08-02 00:29:43 UTC (rev 21) @@ -1,12 +1,12 @@ <?php class Session { - public static function store($ses_var, $object) { + public static function put($ses_var, $object) { if( ! isset($_SESSION[$ses_var]) ) { $_SESSION[$ses_var] = serialize($object); } } - public static function load($ses_var) { + public static function get($ses_var) { if( isset($_SESSION[$ses_var]) ) { return unserialize($_SESSION[$ses_var]); } Modified: vcweb/trunk/virtualcommons/experiment/experiment.module =================================================================== --- vcweb/trunk/virtualcommons/experiment/experiment.module 2008-08-02 00:15:56 UTC (rev 20) +++ vcweb/trunk/virtualcommons/experiment/experiment.module 2008-08-02 00:29:43 UTC (rev 21) @@ -152,7 +152,7 @@ $game=new Game($experiment_id, $teacher_id, $no_student); $game->save(); - Session::store('game', $game); + Session::put('game', $game); /* //Fishery if($game_name==1) @@ -193,7 +193,7 @@ { $form['#id']='studentgroup'; - $game=Session::load('game'); + $game=Session::get('game'); $exp_name = $game->getExperimentName(); drupal_set_message(t("experiment name: " . $exp_name)); @@ -366,7 +366,7 @@ $id=$GLOBALS['user']->uid; $table=$_SESSION['student_info']; - $game = Session::load('game'); + $game = Session::get('game'); $game->saveGroupStudent($table); Modified: vcweb/trunk/virtualcommons/games/teacher_dashboard/teacher_dashboard.module =================================================================== --- vcweb/trunk/virtualcommons/games/teacher_dashboard/teacher_dashboard.module 2008-08-02 00:15:56 UTC (rev 20) +++ vcweb/trunk/virtualcommons/games/teacher_dashboard/teacher_dashboard.module 2008-08-02 00:29:43 UTC (rev 21) @@ -37,7 +37,7 @@ //drupal_set_message(t($teacher_id)); // $virtual_conduct_id=db_result(db_query("select max(id) from {virtualcommons_conducts} where users_id=%d group by users_id",$teacher_id)); // $exp_name=db_result(db_query("select exp_name from virtualcommons_experiments where id =(select virtualcommons_experiments_id from virtualcommons_conducts where id=%d)",$virtual_conduct_id)); - $game = Session::load('game'); + $game = Session::get('game'); $exp_name=$game->getExperimentName(); $output=t('<br> <h2>'. $exp_name . '</h2>'); $output .= drupal_get_form('teacher_dashboard_multiform'); @@ -50,7 +50,7 @@ $form['#id']='teacher_dashboard_multiform'; $form['#multistep']=TRUE; - $game = Session::load('game'); + $game = Session::get('game'); // $teacher_id=$GLOBALS['user']->uid; $round_no=0; $stage_flag=FALSE; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |