File: text.html

package info (click to toggle)
moodle 1.6.3-2%2Betch3
  • links: PTS
  • area: main
  • in suites: etch
  • size: 37,172 kB
  • ctags: 51,688
  • sloc: php: 231,916; sql: 5,631; xml: 2,688; sh: 1,185; perl: 638; makefile: 48; pascal: 36
file content (149 lines) | stat: -rw-r--r-- 5,555 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149

<tr valign="top">
    <td colspan="2">
    <script language="javascript" type="text/javascript">
        function showhide (id, set) {
            divobj = document.getElementById(id);
            butobj = document.getElementById(id+'button');
            prefobj = document.getElementById(id+'pref');
            if (set == true) {
                if (prefobj.value == '1') {
                    divobj.style.display = 'block';
                    butobj.value = '<?php print_string("hidesettings") ?>';
                } else {
                    divobj.style.display = 'none';
                    butobj.value = '<?php print_string("showsettings") ?>...';
                }
            } else {
                if (prefobj.value == '1') {
                    divobj.style.display = 'none';
                    butobj.value = '<?php print_string("showsettings") ?>...';
                    prefobj.value = '0';
                } else {
                    divobj.style.display = 'block';
                    butobj.value = '<?php print_string("hidesettings") ?>';
                    prefobj.value = '1';
                }
            }
        }
    </script>
    </td>
</tr>
<tr valign="top">
    <td align="right" nowrap="nowrap">


        <b><?php print_string("fulltext", "resource") ?>:</b><br />
            <?php  helpbutton("writing", get_string("helpwriting"), "moodle", true, true) ?><br />
            <?php  emoticonhelpbutton("theform", "alltext") ?> <br />
    </td>
    <td>
        <?php print_textarea(false, 30, 65, 680, 400, "alltext", $form->alltext); ?>
    </td>
</tr> 
<tr valign="top">
    <td align="right" nowrap="nowrap">
        <b><?php print_string("formattexttype") ?>:</b><br />
    </td>
    <td>
        <?php 
            choose_from_menu($format_array, "options", $form->options, '');
            helpbutton("textformat", get_string("formattexttype"));
        ?>
    </td>
</tr> 

<tr><td colspan="2"><hr /></td></tr>


<tr>
    <td align="right"><b><?php print_string("display", "resource") ?>:</b></td>
    <td>
        <input type="button" value="hide settings" id="windowsettingsbutton" onclick="javascript: return showhide('windowsettings');" />
        <input type="hidden" name="windowsettingspref" id="windowsettingspref" 
               value="<?php echo get_user_preferences('resource_windowsettingspref', $CFG->resource_windowsettings); ?>" />
        <?php helpbutton("window", get_string("display", "resource"), "resource", true) ?>
    </td>
</tr>   
<tr><td colspan="2">

    <div id="windowsettings">
        
<table align="center">
        

<tr valign="top">

    <td colspan="2">
        <script type="text/javascript">
            var popupitems = [<?php echo $popupoptions; ?>];
            var blockitem = [<?php echo $blockoption; ?>];
            var allitems = [<?php echo $alloptions; ?>];
        </script>
        <input type="radio" name="windowpopup" value="0" alt="<?php print_string("pagewindow", "resource") ?>" <?php echo ($windowtype != "popup") ? 'checked="checked"' : '' ?> 
        onclick="lockoptions('form', 'windowpopup[0]', blockitem);
        return lockoptions('form', 'windowpopup[1]', popupitems);" />
        <b title="<?php print_string("pagedisplay", "resource") ?>"><?php print_string("pagewindow", "resource") ?></b>
        <?php print_string("pagedisplay", "resource") ?>
        <blockquote>
            <input type="hidden" name="hblockdisplay" value="0" />
            <input type="checkbox" name="blockdisplay" value="1" <?php echo ($form->options == "showblocks") ? "checked=\"checked\"" : "" ?> alt="<?php print_string('showcourseblocks', 'resource') ?>" />
            <?php print_string("showcourseblocks", "resource") ?>
        </blockquote>

    </td>
</tr>

<tr valign="top">
    
    <td colspan="2">
        <input name="windowpopup" type="radio" value="1" alt="<?php p($strnewwindowopen) ?>" <?php echo ($windowtype == "popup") ? "checked=\"checked\"" : "" ?>
        onclick="lockoptions('form', 'windowpopup[0]', blockitem);
        return lockoptions('form', 'windowpopup[1]', popupitems);" />
        <b title="<?php p($strnewwindowopen) ?>"><?php p($strnewwindow) ?></b>
        <?php p($strnewwindowopen) ?>
        <blockquote>
        <?php
            foreach ($window as $name => $value) {
                if ($name == "height" or $name == "width") {
                    continue;
                }
                echo '<input name="h'.$name.'" type="hidden" value="0" />';
                echo '<input name="'.$name.'" type="checkbox" value="1" alt="'.$$stringname.'" '.$window->$name.' />';
                $stringname = "str$name";
                echo $$stringname."<br />";
            }
        ?>

        <input name="hwidth" type="hidden" value="0" />
        <input name="width" type="text" size="4" value="<?php p($window->width) ?>" />
        <?php p($strwidth) ?><br />

        <input name="hheight" type="hidden" value="0" />
        <input name="height" type="text" size="4" value="<?php p($window->height) ?>" />
        <?php p($strheight) ?><br />
        <?php
            if ($windowtype == "page") {
                echo "<script type=\"text/javascript\">";
                echo "lockoptions('form','windowpopup[1]', popupitems);";
                echo "</script>";
            }
        ?>
        </blockquote>
    </td>
</tr>

</table>

    </div>


<script language="javascript" type="text/javascript">
    showhide('windowsettings', true);
</script>


</td></tr>

<?php print_visible_setting($form); ?>