~azzar1/unity/add-show-desktop-key

« back to all changes in this revision

Viewing changes to ivle/webapp/tutorial/media/exercise_admin.js

  • Committer: Nick Chadwick
  • Date: 2009-02-24 05:22:21 UTC
  • mto: (1099.1.227 exercise-ui)
  • mto: This revision was merged to the branch mainline in revision 1162.
  • Revision ID: chadnickbok@gmail.com-20090224052221-xws3fir8gg46ovvz
Modifief exercise view, so that exercises can now be viewed in an
expandable javascript style.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/* IVLE - Informatics Virtual Learning Environment
 
2
 * Copyright (C) 2007-2009 The University of Melbourne
 
3
 *
 
4
 * This program is free software; you can redistribute it and/or modify
 
5
 * it under the terms of the GNU General Public License as published by
 
6
 * the Free Software Foundation; either version 2 of the License, or
 
7
 * (at your option) any later version.
 
8
 *
 
9
 * This program is distributed in the hope that it will be useful,
 
10
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 
11
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
12
 * GNU General Public License for more details.
 
13
 *
 
14
 * You should have received a copy of the GNU General Public License
 
15
 * along with this program; if not, write to the Free Software
 
16
 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 
17
 *
 
18
 * Author: Nick Chadwick
 
19
 */
 
20
 
 
21
function show_suite(suite)
 
22
{
 
23
 
 
24
  var suite_div = document.getElementById('suite_data_' + suite);
 
25
  var suite_header = document.getElementById('suite_header_' + suite);
 
26
  
 
27
  suite_div.style.display = 'block';
 
28
  suite_header.setAttribute('onclick', "hide_suite('" + suite + "')");
 
29
 
 
30
}
 
31
 
 
32
function hide_suite(suite)
 
33
{
 
34
 
 
35
  var suite_div = document.getElementById('suite_data_' + suite);
 
36
  var suite_header = document.getElementById('suite_header_' + suite);
 
37
 
 
38
  suite_div.style.display = 'none';
 
39
  suite_header.setAttribute('onclick', "show_suite('" + suite + "')");
 
40
}
 
41
 
 
42
function show_variables(suite)
 
43
{
 
44
 
 
45
  var variables_div = document.getElementById('variables_' + suite);
 
46
  var variables_header = document.getElementById('variables_header_' + suite);
 
47
  
 
48
  variables_div.style.display = 'block';
 
49
  variables_header.setAttribute('onclick', "hide_variables('" + suite + "')");
 
50
 
 
51
}
 
52
 
 
53
function hide_variables(suite)
 
54
{
 
55
 
 
56
  var variables_div = document.getElementById('variables_' + suite);
 
57
  var variables_header = document.getElementById('variables_header_' + suite);
 
58
 
 
59
  variables_div.style.display = 'none';
 
60
  variables_header.setAttribute('onclick', "show_variables('" + suite + "')");
 
61
 
 
62
}
 
63
 
 
64
function show_cases(suite)
 
65
{
 
66
 
 
67
  var cases_div = document.getElementById('test_cases_' + suite);
 
68
  var cases_header = document.getElementById('cases_header_' + suite);
 
69
  
 
70
  cases_div.style.display = 'block';
 
71
  cases_header.setAttribute('onclick', "hide_cases('" + suite + "')");
 
72
 
 
73
}
 
74
 
 
75
function hide_cases(suite)
 
76
{
 
77
 
 
78
  var cases_div = document.getElementById('test_cases_' + suite);
 
79
  var cases_header = document.getElementById('cases_header_' + suite);
 
80
 
 
81
  cases_div.style.display = 'none';
 
82
  cases_header.setAttribute('onclick', "show_cases('" + suite + "')");
 
83
 
 
84
}
 
85
 
 
86
function show_case(suite)
 
87
{
 
88
 
 
89
  var case_div = document.getElementById('test_case_' + suite);
 
90
  var case_header = document.getElementById('case_header_' + suite);
 
91
  
 
92
  case_div.style.display = 'block';
 
93
  case_header.setAttribute('onclick', "hide_case('" + suite + "')");
 
94
 
 
95
}
 
96
 
 
97
function hide_case(suite)
 
98
{
 
99
 
 
100
  var case_div = document.getElementById('test_case_' + suite);
 
101
  var case_header = document.getElementById('case_header_' + suite);
 
102
 
 
103
  case_div.style.display = 'none';
 
104
  case_header.setAttribute('onclick', "show_case('" + suite + "')");
 
105
 
 
106
}