[virtualcommons-svn] SF.net SVN: virtualcommons:[40] vcweb/trunk/virtualcommons/experiment
Status: Beta
Brought to you by:
alllee
From: <al...@us...> - 2008-08-14 00:12:29
|
Revision: 40 http://virtualcommons.svn.sourceforge.net/virtualcommons/?rev=40&view=rev Author: alllee Date: 2008-08-14 00:12:32 +0000 (Thu, 14 Aug 2008) Log Message: ----------- Seema fixed some bugs in generate_results_table and harvest decision validation. Refined wait loops for students and next stage/next round logic. Modified Paths: -------------- vcweb/trunk/virtualcommons/experiment/experiment.inc vcweb/trunk/virtualcommons/experiment/experiment.module vcweb/trunk/virtualcommons/experiment/games/forestry_v2/forestry_v2.module vcweb/trunk/virtualcommons/experiment/rules/rules.module vcweb/trunk/virtualcommons/experiment/survey/survey.info vcweb/trunk/virtualcommons/experiment/survey/survey.module vcweb/trunk/virtualcommons/experiment/teacher_dashboard/teacher_dashboard.module Modified: vcweb/trunk/virtualcommons/experiment/experiment.inc =================================================================== --- vcweb/trunk/virtualcommons/experiment/experiment.inc 2008-08-13 09:32:34 UTC (rev 39) +++ vcweb/trunk/virtualcommons/experiment/experiment.inc 2008-08-14 00:12:32 UTC (rev 40) @@ -1,4 +1,7 @@ <?php +// FIXME: default decision should be a field in vc_game and configured +// by the facilitator +define('DEFAULT_HARVEST_DECISION', 0); class Session { public static function put($ses_var, $object) { @@ -233,9 +236,13 @@ } + public function isLastRound() + { + return ($this->getCurrentRoundNo() == $this->getNumberOfRounds()); + } + public function isStageOver() { - //drupal_set_message(t('Current round no is: ' .$this->getCurrentRoundNo() . ' and no of rounds are: ' .$this->getNumberOfRounds())); return ($this->getCurrentRoundNo() > $this->getNumberOfRounds()); } @@ -295,6 +302,28 @@ } + private function generate_default_decisions($group_id, $round_no, $stage_id) { + $result = db_query('SELECT id FROM vc_student WHERE vc_group_id=%d', $group_id); + + while ($fetch_object = db_fetch_object($result)) { + $student_id = $fetch_object->id; + $harvest_decision = db_result(db_query("SELECT harvest_decision + FROM vc_forestry_student + WHERE vc_student_id='%s' AND round_no=%d AND vc_stage_id=%d", + $student_id, $round_no, $stage_id)); + if (! $harvest_decision) { + $this->insert_default_decision($student_id, $round_no); + } + } + } + + private function insert_default_decision($student_id, $round_no) { + // FIXME: how will this work for IrrigationStudent or FisheryStudent + $student = new ForestryStudent($student_id); + $student->save($round_no, DEFAULT_HARVEST_DECISION); + } + + public function nextRound() { $round_no=$this->getCurrentRoundNo(); @@ -310,6 +339,7 @@ // FIXME: preprocess the groups and insert default decisions for // all students that haven't made a harvest decision. $group_id=$data->group_id; + $this->generate_default_decisions($group_id, $round_no, $stage_id); $resources_before=$crp=$data->crp; $max_resources=$data->max_r; @@ -355,7 +385,9 @@ } //update start flag - $this->updateStartFlag(true); + if (! $this->isLastRound()) { + $this->updateStartFlag(true); + } $this->prev_round_no=$round_no; //update current round_no @@ -598,7 +630,7 @@ return $this->student; } - public function getGroupId() { + public function getId() { return $this->group_id; } @@ -678,23 +710,14 @@ public function isTieHappened() { $selected_rule_id=db_result(db_query("select vc_selected_rules_id from vc_group where id=%d",$this->group_id)); - if($selected_rule_id ==NULL) - { - return true; - } - else - { - return false; - - } - + return ($selected_rule_id == NULL); } public function getSelectedRule() { $result_rule=db_query("select rule_no, description from vc_rules r, vc_group g where r.id =g.vc_selected_rules_id and g.id=%d",$this->group_id); //$rule=array(); - while($data_rule=db_fetch_object($result_rule)) + if ($data_rule=db_fetch_object($result_rule)) { $rule[]=array($data_rule->rule_no); $rule[]=array($data_rule->description); @@ -781,6 +804,7 @@ return $flag; } + }//end of Group /** @@ -792,11 +816,15 @@ private $turn_no; private $group; - public function __construct($student_id, $group) { + public function __construct($student_id, $group=NULL) { $this->stud_id = $student_id; $this->group = $group; } + public function getId() { + return $this->stud_id; + } + public function getLatestResource($group_id,$game_id) { return db_result(db_query("Select common_resource_pool from vc_forestry_common_resource_pool where vc_group_id=%d and vc_game_id=%d",$group_id,$game_id)); @@ -831,11 +859,19 @@ return $all_data; } + public function getCurrentStageData() { + return $this->getStageData($this->getGroup()->getGame()->getCurrentStageId()); + } + public function getStageData($stage_id) { $student_decision = db_query("select round_no,harvest_decision,fine,total_points from vc_forestry_student where vc_student_id='%s' and vc_stage_id=%d order by round_no",$this->stud_id,$stage_id); $decision_table = array(); $voting_enabled=db_result(db_query("select voting from vc_stage where id=%d",$stage_id)); + $round_header = array('Round Number', 'Your Harvest Decision', 'Resources Before', 'Resources After'); + if ($voting_enabled) { + array_push($round_header, 'Penalty', 'Total Points'); + } while($student_data=db_fetch_object($student_decision)) { $round_no=$student_data->round_no; @@ -843,21 +879,26 @@ $fine=$student_data->fine; $total_points=$student_data->total_points; //get the resource info from vc_forestry_group_round_information - $fetch_object = db_fetch_object(db_query("select resources_before,resources_after from vc_forestry_group_round_info where vc_group_id=%d and vc_game_id=%d and round_no=%d and vc_stage_id=%d", - $this->group->getGroupId(),$this->group->getGame()->getGameId(),$round_no,$stage_id)); + $fetch_object = db_fetch_object(db_query("SELECT resources_before,resources_after + FROM vc_forestry_group_round_info + WHERE vc_group_id=%d and vc_game_id=%d and round_no=%d and vc_stage_id=%d", + $this->group->getId(),$this->group->getGame()->getGameId(),$round_no,$stage_id)); if ($fetch_object) { $resources_before=$fetch_object->resources_before; $resources_after=$fetch_object->resources_after; } - $round_header = array('Round Number', 'Harvest Decision', 'Resources Before', 'Resources After'); - $round_data = array($round_no,$harvest_decision,$resources_before,$resources_after); + else { + $resources_before=$resources_after; + $resources_after="?"; + } + + $current_round_data = array($round_no,$harvest_decision,$resources_before,$resources_after); if($voting_enabled) { - array_push($round_data, $fine, $total_points); - array_push($round_header, 'Penalty', 'Total Points'); + array_push($current_round_data, $fine, $total_points); } - $decision_table[] = new TableData($round_header, $round_data); + $round_data[] = $current_round_data; } - return $decision_table; + return new TableData($round_header, $round_data); } /* @@ -923,6 +964,13 @@ return db_result(db_query("select start_flag from vc_student where id ='%s' ",$this->stud_id)); } + public function shouldVote() + { + return $this->getGroup()->getGame()->isVotingEnabled() + && $this->getGroup()->isTieHappened(); + } + + /* XXX: unsafe operation, should only be set by the facilitator (teacher) public function updateStageId($stage_no,$experiment_id,$game_id) { Modified: vcweb/trunk/virtualcommons/experiment/experiment.module =================================================================== --- vcweb/trunk/virtualcommons/experiment/experiment.module 2008-08-13 09:32:34 UTC (rev 39) +++ vcweb/trunk/virtualcommons/experiment/experiment.module 2008-08-14 00:12:32 UTC (rev 40) @@ -1,4 +1,5 @@ <?php + // vim:sts=2:sw=2:filetype=php // $Id$ Modified: vcweb/trunk/virtualcommons/experiment/games/forestry_v2/forestry_v2.module =================================================================== --- vcweb/trunk/virtualcommons/experiment/games/forestry_v2/forestry_v2.module 2008-08-13 09:32:34 UTC (rev 39) +++ vcweb/trunk/virtualcommons/experiment/games/forestry_v2/forestry_v2.module 2008-08-14 00:12:32 UTC (rev 40) @@ -93,8 +93,7 @@ return '<fieldset><legend><b>Maximum Harvest Table</b></legend>'.theme_table($harvest_table->header, $harvest_table->rows).'</fieldset>'; } - -function generate_results_table() { +function generate_all_results_table() { $student = Session::get('student'); $table_data_array = $student->getAllStageData(); $result = '<fieldset><legend><b>Round Results</b></legend>'; @@ -108,8 +107,25 @@ } $result .= '</fieldset>'; return $result; + } +function generate_results_table() { + $student = Session::get('student'); + $table_data = $student->getCurrentStageData(Round); + $result = '<fieldset><legend><b>Current Stage Results</b></legend>'; + if ($student->getGroup()->getGame()->getCurrentRoundNo() == 1) { + $result .= 'No results available yet for the first round'; + } + else { + $result .= theme_table($table_data->header, $table_data->rows); + } + $result .= '</fieldset>'; + return $result; +} + + + // primary forestry controller function forestry_play() { // Return the HTML generated from the $form data structure. @@ -121,9 +137,14 @@ $group = $student->getGroup(); if ($group->getGame()->isFinished()) { $output = 'The experiment is now over. Your results are listed below. Thanks for participating!'; - $output .= generate_results_table(); + $output .= generate_all_results_table(); } - else { + else if ($student->shouldVote()) + { + return drupal_get_form('voting_rules_form'); + } + else + { $output .= generate_harvest_table(); $output .= generate_results_table(); $output .= ( $student->canStart() ) ? drupal_get_form('forestry_play_multiform') : drupal_get_form('forestry_wait_form'); @@ -139,6 +160,8 @@ $student = Session::get('student'); $group = $student->getGroup(); + $resource_available=$group->getResourcesAvailable(); + $_SESSION['prev_resource']=$resource_available; $resource_after=0; $resource_before=0; @@ -155,10 +178,10 @@ '#title'=>t('<b>Round @number</b>',array('@number'=>$round_no)) ); -$form['indicator']['resources_available']=array( + $form['indicator']['resources_available']=array( '#type'=>'item', '#title'=>t('Resources Available'), - '#value'=>$group->getResourcesAvailable() + '#value'=>$resource_available ); @@ -181,7 +204,7 @@ -function forestry_play_multiform_validatewrong($form_id,$form_values) +function forestry_play_multiform_validate($form_id,$form_values) { $harvest_decision=$form_values['indicator']['harvest_decision']; $resource=(int) $_SESSION['prev_resource']; @@ -288,7 +311,7 @@ $resources_before=(int) $_SESSION['prev_resource']; drupal_set_message(t('resource_before:'. $resources_before)); $student->setStageId($stage_id); - */ + */ $student->save($round_no,$stud_harvest_decision); @@ -296,20 +319,20 @@ return 'forestry/play'; /* - $no_rounds=$group->getNumberOfRounds(); - if($form_values['indicator']['submit']=="Next Stage") - { - //$stage_no=2; - // $exp_id=$group->getExperimentId(); - //$game_id=$group->getGameId(); - drupal_set_message("in next stage button functionality"); - unset($_SESSION['prev_resource']); + $no_rounds=$group->getNumberOfRounds(); + if($form_values['indicator']['submit']=="Next Stage") + { + //$stage_no=2; + // $exp_id=$group->getExperimentId(); + //$game_id=$group->getGameId(); + drupal_set_message("in next stage button functionality"); + unset($_SESSION['prev_resource']); - return 'rules'; + return 'rules'; } else - return 'forestry_stage1_part2'; - */ + return 'forestry_stage1_part2'; + */ } function theme_forestry_play_multiform($form) @@ -362,7 +385,7 @@ { $student = Session::get('student'); $group = $student->getGroup(); - $group_id=$group->getGroupId(); + $group_id=$group->getId(); $game_id=$group->getGameId(); // FIXME: hack only in place for Drupal 5, can get rid of in Drupal 6 in // favor of the $repeat parameter in drupal_set_message @@ -372,18 +395,18 @@ making their decisions and the facilitator instructs you to click on the next button. Clicking on the next button before the facilitator is ready will have no effect.'), - 'warning', FALSE); + 'warning', FALSE); if ($group->isGameFinished()) { drupal_set_message(t('The game is over. Thanks for participating.'), - 'warning', FALSE); + 'warning', FALSE); } - else if($group->getGame()->isStageOver()) + else if($group->getGame()->isLastRound() || $group->getGame()->isStageOver()) { - drupal_set_message(t('This stage is now over.'), 'warning', FALSE); + drupal_set_message(t('This stage is now over. The next stage should begin shortly.'), 'warning', FALSE); $form['submit'] = array( '#type' => 'submit', - '#value' => t('Go to the next stage') + '#value' => t('Next Stage') ); } else Modified: vcweb/trunk/virtualcommons/experiment/rules/rules.module =================================================================== --- vcweb/trunk/virtualcommons/experiment/rules/rules.module 2008-08-13 09:32:34 UTC (rev 39) +++ vcweb/trunk/virtualcommons/experiment/rules/rules.module 2008-08-14 00:12:32 UTC (rev 40) @@ -1,131 +1,131 @@ <?php +// vim:filetype=php function rules_load() { - static $loaded = FALSE; - - if (!$loaded) { - $path = drupal_get_path('module', 'forestry_stage1'); - drupal_add_css($path .'/form.css'); - $loaded = TRUE; - } + static $loaded = FALSE; + + if (!$loaded) { + $path = drupal_get_path('module', 'forestry_stage1'); + drupal_add_css($path .'/form.css'); + $loaded = TRUE; + } } function rules_menu($may_cache) { $items = array(); if ($may_cache) { - -$items[]=array( 'path' => 'rules', - 'title' => t('Stage 2 - Rules'), - 'callback' => 'stage2_rules', - 'type'=>MENU_CALLBACK, + + $items[]=array( 'path' => 'rules', + 'title' => t('Rules'), + 'callback' => 'voting_rules', + 'type'=>MENU_CALLBACK, 'access' => TRUE//user_access('Only Teachers') ); } -else -{ -rules_load(); -} - + else + { + rules_load(); + } + return $items; } -function stage2_rules() { +function voting_rules() { // Return the HTML generated from the $form data structure. - $output = drupal_get_form('stage2_rulesform'); + $output = drupal_get_form('voting_rules_form'); return $output; } -function stage2_rulesform() +function voting_rules_form() { -$form['#id']='stage2_rules'; -$form['#tree'] = TRUE; -$stud_id=$_SESSION['student_id']; + $form['#id']='voting_rules'; + $form['#tree'] = TRUE; + $student = Session::get('student'); + $group = $student->getGroup(); -$group=Session::get('group'); + $rules=new Rules(); + $rules_data=$rules->getRules($group->getCurrentStageId()); -$rules=new Rules(); -$rules_data=$rules->getRules($group->getCurrentStageId()); + foreach($rules_data as $key=>$value) + { + drupal_set_message(t('$key is : ' . $key)); + $header[]='Rule '.$key; + $rule_no=$key; + foreach($value as $key=>$value1) + { + $final_row[0][$rule_no]=$value1; -foreach($rules_data as $key=>$value) -{ - drupal_set_message(t('$key is : ' . $key)); - $header[]='Rule '.$key; - $rule_no=$key; - foreach($value as $key=>$value1) - { - $final_row[0][$rule_no]=$value1; - - } + } -} + } -$form['resource']=array( - '#type'=>'fieldset', - '#title'=>t('<b>Rules</b>'), + $form['resource']=array( + '#type'=>'fieldset', + '#title'=>t('<b>Rules</b>'), - ); -$form['resource']['table']=array( - '#type'=>'markup', - '#value'=>theme('table',$header,$final_row) - ); + ); + $form['resource']['table']=array( + '#type'=>'markup', + '#value'=>theme('table',$header,$final_row) + ); -$form['indicator']=array( - '#type'=>'fieldset', - '#title'=>t('<b>Voting</b>'), - '#prefix'=>'<div class="indicator">' - ); + $form['indicator']=array( + '#type'=>'fieldset', + '#title'=>t('<b>Voting</b>'), + '#prefix'=>'<div class="indicator">' + ); -$form['indicator']['vote']=array( - '#type'=>'textfield', - '#title'=>t('Your Vote'), - '#default_value'=>'0', - '#size'=>1, - '#maxlength'=>1, - '#required'=>TRUE - ); + $form['indicator']['vote']=array( + '#type'=>'textfield', + '#title'=>t('Your Vote'), + '#default_value'=>'0', + '#size'=>1, + '#maxlength'=>1, + '#required'=>TRUE + ); - $form['indicator']['submit'] = array( - '#type' => 'submit', - '#value' => t('Vote!!!'), - '#suffix'=>'</div>' - ); + $form['indicator']['submit'] = array( + '#type' => 'submit', + '#value' => t('Vote'), + '#suffix'=>'</div>' + ); -return $form; + return $form; } -function stage2_rulesform_validate($form_id,$form_values) +function voting_rules_form_validate($form_id,$form_values) { - $vote=$form_values['indicator']['vote']; - if(preg_match('/[^1-3]+/',$vote)) - { - form_set_error('vote',t('Vote can not be alphabet or special character. It must be either 1, 2 or 3.')); - } - return; + $vote=$form_values['indicator']['vote']; + if(preg_match('/[^1-3]+/',$vote)) + { + form_set_error('vote',t('You must vote for Rule 1, 2 or 3.')); + } + return; } -function stage2_rulesform_submit($form,$form_values) +function voting_rules_form_submit($form,$form_values) { - $stud_id=$_SESSION['student_id']; - $rule_no=(int) $form_values['indicator']['vote']; - $group=Session::get('group'); - $rules=new Rules(); - $rules->saveStudentVoting($stud_id,$rule_no,$group->getCurrentStageId()); - - //$exp_name=db_result(db_query("select exp_name from virtualcommons_experiments where id in(select virtualcommons_experiments_id from virtualcommons_conducts where id in (select virtualcommons_conducts_id from virtualcommons_student where id='%s'))",$_SESSION['student_id'])); - //$virtual_conduct_id=db_result(db_query("select virtualcommons_conducts_id from virtualcommons_student where id='%s' ",$stud_id)); - //db_query("update virtualcommons_conducts set virtualcommons_rule_no=%d where id=%d",$rule_no,$virtual_conduct_id); - - return 'survey'; - - + $rule_no=(int) $form_values['indicator']['vote']; + $student = Session::get('student'); + $group=$student->getGroup(); + $rules=new Rules(); + $rules->saveStudentVoting($student->getId(),$rule_no,$group->getCurrentStageId()); + //$exp_name=db_result(db_query("select exp_name from virtualcommons_experiments where id in(select virtualcommons_experiments_id from virtualcommons_conducts where id in (select virtualcommons_conducts_id from virtualcommons_student where id='%s'))",$_SESSION['student_id'])); + //$virtual_conduct_id=db_result(db_query("select virtualcommons_conducts_id from virtualcommons_student where id='%s' ",$stud_id)); + //db_query("update virtualcommons_conducts set virtualcommons_rule_no=%d where id=%d",$rule_no,$virtual_conduct_id); + + return 'survey'; + + + } Modified: vcweb/trunk/virtualcommons/experiment/survey/survey.info =================================================================== --- vcweb/trunk/virtualcommons/experiment/survey/survey.info 2008-08-13 09:32:34 UTC (rev 39) +++ vcweb/trunk/virtualcommons/experiment/survey/survey.info 2008-08-14 00:12:32 UTC (rev 40) @@ -1,4 +1,4 @@ -; $Id: rules.info 17 2008-07-30 22:56:29Z alllee $ +; $Id: survey.info 17 2008-07-30 22:56:29Z alllee $ name = Survey For The Games description = Allows student to fill the survey after voting for the rules. package=Virtual Commons Modified: vcweb/trunk/virtualcommons/experiment/survey/survey.module =================================================================== --- vcweb/trunk/virtualcommons/experiment/survey/survey.module 2008-08-13 09:32:34 UTC (rev 39) +++ vcweb/trunk/virtualcommons/experiment/survey/survey.module 2008-08-14 00:12:32 UTC (rev 40) @@ -1,5 +1,5 @@ <?php -//vim:sts=2:sw=2:filetype=php +// vim:sts=2:sw=2:filetype=php function rule_decision_load() { @@ -22,6 +22,12 @@ 'type'=>MENU_CALLBACK, 'access' => TRUE//user_access('Only Teachers') ); + $items[]=array( 'path' => 'voting/wait', + // 'title' => t('Rule Decision'), + 'callback' => 'voting_wait', + 'type'=>MENU_CALLBACK, + 'access' => TRUE//user_access('Only Teachers') + ); $items[]=array( 'path' => 'rule_decision', // 'title' => t('Rule Decision'), 'callback' => 'voting_rule_decision', @@ -52,14 +58,12 @@ { $form['#id']='survey_form'; $form['#tree'] = TRUE; - $stud_id=$_SESSION['student_id']; + $student = Session::get('student'); + $group = $student->getGroup(); - //$group=Session::get('group'); - - //$exp_id=$group->getExperimentId(); + $exp_id=$group->getExperimentId(); $survey=new Survey(); - $exp_id=2; $survey_data=$survey->getSurveyQuestions($exp_id); $_SESSION['survey_data']=$survey_data; $header[]='Survey Questions'; @@ -72,31 +76,26 @@ foreach($Q_array as $Q=>$ans) { - $form['resource'][$rule][$Q]['option']=array( '#type'=>'radios', '#title'=>t('<b>Q'. ++$Q_cnt . '. '. $Q.'</b>'), '#options'=>$ans, '#required'=>TRUE - ); } } - $form['submit'] = array( '#type' => 'submit', - '#value' => t('Submit!!!'), - + '#value' => t('Submit'), ); - return $form; } function survey_form_submit($form,$form_values) { - $stud_id=$_SESSION['student_id']; - $group=Session::get('group'); + $student = Session::get('student'); + $group=$student->getGroup(); $survey=new Survey(); // $rules->saveStudentSurvey($stud_id,$ans); @@ -108,30 +107,22 @@ foreach($Q_array as $Q=>$ans) { // drupal_set_message(t('Question is: '. $Q . 'answers are:'. $ans[$form_values['resource'][$rule][$Q]['option']])); - $survey->saveSurveyResponse($stage_id,$stud_id,$rule,$Q,$ans[$form_values['resource'][$rule][$Q]['option']]); + $survey->saveSurveyResponse($stage_id,$student->getId(),$rule,$Q,$ans[$form_values['resource'][$rule][$Q]['option']]); $i++; } } - - /*if($exp_name=='Forestry Game') - { - return 'forestry'; - } - - else if($exp_name=='Fishery Game') - { - return 'fishery'; - } - - else if($exp_name=='Water Irrigation Game') - { - return 'water'; - - }*/ - return 'rule_decision'; - +// FIXME: should be smarter about detecting whether or not teachers voted and +// send student into a wait loop until the teacher has processed votes. +// Otherwise a bug occurs if the student finishes voting and the survey before +// the teacher has processed votes +// if ($group->all_students_voted()) { + return 'rule_decision'; + // } + // else { + // return 'voting/wait'; + //} } @@ -148,8 +139,8 @@ function rule_decision_form() { - $stud_id=$_SESSION['student_id']; - $group=Session::get('group'); + $student=Session::get('student'); + $group=$student->getGroup(); $tie_flag=$group->isTieHappened(); //t('There is a tie between votings. You need to vote again for the following rules') if($tie_flag) @@ -211,22 +202,17 @@ $form['submit'] = array( '#type' => 'submit', '#value' => t('Next') - ); - } - } - return $form; - } function rule_decision_form_validate($form_id,$form_values) { $vote=$form_values['vote']; - if($form_vlaues['submit']=="Vote") + if($form_values['submit']=="Vote") { if(preg_match('/[^1-3]+/',$vote)) @@ -247,17 +233,12 @@ } else if($form_values['submit']=="Vote") { - $stud_id=$_SESSION['student_id']; + $student=Session::get('student'); + $group=$student->getGroup(); $rule_no=(int) $form_values['vote']; - drupal_set_message(t('student id: '. $stud_id . 'rule no is: ' . $rule_no)); - $group=Session::get('group'); $rules=new Rules(); - $rules->saveStudentVoting($stud_id,$rule_no,$group->getCurrentStageId()); + $rules->saveStudentVoting($student->getId(),$rule_no,$group->getCurrentStageId()); } - return 'forestry'; - - - - - + // FIXME: return to the appropriate experiment + return 'forestry/intro'; } Modified: vcweb/trunk/virtualcommons/experiment/teacher_dashboard/teacher_dashboard.module =================================================================== --- vcweb/trunk/virtualcommons/experiment/teacher_dashboard/teacher_dashboard.module 2008-08-13 09:32:34 UTC (rev 39) +++ vcweb/trunk/virtualcommons/experiment/teacher_dashboard/teacher_dashboard.module 2008-08-14 00:12:32 UTC (rev 40) @@ -120,7 +120,8 @@ $form['submit'] = array( '#type' => 'submit', - '#value' => ($stage_flag) ? t('Go to Next Stage') : t('Next Round') + '#value' => ($stage_flag) ? t('Go to Next Stage') : t('Next Round'), + '#attributes' => array('onClick' => 'return confirm("Go to the next round? Any participants with unsubmitted harvest decisions will receive a default harvest decision.")') ); } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |