Skip to content
Permalink
Browse files

Merge branch 'develop' for Release 3.1.0

  • Loading branch information
bgreiner committed Feb 28, 2020
2 parents 3d70bbc + ab04f33 commit 9a80641b6f953719add7a05f6906476a07164f6e
Showing with 1,629 additions and 1,309 deletions.
  1. +2 −2 admin/admin_login.php
  2. +2 −3 admin/experiment_add_participants.php
  3. +2 −3 admin/experiment_drop_participants.php
  4. +3 −2 admin/experiment_edit.php
  5. +2 −2 admin/experiment_mailqueue_show.php
  6. +6 −2 admin/experiment_participants_show.php
  7. +46 −0 admin/experiment_participants_show_csv.php
  8. +1 −2 admin/experiment_recruitment_report.php
  9. +40 −3 admin/experiment_show.php
  10. +2 −0 admin/header.php
  11. +1 −1 admin/mailqueue_show.php
  12. +1 −2 admin/options_default_queries.php
  13. +12 −4 admin/options_edit.php
  14. +2 −0 admin/options_main.php
  15. +82 −13 admin/options_ordered_lists.php
  16. +1 −2 admin/options_saved_queries.php
  17. +49 −5 admin/participants_show.php
  18. +262 −0 config/dbupdates.php
  19. +1 −1 config/requires.php
  20. +28 −2 config/system.php
  21. +24 −7 install/CHANGELOG
  22. +2 −2 install/INSTALL.howto
  23. +7 −3 install/UPGRADE.howto
  24. +191 −0 install/data_update_txt.php
  25. +1 −0 install/example_update_data.txt
  26. +9 −10 install/install.sql
  27. +12 −0 install/settings-dist.php
  28. +2 −3 public/faq.php
  29. +2 −2 public/participant_create.php
  30. +0 −933 tagsets/class.json.php
  31. +8 −0 tagsets/cronjobs.php
  32. +104 −0 tagsets/csvoutput.php
  33. +98 −1 tagsets/expadmin.php
  34. +3 −1 tagsets/experimentmail.php
  35. +1 −1 tagsets/expregister.php
  36. +1 −2 tagsets/formhelpers.php
  37. +15 −17 tagsets/helpers.php
  38. +48 −1 tagsets/language.php
  39. +1 −1 tagsets/logfunctions.php
  40. +8 −1 tagsets/mailqueue.php
  41. +33 −7 tagsets/options.php
  42. +128 −0 tagsets/orsee_mysql.php
  43. +290 −257 tagsets/participant.php
  44. +42 −10 tagsets/query.php
  45. +40 −0 tagsets/query_modules.php
  46. +3 −1 tagsets/sessions.php
  47. +11 −0 tagsets/survey.php
@@ -22,13 +22,13 @@
if ($logged_in) {
$expadmindata['admin_id']=$_SESSION['expadmindata']['admin_id'];
log__admin("login");
if (isset($_REQUEST['requested_url']) && $_REQUEST['requested_url']) redirect($_REQUEST['requested_url']);
if (isset($_REQUEST['requested_url']) && $_REQUEST['requested_url']) redirect(urldecode($_REQUEST['requested_url']));
else redirect("admin/index.php");
} else {
message(lang('error_password_or_username'));
$add="";
if (isset($_REQUEST['requested_url']) && $_REQUEST['requested_url'])
$add="?requested_url=".urlencode($_REQUEST['requested_url']);
$add="?requested_url=".$_REQUEST['requested_url'];
redirect("admin/admin_login.php".$add);
}
$proceed=false;
@@ -71,17 +71,16 @@
redirect ('admin/'.thisdoc().'?experiment_id='.$experiment_id);

} elseif(isset($_REQUEST['search_submit']) || isset($_REQUEST['search_sort'])) {
$json = new Services_JSON(SERVICES_JSON_LOOSE_TYPE);
if(isset($_REQUEST['search_sort'])){
$posted_query_json=$_SESSION['lastquery_assign_'.$experiment_id];
$query_id=$_SESSION['lastqueryid_assign_'.$experiment_id];
$posted_query=$json->decode($posted_query_json);
$posted_query=json_decode($posted_query_json,true);
$sort=query__get_sort('assign',$_REQUEST['search_sort']); // sanitize sort
} else {
// store new query in session
$query_id=time();
if(isset($_REQUEST['form'])) $posted_query=$_REQUEST['form']; else $posted_query=array('query'=>array());
$posted_query_json=$json->encodeUnsafe($posted_query);
$posted_query_json=json_encode($posted_query);
$_SESSION['lastquery_assign_'.$experiment_id] = $posted_query_json;
$_SESSION['lastqueryid_assign_'.$experiment_id] = $query_id;
$sort=query__load_default_sort('assign',$experiment_id);
@@ -67,17 +67,16 @@
redirect ('admin/'.thisdoc().'?experiment_id='.$experiment_id);

} elseif(isset($_REQUEST['search_submit']) || isset($_REQUEST['search_sort'])) {
$json = new Services_JSON(SERVICES_JSON_LOOSE_TYPE);
if(isset($_REQUEST['search_sort'])){
$posted_query_json=$_SESSION['lastquery_deassign_'.$experiment_id];
$query_id=$_SESSION['lastqueryid_deassign_'.$experiment_id];
$posted_query=$json->decode($posted_query_json);
$posted_query=json_decode($posted_query_json,true);
$sort=query__get_sort('assign',$_REQUEST['search_sort']); // sanitize sort
} else {
// store new query in session
$query_id=time();
if(isset($_REQUEST['form'])) $posted_query=$_REQUEST['form']; else $posted_query=array('query'=>array());
$posted_query_json=$json->encodeUnsafe($posted_query);
$posted_query_json=json_encode($posted_query);
$_SESSION['lastquery_deassign_'.$experiment_id] = $posted_query_json;
$_SESSION['lastqueryid_deassign_'.$experiment_id] = $query_id;
$sort=query__load_default_sort('assign',$experiment_id);
@@ -76,7 +76,7 @@

if (!isset($_REQUEST['hide_in_cal']) ||!$_REQUEST['hide_in_cal']) $_REQUEST['hide_in_cal']="n";

if (!isset($_REQUEST['access_restricted']) ||!$_REQUEST['access_restricted']) $_REQUEST['access_restricted']="n";
if (!isset($_REQUEST['access_restricted']) ||!$_REQUEST['access_restricted']) $_REQUEST['access_restricted']='n';



@@ -120,6 +120,7 @@
foreach ($formvarnames as $fvn) {
if (!isset($edit[$fvn])) $edit[$fvn]="";
}
$edit['access_restricted']=$settings['default_experiment_restriction'];
}
if (!$edit['ethics_expire_date']) $edit['ethics_expire_date']=ortime__unixtime_to_sesstime()+100000000;

@@ -357,4 +358,4 @@

}
include ("footer.php");
?>
?>
@@ -2,7 +2,7 @@
// part of orsee. see orsee.org
ob_start();

$jquery=array();
$jquery=array('popup');
$title="mailqueue";
$menu__area="statistics";
include ("header.php");
@@ -12,7 +12,7 @@
}

if ($proceed) {
$allow=check_allow('mailqueue_show_all','experiment_show.php?experiment_id='.$experiment_id);
$allow=check_allow('mailqueue_show_experiment','experiment_show.php?experiment_id='.$experiment_id);
}

if ($proceed) {
@@ -345,8 +345,12 @@
echo '</TR></TABLE>';

if ($display!='enrol') {
echo '<P align=right><A class="small" HREF="experiment_participants_show_pdf.php'.$thiscgis.
'" target="_blank">'.lang('print_version').'</A></P>';
echo '<P align="right" class="small">'.lang('download_as').'
<A HREF="experiment_participants_show_pdf.php'.
$thiscgis.'" target="_blank">'.lang('pdf_file').'</A>
|
<A HREF="experiment_participants_show_csv.php'.
$thiscgis.'">'.lang('csv_file').'</A></P>';
}

// show query
@@ -0,0 +1,46 @@
<?php
// part of orsee. see orsee.org
ob_start();
include ("nonoutputheader.php");
if ($proceed) {
if (isset($_REQUEST['experiment_id']) && $_REQUEST['experiment_id']) {
$experiment_id=$_REQUEST['experiment_id'];
} else {
redirect("admin/experiment_main.php");
}
}

if ($proceed) {
if (isset($_REQUEST['session_id']) && $_REQUEST['session_id']) {
$session_id=$_REQUEST['session_id'];
} else {
$session_id='';
}

if (isset($_REQUEST['pstatus'])) {
$pstatus=$_REQUEST['pstatus'];
} else {
$pstatus='';
}

if (isset($_REQUEST['focus']) && $_REQUEST['focus']) {
$focus=$_REQUEST['focus'];
} else {
$focus='';
}

if (isset($_REQUEST['search_sort']) && $_REQUEST['search_sort']) {
$sort=$_REQUEST['search_sort'];
} else {
$sort='';
}

if (!check_allow('experiment_restriction_override')) {
check_experiment_allowed($experiment_id,"admin/experiment_show.php?experiment_id=".$experiment_id);
}
}

if ($proceed) {
csvoutput__make_part_list($experiment_id,$session_id,$pstatus,$focus,$sort);
}
?>
@@ -234,7 +234,6 @@
echo '<table class="or_orr_section_content">';

$queries=query__load_saved_queries('assign,deassign',-1,$experiment_id,true,"query_time ASC");
$json = new Services_JSON(SERVICES_JSON_LOOSE_TYPE);

$shade=false;
foreach ($queries as $q) {
@@ -273,7 +272,7 @@
}
echo '</TD>';
echo '<TD>';
$posted_query=$json->decode($q['json_query']);
$posted_query=json_decode($q['json_query'],true);
$pseudo_query_array=query__get_pseudo_query_array($posted_query['query']);
$pseudo_query_display=query__display_pseudo_query($pseudo_query_array,true);
echo $pseudo_query_display;
@@ -1,7 +1,7 @@
<?php
// part of orsee. see orsee.org
ob_start();

$jquery=array();
$title="experiment";
$menu__area="experiments_main";
include ("header.php");
@@ -31,6 +31,25 @@
}


if ($proceed) {
// change session status if requested
if (isset($_REQUEST['bulk_set_session_status']) && $_REQUEST['bulk_set_session_status'] && isset($_REQUEST['session_status'])
&& isset($_REQUEST['sel']) && is_array($_REQUEST['sel']) && count($_REQUEST['sel'])>0
&& in_array($_REQUEST['session_status'],array('planned','live','completed','balanced')) ) {
$pars=array();
foreach($_REQUEST['sel'] as $k=>$v) {
$pars[]=array(':session_id'=>$k,':session_status'=>$_REQUEST['session_status'],':experiment_id'=>$experiment_id);
}
$query="UPDATE ".table('sessions')."
SET session_status= :session_status
WHERE experiment_id= :experiment_id
AND session_id= :session_id";
$done=or_query($query,$pars);
message (lang('bulk_updated_session_statuses'));
redirect('admin/experiment_show.php?experiment_id='.$experiment_id);
}
}

if ($proceed) {
$experiment_total_payment=0;
// load sessions if lab experiment
@@ -208,6 +227,8 @@

echo '<center>
<BR>
<FORM action="'.thisdoc().'" method="POST">
<INPUT type=hidden name="experiment_id" value="'.$experiment_id.'">
<table class="or_panel">
<TR>
<TD>
@@ -231,6 +252,11 @@
lang('xxx_sessions_registered').'<BR>
</TD>
</TR>
<TR>
<TD align="left">
'.lang('select_all').' '.javascript__selectall_checkbox_script().'
</TD>
</TR>
<TR>
<TD>
@@ -243,7 +269,19 @@
</TD>
</TR>
<TR>
<TD>
<TABLE class="or_option_buttons_box" style="background: '.$color['options_box_background'].';">
<TR>
<TD>
'.lang('set_session_status_for_selected_sessions_to').' '.session__session_status_select('session_status',-1).'
<input class="button" type="submit" name="bulk_set_session_status" value="'.lang('button_set').'">
</TD>
</TR>
</TABLE>
</TR>
</TABLE>
</FORM>
</center><BR><BR>';

}
@@ -324,11 +362,10 @@
if ($settings['allow_permanent_queries']=='y') {
$perm_queries=query__get_permanent($experiment_id);
if (count($perm_queries)>0) {
$json = new Services_JSON(SERVICES_JSON_LOOSE_TYPE);
echo '<TR><TD colspan=3><B>'.lang('found_active_permanent_query').'</B></TD></TR>';
echo '<TR><TD colspan=3><TABLE width="100%" border="0">';
foreach($perm_queries as $pquery) {
$posted_query=$json->decode($pquery['json_query']);
$posted_query=json_decode($pquery['json_query'],true);
$pseudo_query_array=query__get_pseudo_query_array($posted_query['query']);
$pseudo_query_display=query__display_pseudo_query($pseudo_query_array,false);
echo '<TR><TD>'.$pseudo_query_display.'</TD><TD>';
@@ -61,6 +61,8 @@

$lang=load_language($expadmindata['language']);

$done=check_database_upgrade();

if (!isset($title)) $title="";
if ($title) $title=lang($title);
$pagetitle=$settings['default_area'].': '.$title;
@@ -2,7 +2,7 @@
// part of orsee. see orsee.org
ob_start();

$jquery=array();
$jquery=array('popup');
$title="mailqueue";
$menu__area="statistics";
include ("header.php");
@@ -17,9 +17,8 @@

if ($proceed) {
if (isset($_REQUEST['search_submit'])) {
$json = new Services_JSON(SERVICES_JSON_LOOSE_TYPE);
if(isset($_REQUEST['form'])) $posted_query=$_REQUEST['form']; else $posted_query=array('query'=>array());
$posted_query_json=$json->encodeUnsafe($posted_query);
$posted_query_json=json_encode($posted_query);
$done=query__save_default_query($posted_query_json,'default_'.$type);
redirect('admin/'.thisdoc().'?type='.$type);
}
@@ -7,7 +7,7 @@
elseif ($_REQUEST['otype']=="default") $title='edit_default_values';
}

$jquery=array('switchy');
$jquery=array('switchy','datepicker');
$menu__area="options_main";
include ("header.php");
if ($proceed) {
@@ -22,6 +22,9 @@
redirect ("admin/options_main.php");
}

if ($otype=='general') $opts=$system__options_general;
else $opts=$system__options_defaults;

echo '<center>';

$pars=array(':type'=>$otype);
@@ -36,6 +39,14 @@

if (check_allow('settings_edit') && isset($_REQUEST['change']) && $_REQUEST['change']) {
$newoptions=$_REQUEST['options']; $now=time();

// add and process option values which may be differently submitted
foreach ($opts as $o) {
if($o['type']=='date') {
$newoptions[$o['option_name']]=ortime__array_to_sesstime($_REQUEST,'options__'.$o['option_name'].'_');
}
}

$pars_new=array(); $pars_update=array();
foreach ($newoptions as $oname => $ovalue) {
if (isset($options[$oname])) {
@@ -85,9 +96,6 @@
</TR>
<TR><TD colspan=2><hr></TD></TR>';

if ($otype=='general') $opts=$system__options_general;
else $opts=$system__options_defaults;

foreach ($opts as $o) {
$done=options__show_option($o);
}
@@ -58,6 +58,8 @@
$optionlist=array();
if (check_allow('pform_config_field_configure')) $optionlist[]='<A HREF="options_participant_profile.php" class="option">'.oicon('file-image-o').lang('participant_profile_fields').'</A>';
if (check_allow('pform_templates_edit')) $optionlist[]='<A HREF="options_profile_template.php" class="option">'.oicon('newspaper-o').lang('participant_profile_form_template').'</A>';
if (check_allow('pform_anonymization_fields_edit')) $optionlist[]='<A HREF="options_ordered_lists.php?list=anonymize_profile_list" class="option">'.oicon('bars').lang('fields_to_anonymize_in_anonymization_bulk_action').'</A>';

options__show_main_section(lang('participant_profile'),$optionlist);


0 comments on commit 9a80641

Please sign in to comment.
You can’t perform that action at this time.