private void BindData() { FileSystem fs = new FileSystem(Globals.CurrentIdentity); CFile file = fs.GetFile(GetFileID()); if (!GetStudentMode()) { divPerms.Visible = true; ucFilePerms.FileID = file.ID; ucFilePerms.BindData(); } else divPerms.Visible = false; cmdUpdate.Visible = iDirections.Visible = divUpload.Visible = !GetStudentMode(); txtName.Text = file.Alias; if (file.IsDirectory()) { divData.Visible = false; txtType.Enabled = false; txtType.Text = "Folder"; } else { divData.Visible = true; txtType.Enabled = true; txtType.Text = Path.GetExtension(file.Name); txtDesc.Text = file.Description; if (txtType.Text == ".url") { fs.LoadFileData(file); string url = new string(file.Data); txtUrl.Text = url; lnkEdit.Attributes.Add("onClick", @"window.open('" + url + "', '"+"Mike"+@"', 'width=800, height=600 " + @", scrollbars=yes, menubar=yes, resizable=yes, status=yes, toolbar=yes')"); lnkDownload.Enabled = false; rdbData.Checked = false; rdbLink.Checked = true; } else { txtUrl.Text = ""; rdbData.Checked = true; rdbLink.Checked = false; lnkEdit.Attributes.Add("onClick", @"window.open('Controls/Filesys/viewfile.aspx?FileID=" + file.ID + @"', '"+file.ID+@"', 'width=770, height=580')"); lnkDownload.Attributes.Add("onClick", @"window.open('Controls/Filesys/dlfile.aspx?FileID=" + file.ID + @"', '"+file.ID+@"', 'width=770, height=580')"); lnkDownload.Enabled = true; } } txtType.Enabled = txtDesc.Enabled = txtName.Enabled = !GetStudentMode(); }
public string ReDiscover(AutoEvaluation eval, out double points, out int time, out int count) { string xmltests; FileSystem fs = new FileSystem(Globals.CurrentIdentity); CFile zone = fs.GetFile(eval.ZoneID); CFile xmldesc = fs.GetFile(Path.Combine(zone.FullPath, "__testsuite.xml")); if (xmldesc == null) throw new JUnitToolException("No proper JUnit Test Suite uploaded"); fs.LoadFileData(xmldesc); xmltests = new string(xmldesc.Data); GetSuiteInfo(xmltests, out points, out time, out count); return xmltests; }