Example #1
0
 /**
  * This function should not exist, but the way this page is built it sort of has to.
  * @param int $entry_year
  * @param int $grad_year
  */
 function build_entry_grad_year_container($entry_year = "", $grad_year = "")
 {
     $output = "<div id=\"entry_year_container\" style=\"float: left; margin-right: 20px;\">\n";
     $output .= "    <label for=\"entry_year\" class=\"form-required\" style=\"display: block;\">Year of Program Entry</label>&nbsp;\n";
     $output .= "    <select id=\"entry_year\" name=\"entry_year\" style=\"width: 140px\">\n";
     $selected_year = $entry_year ? $entry_year : date("Y", time()) - (date("m", time()) < 7 ? 1 : 0);
     for ($i = fetch_first_year(); $i >= 1995; $i--) {
         $selected = $selected_year == $i;
         $output .= build_option($i, $i, $selected);
     }
     $output .= "    </select>\n";
     $output .= "</div>\n";
     $output .= "&nbsp;&nbsp;\n";
     $output .= "<div id=\"grad_year_container\" style=\"float: left;\">\n";
     $output .= "    <label for=\"grad_year\" class=\"form-required\" style=\"display: block;\">Expected Graduation Year</label>&nbsp;\n";
     $output .= "    <select id=\"grad_year\" name=\"grad_year\" style=\"width: 140px;\">\n";
     for ($i = fetch_first_year() + 1; $i >= 1995; $i--) {
         $selected = $grad_year == $i;
         $output .= build_option($i, $i, $selected);
     }
     $output .= "    </select>\n";
     $output .= " </div>\n";
     return $output;
 }
function display_category_select($organisation_id = null, $group = null, $role = null, $proxy_id = null, $cat_id = null)
{
    $types = MetaDataTypes::get($organisation_id, $group, $role, $proxy_id);
    $categories = getCategories($types);
    if (count($categories) == 0) {
        return "None";
    }
    ob_start();
    ?>
		<select id="associated_cat_id" name="associated_cat_id">
			<?php 
    foreach ($categories as $category) {
        echo build_option($category->getID(), $category->getLabel(), $cat_id == $category->getID());
    }
    ?>
		</select>
	<?php 
    return ob_get_clean();
}
Example #3
0
                            <div class="control-group">
                                <label for="course_report_ids" class="control-label form-nrequired">Report Types:</label>
                                <div class="controls">
                                    <?php 
                    $query = "\tSELECT *\n                                                FROM `course_report_organisations` a\n                                                JOIN `course_lu_reports` b\n                                                ON a.`course_report_id` = b.`course_report_id`\n                                                WHERE a.`organisation_id` = " . $db->qstr($course_details["organisation_id"]);
                    $results = $db->GetAll($query);
                    if ($results) {
                        ?>
                                        <select id="course_report_ids" name="course_report_ids[]" multiple data-placeholder="Choose reports..." class="chosen-select">
                                            <?php 
                        foreach ($results as $result) {
                            $selected = false;
                            if (isset($PROCESSED["course_report_ids"]) && $PROCESSED["course_report_ids"] && in_array($result["course_report_id"], $PROCESSED["course_report_ids"])) {
                                $selected = true;
                            }
                            echo build_option($result["course_report_id"], $result["course_report_title"], $selected);
                        }
                        ?>
                                        </select>
                                        <?php 
                    }
                    if (is_array($PROCESSED["course_reports"])) {
                        foreach ($PROCESSED["course_reports"] as $course_report) {
                            echo "<li id=\"type_" . $course_report[0] . "\" class=\"\">" . $course_report[2] . "<a href=\"#\" onclick=\"\$(this).up().remove(); cleanupList(); return false;\" class=\"remove\"><img src=\"" . ENTRADA_URL . "/images/action-delete.gif\"></a></li>";
                        }
                    }
                    ?>
                                </div>
                            </div>
                        </div>
Example #4
0
					<div class="well mspr-box">
						<div class="inner-box">
							<form method="get" class="form-horizontal">
								<input type="hidden" name="mode" value="year" />
								<div class="control-group">
									<label>Choose Class to manage:</label>
											<select name="year">
											<?php 
            //because we ned the current school year, we have to rig it a bit.
            $cur_year = (int) date("Y");
            if (date("n") > 8) {
                $cur_year += 1;
            }
            foreach ($results as $result) {
                $year = $result['grad_year'];
                echo build_option($year, $year, $year == $cur_year);
            }
            ?>
											</select>
								</div>
									<input type="submit" class="btn btn-primary" value="Go"></input>
										
								</form>
						</div>
					</div>
				</div>
				<div class="span2" style="text-align:center">
					<span class="or" style="margin-top:35px">OR</span>
				</div>
				<div class="span5">
					<div class="well mspr-box" style="text-align:center;font-size:1.2em;font-weight:500">
                echo ENTRADA_URL . "/admin/courses/reports?section=report-card&STEP=2&id=" . $course_details["course_id"];
                ?>
" method="post">	
			<div class="control-group">
				<label class="control-label form-required" for="student_proxy_id">Student:</label>
				<div class="controls">
					<select id="student_proxy_id" name="student_proxy_id">
						<option value="0">-- Select a Student --</option>
						<?php 
                if ($student_list) {
                    foreach ($student_list as $student) {
                        $selected = false;
                        if ($student["proxy_id"] == $PROCESSED["student_proxy_id"]) {
                            $selected = true;
                        }
                        echo build_option($student["proxy_id"], $student["fullname"], $selected);
                    }
                }
                ?>
					</select>
				</div>
				<div class="space-above"></div>
			</div>	
		</form>
	</div>
	<?php 
                if ($STEP == 2 && $PROCESSED["student_proxy_id"]) {
                    ?>
			<div class="row-fluid">
				<h3><?php 
                    echo $PROCESSED["fullname"];
Example #6
0
function print_status_select($showstatus)
{
    global $CFG;
    echo '<select name="showstatus" onChange="document.forms[\'SelectCriteria\'].submit()">';
    if ($showstatus == 0) {
        echo build_option(0, get_string('showstatusall', 'diplome'), true);
    } else {
        echo build_option(0, get_string('showstatusall', 'diplome'), false);
    }
    if ($showstatus == 1) {
        echo build_option(1, get_string('showstatusrequested', 'diplome'), true);
    } else {
        echo build_option(1, get_string('showstatusrequested', 'diplome'), false);
    }
    if ($showstatus == 2) {
        echo build_option(2, get_string('showstatusprinted', 'diplome'), true);
    } else {
        echo build_option(2, get_string('showstatusprinted', 'diplome'), false);
    }
    if ($showstatus == 3) {
        echo build_option(3, get_string('showstatussigned', 'diplome'), true);
    } else {
        echo build_option(3, get_string('showstatussigned', 'diplome'), false);
    }
    echo '</select>';
}
Example #7
0
            foreach ($results as $result) {
                echo build_option($result['id'], clean_input($result["title"], array("notags", "specialchars")));
            }
        }
        ?>
									</select></td>
								</tr>	
								<tr>
								<td><label class="form-required" for="year">Year Awarded:</label></td>
								<td><select name="year">
									<?php 
        $cur_year = (int) date("Y");
        $start_year = $cur_year - 4;
        $end_year = $cur_year + 4;
        for ($opt_year = $start_year; $opt_year <= $end_year; ++$opt_year) {
            echo build_option($opt_year, $opt_year, $opt_year == $cur_year);
        }
        ?>
									</select></td>
								</tr>
							</tbody>
						</table>	
					</form>
					
					<div class="footer">
						<button class="btn modal-close">Close</button>
						<button class="btn btn-primary pull-right modal-confirm">Update</button>
					</div>
					
				</div>
				
Example #8
0
        }
    }
    ?>
				</select>
			</td>
		</tr>
		<tr>
			<td>&nbsp;</td>
			<td><label for="associated_group" class="form-required"><?php 
    echo $translate->translate("Group");
    ?>
</label></td>
			<td><select id="associated_group" name="associated_group">
			<?php 
    foreach (array_keys($SYSTEM_GROUPS) as $group) {
        echo build_option($group, ucwords($group));
    }
    ?>
			</select></td>
		</tr>
		<tr>
			<td>&nbsp;</td>
			<td><label for="associated_role" class="form-required"><?php 
    echo $translate->translate("Role");
    ?>
</label></td>
			<td><select id="associated_role" name="associated_role"></select></td>
		</tr>
		<tr>
			<td>&nbsp;</td>
			<td><label for="associated_cat_id" class="form-required"><?php 
Example #9
0
                                                    <select tabindex="1" name="end_month">
                                                    <?php 
            echo build_option("", "Month", true);
            for ($month_num = 1; $month_num <= 12; $month_num++) {
                echo build_option($month_num, getMonthName($month_num));
            }
            ?>
                                                    </select>
                                                    <select name="end_year">
                                                    <?php 
            echo build_option("", "Year", true);
            $cur_year = (int) date("Y");
            $start_year = $cur_year - 6;
            $end_year = $cur_year + 4;
            for ($opt_year = $start_year; $opt_year <= $end_year; ++$opt_year) {
                echo build_option($opt_year, $opt_year, false);
            }
            ?>
                                                    </select>
                                                </td>
                                            </tr>
                                        </tbody>
                                    </table>
                                </form>
                                <div class="footer">
                                    <button class="btn modal-close">Close</button>
                                    <button class="btn btn-primary pull-right modal-confirm">Submit</button>
                                </div>
                            </div>

                            <div class="clear">&nbsp;</div>
Example #10
0
function print_select_instructors()
{
    $instructors = get_instructors();
    echo '<select class="inssel" name="ins">';
    $i = 0;
    foreach ($instructors as $ins) {
        if ($i == 0) {
            echo build_option($ins->id, $ins->firstname . ' ' . $ins->lastname, 1);
            $i++;
        } else {
            echo build_option($ins->id, $ins->firstname . ' ' . $ins->lastname, 0);
        }
    }
    echo '</select>';
}
Example #11
0
            $selected_year = isset($PROCESSED["entry_year"]) ? $PROCESSED["entry_year"] : date("Y", time()) - (date("m", time()) < 7 ? 1 : 0);
            for ($i = fetch_first_year(); $i >= 1995; $i--) {
                $selected = $selected_year == $i;
                echo build_option($i, $i, $selected);
            }
            ?>
					</select>
				</div>
   				&nbsp;&nbsp;
				<div id="grad_year_container" style="float: left;">
					<label for="grad_year" class="form-required" style="display: block;">Expected Graduation Year</label>&nbsp;
					<select id="grad_year" name="grad_year" style="width: 140px;">
					<?php 
            for ($i = fetch_first_year() + 1; $i >= 1995; $i--) {
                $selected = isset($PROCESSED["grad_year"]) && $PROCESSED["grad_year"] == $i;
                echo build_option($i, $i, $selected);
            }
            ?>
					</select>
				</div>
			</div>
			<style>
				td {
					text-align: left;
					white-space: normal;
				}
				table.tableList tbody tr td {
					text-align: left;
					white-space: normal;
				}