<commit_before><table width="100%"  border="0" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF">
<tr>
<td align="center">
<form id="searchForm" action="">
  <table width="95%" border="0" cellspacing="0" cellpadding="2">

    <tr><td colspan="4"><b>Survey:</b> <select name="survey_select">
    <?php
      for ($i=0; $i < count($data); $i++) {
        echo '<option value="'.$data[$i]['Survey']['id'].'">'.$data[$i]['Survey']['name'].'</option>';
      }
    ?>
    </select></td></tr>

  </table>

  <?php echo $ajax->observeForm('searchForm', array('update'=>'survey_makegroups_table', 'url'=>"makegroupssearch", 'frequency'=>1, 'loading'=>"Element.show('loading');", 'complete'=>"Element.hide('loading');"))  ?>  </form>
<a name="list"></a>
<div id='survey_makegroups_table'>
    <?php
    $params = array('controller'=>'surveygroups', 'paging'=>!empty($paging)? $paging: null);
    echo $this->renderElement('survey_groups/ajax_survey_makegroups', $params);
    ?>
</div>
</td>
</tr>
</table><commit_msg>Added a check for how many surveys are available, and if it's less than 1, the page to create groups using teammaker will be replaces by a page asking the instructor to create some surveys. This closes #60.<commit_after><?php if (count($data) > 0) { ?>
    <table width="100%"  border="0" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF">
    <tr>
    <td align="center">
    <form id="searchForm" action="">
    <center>
    <!-- Ensure that there's at least on Suevey to choose from -->
        <h3>Please Select a Survey to make Groups: </h3>
        <select name="survey_select">
        <?php
        for ($i=0; $i < count($data); $i++) {
            echo '<option value="'.$data[$i]['Survey']['id'].'">'.$data[$i]['Survey']['name'].'</option>';
        }
        ?>
        </select>
    </center>
    <br /> <br />
    <?php echo $ajax->observeForm('searchForm', array('update'=>'survey_makegroups_table', 'url'=>"makegroupssearch", 'frequency'=>1, 'loading'=>"Element.show('loading');", 'complete'=>"Element.hide('loading');"))  ?>  </form>
    <a name="list"></a>
    <div id='survey_makegroups_table'>
        <?php
        $params = array('controller'=>'surveygroups', 'paging'=>!empty($paging)? $paging: null);
        echo $this->renderElement('survey_groups/ajax_survey_makegroups', $params);
        ?>
    </div>
    </td>
    </tr>
    </table>
<?php } else {  // if (count($data) > 0) ?>
<table width="100%"  border="0" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF"><tr><td>
    <center><h3> No Surveys found for this course!</h3>
    Please create a survey first, and have your students complete it.
    <br /><br />
    <input type="button" value="Go Back" onClick="javascript:window.history.back()">
</td></tr></table>
<?php } // if (count($data) > 0)?>
{'fraction_non_alphanumeric': 0.22740315638450503, 'fraction_numerical': 0.013629842180774749, 'mean_word_length': 4.09872029250457, 'pattern_counts': {'":': 0, '<': 73, '<?xml version=': 0, '>': 92, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6528936', 'n_tokens_mistral': 937, 'n_tokens_neox': 907, 'n_words': 211}